Apache Lucene.Net 2.4.0 Class Library API

PhraseQuery.Add Method (Term, Int32)

Adds a term to the end of the query phrase. The relative position of the term within the phrase is specified explicitly. This allows e.g. phrases with more than one term at the same position or phrases with gaps (e.g. in connection with stopwords).

public virtual void Add(
   Term term,
   int position
);

Parameters

term
position

See Also

PhraseQuery Class | Lucene.Net.Search Namespace | PhraseQuery.Add Overload List