FieldQuery (Lucene 10.5.1 highlighter API)
Description: declaration: package: org.apache.lucene.search.vectorhighlight, class: FieldQuery

Package org.apache.lucene.search.vectorhighlight

# Class FieldQuery

java.lang.Object
org.apache.lucene.search.vectorhighlight.FieldQuery

public class FieldQuery extends Object
FieldQuery breaks down query object into terms/phrases and keeps them in a QueryPhraseMap structure.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `FieldQuery.QueryPhraseMap`
  Internal structure of a query for highlighting: represents a nested query structure

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FieldQuery(Query query, IndexReader reader, boolean phraseHighlight, boolean fieldMatch)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `flatten(Query sourceQuery, IndexSearcher searcher, Collection<Query> flatQueries, float boost)`
  `FieldQuery.QueryPhraseMap`
  `getFieldTermMap(String fieldName, String term)`
  `FieldQuery.QueryPhraseMap`
  `searchPhrase(String fieldName, List<FieldTermStack.TermInfo> phraseCandidate)`

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

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

- ## Constructor Details

  - ### FieldQuery

    public FieldQuery(Query query, IndexReader reader, boolean phraseHighlight, boolean fieldMatch) throws IOException
    Throws:
      `IOException`

- ## Method Details

  - ### flatten

    protected void flatten(Query sourceQuery, IndexSearcher searcher, Collection<Query> flatQueries, float boost) throws IOException
    Throws:
      `IOException`

  - ### getFieldTermMap

    public FieldQuery.QueryPhraseMap getFieldTermMap(String fieldName, String term)
    Returns:
      QueryPhraseMap

  - ### searchPhrase

    public FieldQuery.QueryPhraseMap searchPhrase(String fieldName, List<FieldTermStack.TermInfo> phraseCandidate)
    Returns:
      QueryPhraseMap