org.apache.lucene.search.payloads

## Class BoostingTermQuery

- java.lang.Object
- - org.apache.lucene.search.Query
  - - org.apache.lucene.search.spans.SpanQuery
    - - org.apache.lucene.search.spans.SpanTermQuery
      - - org.apache.lucene.search.payloads.PayloadTermQuery
        - - org.apache.lucene.search.payloads.BoostingTermQuery

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

  Deprecated.
  See `PayloadTermQuery`

      public class BoostingTermQuery
      extends PayloadTermQuery

  The BoostingTermQuery is very similar to the `SpanTermQuery` except that it factors in the value of the payload located at each of the positions where the `Term` occurs.

  In order to take advantage of this, you must override `Similarity.scorePayload(String, byte[],int,int)` which returns 1 by default.

  Payload scores are averaged across term occurrences in the document.

  See Also:
    `Similarity.scorePayload(String, byte[], int, int)`, Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected class` | `BoostingTermQuery.BoostingTermWeight` Deprecated.

    - ### Nested classes/interfaces inherited from class org.apache.lucene.search.payloads.PayloadTermQuery

      `PayloadTermQuery.PayloadTermWeight`

  - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.search.payloads.PayloadTermQuery

      `function`

    - ### Fields inherited from class org.apache.lucene.search.spans.SpanTermQuery

      `term`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BoostingTermQuery(Term term)` Deprecated.
    `BoostingTermQuery(Term term, boolean includeSpanScore)` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `Weight` | `createWeight(Searcher searcher)` Deprecated. Expert: Constructs an appropriate Weight implementation for this query.
    `boolean` | `equals(java.lang.Object o)` Deprecated.

    - ### Methods inherited from class org.apache.lucene.search.payloads.PayloadTermQuery

      `hashCode`

    - ### Methods inherited from class org.apache.lucene.search.spans.SpanTermQuery

      `extractTerms, getField, getSpans, getTerm, getTerms, toString`

    - ### Methods inherited from class org.apache.lucene.search.Query

      `clone, combine, getBoost, getSimilarity, mergeBooleanQueries, rewrite, setBoost, toString, weight`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### BoostingTermQuery

          public BoostingTermQuery(Term term)

      Deprecated.

    - #### BoostingTermQuery

          public BoostingTermQuery(Term term,
                                   boolean includeSpanScore)

      Deprecated.

  - ### Method Detail

    - #### createWeight

          public Weight createWeight(Searcher searcher)
                              throws java.io.IOException

      Deprecated.
      Description copied from class: `Query`
      Expert: Constructs an appropriate Weight implementation for this query.

      Only implemented by primitive queries, which re-write to themselves.

      Overrides:
        `createWeight` in class `PayloadTermQuery`
      Throws:
        `java.io.IOException`

    - #### equals

          public boolean equals(java.lang.Object o)

      Deprecated.
      Overrides:
        `equals` in class `PayloadTermQuery`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.