org.apache.lucene.search

## Class PhraseWildcardQuery.SingleTerm

- java.lang.Object
- - org.apache.lucene.search.PhraseWildcardQuery.PhraseTerm
  - - org.apache.lucene.search.PhraseWildcardQuery.SingleTerm

- Enclosing class:
    PhraseWildcardQuery

      protected static class PhraseWildcardQuery.SingleTerm
      extends PhraseWildcardQuery.PhraseTerm

  Phrase term with no expansion.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Term` | `term`

    - ### Fields inherited from class org.apache.lucene.search.PhraseWildcardQuery.PhraseTerm

      `termPosition`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `SingleTerm(Term term, int termPosition)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected int` | `collectTermData(PhraseWildcardQuery query, IndexSearcher searcher, List<LeafReaderContext> segments, int remainingMultiTerms, int maxExpansionsForTerm, PhraseWildcardQuery.TermsData termsData)` Collects `TermState` and `TermStatistics` for the term (potentially expanded).
    `protected int` | `collectTermData(PhraseWildcardQuery query, IndexSearcher searcher, List<LeafReaderContext> segments, PhraseWildcardQuery.TermsData termsData)` Collects `TermState` and `TermStatistics` for the term without expansion.
    `boolean` | `equals(Object o)`
    `protected Query` | `getQuery()`
    `protected boolean` | `hasExpansions()`
    `int` | `hashCode()`
    `protected void` | `toString(StringBuilder builder)`

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

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### term

          protected final Term term

  - ### Constructor Detail

    - #### SingleTerm

          protected SingleTerm(Term term,
                               int termPosition)

  - ### Method Detail

    - #### hasExpansions

          protected boolean hasExpansions()

      Specified by:
        `hasExpansions` in class `PhraseWildcardQuery.PhraseTerm`

    - #### getQuery

          protected Query getQuery()

      Specified by:
        `getQuery` in class `PhraseWildcardQuery.PhraseTerm`

    - #### collectTermData

          protected int collectTermData(PhraseWildcardQuery query,
                                        IndexSearcher searcher,
                                        List<LeafReaderContext> segments,
                                        PhraseWildcardQuery.TermsData termsData)
                                 throws IOException

      Description copied from class: `PhraseWildcardQuery.PhraseTerm`
      Collects `TermState` and `TermStatistics` for the term without expansion. It must be called only if `PhraseWildcardQuery.PhraseTerm.hasExpansions()` returns false. Simplified version of `#collectTermData(PhraseWildcardQuery, IndexSearcher, List, int, int, TermsData)` with less arguments. This method throws `UnsupportedOperationException` if not overridden.
      Overrides:
        `collectTermData` in class `PhraseWildcardQuery.PhraseTerm`
      Throws:
        `IOException`

    - #### collectTermData

          protected int collectTermData(PhraseWildcardQuery query,
                                        IndexSearcher searcher,
                                        List<LeafReaderContext> segments,
                                        int remainingMultiTerms,
                                        int maxExpansionsForTerm,
                                        PhraseWildcardQuery.TermsData termsData)
                                 throws IOException

      Description copied from class: `PhraseWildcardQuery.PhraseTerm`
      Collects `TermState` and `TermStatistics` for the term (potentially expanded).
      Specified by:
        `collectTermData` in class `PhraseWildcardQuery.PhraseTerm`
        `termsData` - `PhraseWildcardQuery.TermsData` to update with the collected terms and stats.
      Returns:
        The number of expansions or matches in all segments; or 0 if this term does not match in any segment, in this case the phrase query can immediately stop.
      Throws:
        `IOException`

    - #### toString

          protected void toString(StringBuilder builder)

      Specified by:
        `toString` in class `PhraseWildcardQuery.PhraseTerm`

    - #### equals

          public boolean equals(Object o)

      Specified by:
        `equals` in class `PhraseWildcardQuery.PhraseTerm`

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in class `PhraseWildcardQuery.PhraseTerm`

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