Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class IndexSearcher

    Implements search over a single IndexReader.

    Applications usually need only call the inherited Search(Query, int) or Search(Query, Filter?, int) methods. For performance reasons, if your index is unchanging, you should share a single IndexSearcher instance across multiple searches instead of creating a new one per-search. If your index has changed and you wish to see the changes reflected in searching, you should use OpenIfChanged(DirectoryReader) to obtain a new reader and then create a new IndexSearcher from that. Also, for low-latency turnaround it's best to use a near-real-time reader (Open(IndexWriter, bool)). Once you have a new IndexReader, it's relatively cheap to create a new IndexSearcher from it.

    NOTE: IndexSearcher instances are completely thread safe, meaning multiple threads can call any of its methods, concurrently. If your application requires external synchronization, you should not synchronize on the IndexSearcher instance; use your own (non-Lucene) objects instead.

    Inheritance
    object
    IndexSearcher
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.Search
    Assembly: Lucene.Net.dll
    Syntax
    public class IndexSearcher

    Constructors

    IndexSearcher(IndexReader)

    Creates a searcher searching the provided index.

    Declaration
    public IndexSearcher(IndexReader r)
    Parameters
    Type Name Description
    IndexReader r
    Exceptions
    Type Condition
    ArgumentNullException

    r is null.

    IndexSearcher(IndexReader, TaskScheduler?)

    Runs searches for each segment separately, using the provided TaskScheduler. IndexSearcher will not shutdown/awaitTermination this TaskScheduler on dispose; you must do so, eventually, on your own.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public IndexSearcher(IndexReader r, TaskScheduler? executor)
    Parameters
    Type Name Description
    IndexReader r
    TaskScheduler executor
    Exceptions
    Type Condition
    ArgumentNullException

    r is null.

    IndexSearcher(IndexReaderContext)

    Creates a searcher searching the provided top-level IndexReaderContext.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public IndexSearcher(IndexReaderContext context)
    Parameters
    Type Name Description
    IndexReaderContext context
    Exceptions
    Type Condition
    ArgumentNullException

    context is null.

    See Also
    IndexReaderContext
    Context

    IndexSearcher(IndexReaderContext, TaskScheduler?)

    Creates a searcher searching the provided top-level IndexReaderContext.

    Given a non-nullTaskScheduler this method runs searches for each segment separately, using the provided TaskScheduler. IndexSearcher will not shutdown/awaitTermination this TaskScheduler on close; you must do so, eventually, on your own.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public IndexSearcher(IndexReaderContext context, TaskScheduler? executor)
    Parameters
    Type Name Description
    IndexReaderContext context
    TaskScheduler executor
    Exceptions
    Type Condition
    ArgumentNullException

    context is null.

    See Also
    IndexReaderContext
    Context

    IndexSearcher(IndexReaderContext, TaskScheduler?, bool)

    LUCENENET specific constructor that can be used by the subclasses to control whether the leaf slices are allocated in the base class or subclass.

    Declaration
    protected IndexSearcher(IndexReaderContext context, TaskScheduler? executor, bool allocateLeafSlices)
    Parameters
    Type Name Description
    IndexReaderContext context
    TaskScheduler executor
    bool allocateLeafSlices
    Remarks

    If executor is non-null and you choose to skip allocating the leaf slices (i.e. allocateLeafSlices == false), you must set the m_leafSlices field in your subclass constructor. This is commonly done by calling GetSlices(IList<AtomicReaderContext>) and using the result to set m_leafSlices. You may wish to do this if you have state to pass into your constructor and need to set it prior to the call to GetSlices(IList<AtomicReaderContext>) so it is available for use as a member field or property inside a custom override of GetSlices(IList<AtomicReaderContext>).

    Exceptions
    Type Condition
    ArgumentNullException

    context is null.

    Fields

    m_leafContexts

    Implements search over a single IndexReader.

    Applications usually need only call the inherited Search(Query, int) or Search(Query, Filter?, int) methods. For performance reasons, if your index is unchanging, you should share a single IndexSearcher instance across multiple searches instead of creating a new one per-search. If your index has changed and you wish to see the changes reflected in searching, you should use OpenIfChanged(DirectoryReader) to obtain a new reader and then create a new IndexSearcher from that. Also, for low-latency turnaround it's best to use a near-real-time reader (Open(IndexWriter, bool)). Once you have a new IndexReader, it's relatively cheap to create a new IndexSearcher from it.

    NOTE: IndexSearcher instances are completely thread safe, meaning multiple threads can call any of its methods, concurrently. If your application requires external synchronization, you should not synchronize on the IndexSearcher instance; use your own (non-Lucene) objects instead.

    Declaration
    protected readonly IList<AtomicReaderContext> m_leafContexts
    Field Value
    Type Description
    IList<AtomicReaderContext>

    m_leafSlices

    Used with executor - each slice holds a set of leafs executed within one thread

    Declaration
    protected readonly IndexSearcher.LeafSlice[]? m_leafSlices
    Field Value
    Type Description
    LeafSlice[]

    m_readerContext

    Implements search over a single IndexReader.

    Applications usually need only call the inherited Search(Query, int) or Search(Query, Filter?, int) methods. For performance reasons, if your index is unchanging, you should share a single IndexSearcher instance across multiple searches instead of creating a new one per-search. If your index has changed and you wish to see the changes reflected in searching, you should use OpenIfChanged(DirectoryReader) to obtain a new reader and then create a new IndexSearcher from that. Also, for low-latency turnaround it's best to use a near-real-time reader (Open(IndexWriter, bool)). Once you have a new IndexReader, it's relatively cheap to create a new IndexSearcher from it.

    NOTE: IndexSearcher instances are completely thread safe, meaning multiple threads can call any of its methods, concurrently. If your application requires external synchronization, you should not synchronize on the IndexSearcher instance; use your own (non-Lucene) objects instead.

    Declaration
    protected readonly IndexReaderContext m_readerContext
    Field Value
    Type Description
    IndexReaderContext

    Properties

    DefaultSimilarity

    Expert: returns a default Similarity instance. In general, this method is only called to initialize searchers and writers. User code and query implementations should respect Similarity.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    public static Similarity DefaultSimilarity { get; }
    Property Value
    Type Description
    Similarity

    IndexReader

    Return the IndexReader this searches.

    Declaration
    public virtual IndexReader IndexReader { get; }
    Property Value
    Type Description
    IndexReader

    Similarity

    Expert: Set the Similarity implementation used by this IndexSearcher.

    Declaration
    public virtual Similarity Similarity { get; set; }
    Property Value
    Type Description
    Similarity

    TopReaderContext

    Returns this searchers the top-level IndexReaderContext.

    Declaration
    public virtual IndexReaderContext TopReaderContext { get; }
    Property Value
    Type Description
    IndexReaderContext
    See Also
    Context

    Methods

    CollectionStatistics(string)

    Returns CollectionStatistics for a field.

    This can be overridden for example, to return a field's statistics across a distributed collection.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public virtual CollectionStatistics CollectionStatistics(string field)
    Parameters
    Type Name Description
    string field
    Returns
    Type Description
    CollectionStatistics

    CreateNormalizedWeight(Query)

    Creates a normalized weight for a top-level Query. The query is rewritten by this method and CreateWeight(IndexSearcher) called, afterwards the Weight is normalized. The returned Weight can then directly be used to get a Scorer.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    public virtual Weight CreateNormalizedWeight(Query query)
    Parameters
    Type Name Description
    Query query
    Returns
    Type Description
    Weight
    Exceptions
    Type Condition
    ArgumentNullException

    query is null.

    Doc(int)

    Sugar for

    .IndexReader.Document(docID)
    Declaration
    public virtual Document Doc(int docID)
    Parameters
    Type Name Description
    int docID
    Returns
    Type Description
    Document
    See Also
    Document(int)

    Doc(int, StoredFieldVisitor)

    Sugar for

    .IndexReader.Document(docID, fieldVisitor)
    Declaration
    public virtual void Doc(int docID, StoredFieldVisitor fieldVisitor)
    Parameters
    Type Name Description
    int docID
    StoredFieldVisitor fieldVisitor
    Exceptions
    Type Condition
    ArgumentNullException

    fieldVisitor is null.

    See Also
    Document(int, StoredFieldVisitor)

    Doc(int, ISet<string>?)

    Sugar for

    .IndexReader.Document(docID, fieldsToLoad)
    Declaration
    public virtual Document Doc(int docID, ISet<string>? fieldsToLoad)
    Parameters
    Type Name Description
    int docID
    ISet<string> fieldsToLoad
    Returns
    Type Description
    Document
    See Also
    Document(int, ISet<string>)

    Document(int, ISet<string>)

    Implements search over a single IndexReader.

    Applications usually need only call the inherited Search(Query, int) or Search(Query, Filter?, int) methods. For performance reasons, if your index is unchanging, you should share a single IndexSearcher instance across multiple searches instead of creating a new one per-search. If your index has changed and you wish to see the changes reflected in searching, you should use OpenIfChanged(DirectoryReader) to obtain a new reader and then create a new IndexSearcher from that. Also, for low-latency turnaround it's best to use a near-real-time reader (Open(IndexWriter, bool)). Once you have a new IndexReader, it's relatively cheap to create a new IndexSearcher from it.

    NOTE: IndexSearcher instances are completely thread safe, meaning multiple threads can call any of its methods, concurrently. If your application requires external synchronization, you should not synchronize on the IndexSearcher instance; use your own (non-Lucene) objects instead.

    Declaration
    [Obsolete("Use <seealso cref=#doc(int, java.util.Set)/> instead.")]
    public Document Document(int docID, ISet<string> fieldsToLoad)
    Parameters
    Type Name Description
    int docID
    ISet<string> fieldsToLoad
    Returns
    Type Description
    Document

    Explain(Query, int)

    Returns an Explanation that describes how doc scored against query.

    This is intended to be used in developing Similarity implementations, and, for good performance, should not be displayed with every hit. Computing an explanation is as expensive as executing the query over the entire index.
    Declaration
    public virtual Explanation Explain(Query query, int doc)
    Parameters
    Type Name Description
    Query query
    int doc
    Returns
    Type Description
    Explanation
    Exceptions
    Type Condition
    ArgumentNullException

    query is null.

    Explain(Weight, int)

    Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.

    This is intended to be used in developing Similarity implementations, and, for good performance, should not be displayed with every hit. Computing an explanation is as expensive as executing the query over the entire index.

    Applications should call Explain(Query, int).
    Declaration
    protected virtual Explanation Explain(Weight weight, int doc)
    Parameters
    Type Name Description
    Weight weight
    int doc
    Returns
    Type Description
    Explanation
    Exceptions
    Type Condition
    BooleanQuery.TooManyClausesException

    If a query would exceed MaxClauseCount clauses.

    ArgumentNullException

    weight is null.

    GetSlices(IList<AtomicReaderContext>)

    Expert: Creates an array of leaf slices each holding a subset of the given leaves. Each IndexSearcher.LeafSlice is executed in a single thread. By default there will be one IndexSearcher.LeafSlice per leaf (AtomicReaderContext).

    Declaration
    protected virtual IndexSearcher.LeafSlice[] GetSlices(IList<AtomicReaderContext> leaves)
    Parameters
    Type Name Description
    IList<AtomicReaderContext> leaves
    Returns
    Type Description
    LeafSlice[]
    Exceptions
    Type Condition
    ArgumentNullException

    leaves is null.

    Rewrite(Query)

    Expert: called to re-write queries into primitive queries.

    Declaration
    public virtual Query Rewrite(Query query)
    Parameters
    Type Name Description
    Query query
    Returns
    Type Description
    Query
    Exceptions
    Type Condition
    BooleanQuery.TooManyClausesException

    If a query would exceed MaxClauseCount clauses.

    ArgumentNullException

    query is null.

    Search(Query, Filter?, ICollector)

    Lower-level search API.

    Collect(int) is called for every matching document.
    Declaration
    public virtual void Search(Query query, Filter? filter, ICollector results)
    Parameters
    Type Name Description
    Query query

    To match documents

    Filter filter

    Ef non-null, used to permit documents to be collected.

    ICollector results

    To receive hits

    Exceptions
    Type Condition
    BooleanQuery.TooManyClausesException

    If a query would exceed MaxClauseCount clauses.

    ArgumentNullException

    query or results is null.

    Search(Query, Filter?, int)

    Finds the top n hits for query, applying filter if non-null.

    Declaration
    public virtual TopDocs Search(Query query, Filter? filter, int n)
    Parameters
    Type Name Description
    Query query
    Filter filter
    int n
    Returns
    Type Description
    TopDocs
    Exceptions
    Type Condition
    BooleanQuery.TooManyClausesException

    If a query would exceed MaxClauseCount clauses.

    Search(Query, Filter?, int, Sort)

    Search implementation with arbitrary sorting. Finds the top n hits for query, applying filter if non-null, and sorting the hits by the criteria in sort.

    NOTE: this does not compute scores by default; use Search(Query, Filter?, int, Sort, bool, bool) to control scoring.
    Declaration
    public virtual TopFieldDocs Search(Query query, Filter? filter, int n, Sort sort)
    Parameters
    Type Name Description
    Query query
    Filter filter
    int n
    Sort sort
    Returns
    Type Description
    TopFieldDocs
    Exceptions
    Type Condition
    BooleanQuery.TooManyClausesException

    If a query would exceed MaxClauseCount clauses.

    ArgumentNullException

    query or sort is null.

    Search(Query, Filter?, int, Sort, bool, bool)

    Search implementation with arbitrary sorting, plus control over whether hit scores and max score should be computed. Finds the top n hits for query, applying filter if non-null, and sorting the hits by the criteria in sort. If doDocScores is true then the score of each hit will be computed and returned. If doMaxScore is true then the maximum score over all collected hits will be computed.

    Declaration
    public virtual TopFieldDocs Search(Query query, Filter? filter, int n, Sort sort, bool doDocScores, bool doMaxScore)
    Parameters
    Type Name Description
    Query query
    Filter filter
    int n
    Sort sort
    bool doDocScores
    bool doMaxScore
    Returns
    Type Description
    TopFieldDocs
    Exceptions
    Type Condition
    BooleanQuery.TooManyClausesException

    If a query would exceed MaxClauseCount clauses.

    ArgumentNullException

    query or sort is null.

    Search(Query, ICollector)

    Lower-level search API.

    Collect(int) is called for every matching document.
    Declaration
    public virtual void Search(Query query, ICollector results)
    Parameters
    Type Name Description
    Query query
    ICollector results
    Exceptions
    Type Condition
    BooleanQuery.TooManyClausesException

    If a query would exceed MaxClauseCount clauses.

    ArgumentNullException

    query or results is null.

    Search(Query, int)

    Finds the top n hits for query.

    Declaration
    public virtual TopDocs Search(Query query, int n)
    Parameters
    Type Name Description
    Query query
    int n
    Returns
    Type Description
    TopDocs
    Exceptions
    Type Condition
    BooleanQuery.TooManyClausesException

    If a query would exceed MaxClauseCount clauses.

    ArgumentNullException

    query is null.

    Search(Query, int, Sort)

    Search implementation with arbitrary sorting and no filter.

    Declaration
    public virtual TopFieldDocs Search(Query query, int n, Sort sort)
    Parameters
    Type Name Description
    Query query

    The query to search for

    int n

    Return only the top n results

    Sort sort

    The Sort object

    Returns
    Type Description
    TopFieldDocs

    The top docs, sorted according to the supplied Sort instance

    Exceptions
    Type Condition
    IOException

    if there is a low-level I/O error

    ArgumentNullException

    query or sort is null.

    Search(Weight, FieldDoc?, int, Sort, bool, bool, bool)

    Just like Search(Weight, int, Sort, bool, bool), but you choose whether or not the fields in the returned FieldDoc instances should be set by specifying fillFields.

    Declaration
    protected virtual TopFieldDocs Search(Weight weight, FieldDoc? after, int nDocs, Sort sort, bool fillFields, bool doDocScores, bool doMaxScore)
    Parameters
    Type Name Description
    Weight weight
    FieldDoc after
    int nDocs
    Sort sort
    bool fillFields
    bool doDocScores
    bool doMaxScore
    Returns
    Type Description
    TopFieldDocs
    Exceptions
    Type Condition
    ArgumentNullException

    weight or sort is null.

    Search(Weight, ScoreDoc?, int)

    Expert: Low-level search implementation. Finds the top nDocs hits for query, applying filter if non-null.

    Applications should usually call Search(Query, int) or Search(Query, Filter?, int) instead.
    Declaration
    protected virtual TopDocs Search(Weight weight, ScoreDoc? after, int nDocs)
    Parameters
    Type Name Description
    Weight weight
    ScoreDoc after
    int nDocs
    Returns
    Type Description
    TopDocs
    Exceptions
    Type Condition
    BooleanQuery.TooManyClausesException

    If a query would exceed MaxClauseCount clauses.

    ArgumentNullException

    weight is null.

    Search(Weight, int, Sort, bool, bool)

    Expert: Low-level search implementation with arbitrary sorting and control over whether hit scores and max score should be computed. Finds the top nDocs hits for query and sorting the hits by the criteria in sort.

    Applications should usually call Search(Query, Filter?, int, Sort) instead.
    Declaration
    protected virtual TopFieldDocs Search(Weight weight, int nDocs, Sort sort, bool doDocScores, bool doMaxScore)
    Parameters
    Type Name Description
    Weight weight
    int nDocs
    Sort sort
    bool doDocScores
    bool doMaxScore
    Returns
    Type Description
    TopFieldDocs
    Exceptions
    Type Condition
    BooleanQuery.TooManyClausesException

    If a query would exceed MaxClauseCount clauses.

    ArgumentNullException

    weight or sort is null.

    Search(IList<AtomicReaderContext>, Weight, FieldDoc?, int, Sort, bool, bool, bool)

    Just like Search(Weight, int, Sort, bool, bool), but you choose whether or not the fields in the returned FieldDoc instances should be set by specifying fillFields.

    Declaration
    protected virtual TopFieldDocs Search(IList<AtomicReaderContext> leaves, Weight weight, FieldDoc? after, int nDocs, Sort sort, bool fillFields, bool doDocScores, bool doMaxScore)
    Parameters
    Type Name Description
    IList<AtomicReaderContext> leaves
    Weight weight
    FieldDoc after
    int nDocs
    Sort sort
    bool fillFields
    bool doDocScores
    bool doMaxScore
    Returns
    Type Description
    TopFieldDocs
    Exceptions
    Type Condition
    ArgumentNullException

    leaves or weight is null.

    Search(IList<AtomicReaderContext>, Weight, ICollector)

    Lower-level search API.

    Collect(int) is called for every document.

    NOTE: this method executes the searches on all given leaves exclusively. To search across all the searchers leaves use m_leafContexts.
    Declaration
    protected virtual void Search(IList<AtomicReaderContext> leaves, Weight weight, ICollector collector)
    Parameters
    Type Name Description
    IList<AtomicReaderContext> leaves

    The searchers leaves to execute the searches on

    Weight weight

    To match documents

    ICollector collector

    To receive hits

    Exceptions
    Type Condition
    BooleanQuery.TooManyClausesException

    If a query would exceed MaxClauseCount clauses.

    ArgumentNullException

    leaves, weight, or collector is null.

    Search(IList<AtomicReaderContext>, Weight, ScoreDoc?, int)

    Expert: Low-level search implementation. Finds the top

    n
    hits for query.

    Applications should usually call Search(Query, int) or Search(Query, Filter?, int) instead.
    Declaration
    protected virtual TopDocs Search(IList<AtomicReaderContext> leaves, Weight weight, ScoreDoc? after, int nDocs)
    Parameters
    Type Name Description
    IList<AtomicReaderContext> leaves
    Weight weight
    ScoreDoc after
    int nDocs
    Returns
    Type Description
    TopDocs
    Exceptions
    Type Condition
    BooleanQuery.TooManyClausesException

    If a query would exceed MaxClauseCount clauses.

    ArgumentNullException

    leaves or weight is null.

    SearchAfter(ScoreDoc?, Query, Filter?, int)

    Finds the top n hits for query, applying filter if non-null, where all results are after a previous result (after).

    By passing the bottom result from a previous page as after, this method can be used for efficient 'deep-paging' across potentially large result sets.
    Declaration
    public virtual TopDocs SearchAfter(ScoreDoc? after, Query query, Filter? filter, int n)
    Parameters
    Type Name Description
    ScoreDoc after
    Query query
    Filter filter
    int n
    Returns
    Type Description
    TopDocs
    Exceptions
    Type Condition
    BooleanQuery.TooManyClausesException

    If a query would exceed MaxClauseCount clauses.

    ArgumentNullException

    query is null.

    SearchAfter(ScoreDoc?, Query, Filter?, int, Sort)

    Finds the top n hits for query, applying filter if non-null, where all results are after a previous result (after).

    By passing the bottom result from a previous page as after, this method can be used for efficient 'deep-paging' across potentially large result sets.
    Declaration
    public virtual TopDocs SearchAfter(ScoreDoc? after, Query query, Filter? filter, int n, Sort sort)
    Parameters
    Type Name Description
    ScoreDoc after
    Query query
    Filter filter
    int n
    Sort sort
    Returns
    Type Description
    TopDocs
    Exceptions
    Type Condition
    BooleanQuery.TooManyClausesException

    If a query would exceed MaxClauseCount clauses.

    ArgumentNullException

    query or sort is null.

    SearchAfter(ScoreDoc?, Query, Filter?, int, Sort, bool, bool)

    Finds the top n hits for query where all results are after a previous result (after), allowing control over whether hit scores and max score should be computed.

    By passing the bottom result from a previous page as after, this method can be used for efficient 'deep-paging' across potentially large result sets. If doDocScores is true then the score of each hit will be computed and returned. If doMaxScore is true then the maximum score over all collected hits will be computed.
    Declaration
    public virtual TopDocs SearchAfter(ScoreDoc? after, Query query, Filter? filter, int n, Sort sort, bool doDocScores, bool doMaxScore)
    Parameters
    Type Name Description
    ScoreDoc after
    Query query
    Filter filter
    int n
    Sort sort
    bool doDocScores
    bool doMaxScore
    Returns
    Type Description
    TopDocs
    Exceptions
    Type Condition
    BooleanQuery.TooManyClausesException

    If a query would exceed MaxClauseCount clauses.

    ArgumentNullException

    query or sort is null.

    SearchAfter(ScoreDoc?, Query, int)

    Finds the top n hits for top query where all results are after a previous result (top after).

    By passing the bottom result from a previous page as after, this method can be used for efficient 'deep-paging' across potentially large result sets.
    Declaration
    public virtual TopDocs SearchAfter(ScoreDoc? after, Query query, int n)
    Parameters
    Type Name Description
    ScoreDoc after
    Query query
    int n
    Returns
    Type Description
    TopDocs
    Exceptions
    Type Condition
    BooleanQuery.TooManyClausesException

    If a query would exceed MaxClauseCount clauses.

    ArgumentNullException

    query is null.

    SearchAfter(ScoreDoc?, Query, int, Sort)

    Finds the top n hits for query where all results are after a previous result (after).

    By passing the bottom result from a previous page as after, this method can be used for efficient 'deep-paging' across potentially large result sets.
    Declaration
    public virtual TopDocs SearchAfter(ScoreDoc? after, Query query, int n, Sort sort)
    Parameters
    Type Name Description
    ScoreDoc after
    Query query
    int n
    Sort sort
    Returns
    Type Description
    TopDocs
    Exceptions
    Type Condition
    BooleanQuery.TooManyClausesException

    If a query would exceed MaxClauseCount clauses.

    ArgumentNullException

    query or sort is null.

    TermStatistics(Term, TermContext)

    Returns TermStatistics for a term.

    This can be overridden for example, to return a term's statistics across a distributed collection.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Declaration
    public virtual TermStatistics TermStatistics(Term term, TermContext context)
    Parameters
    Type Name Description
    Term term
    TermContext context
    Returns
    Type Description
    TermStatistics
    Exceptions
    Type Condition
    ArgumentNullException

    term or context is null.

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    object.ToString()

    WrapFilter(Query, Filter?)

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    protected virtual Query WrapFilter(Query query, Filter? filter)
    Parameters
    Type Name Description
    Query query
    Filter filter
    Returns
    Type Description
    Query
    Exceptions
    Type Condition
    ArgumentNullException

    query is null.

    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.