Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class FacetsCollector

    Collects hits for subsequent faceting. Once you've run a search and collect hits into this, instantiate one of the Lucene.Net.Search.ICollector subclasses to do the facet counting. Use the Search utility methods (such as Search(IndexSearcher, Query, Int32, ICollector)) to perform an "ordinary" search but also collect into a Facets.

    Inheritance
    System.Object
    FacetsCollector
    RandomSamplingFacetsCollector
    Implements
    Lucene.Net.Search.ICollector
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Lucene.Net.Facet
    Assembly: Lucene.Net.Facet.dll
    Syntax
    public class FacetsCollector : ICollector

    Constructors

    | Improve this Doc View Source

    FacetsCollector()

    Default constructor

    Declaration
    public FacetsCollector()
    | Improve this Doc View Source

    FacetsCollector(Boolean)

    Create this; if keepScores is true then a float[] is allocated to hold score of all hits.

    Declaration
    public FacetsCollector(bool keepScores)
    Parameters
    Type Name Description
    System.Boolean keepScores

    Properties

    | Improve this Doc View Source

    AcceptsDocsOutOfOrder

    Declaration
    public bool AcceptsDocsOutOfOrder { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    KeepScores

    True if scores were saved.

    Declaration
    public bool KeepScores { get; }
    Property Value
    Type Description
    System.Boolean

    Methods

    | Improve this Doc View Source

    Collect(Int32)

    Declaration
    public void Collect(int doc)
    Parameters
    Type Name Description
    System.Int32 doc
    | Improve this Doc View Source

    CreateDocs(Int32)

    Creates a FacetsCollector.Docs to record hits. The default uses Lucene.Net.Util.FixedBitSet to record hits and you can override to e.g. record the docs in your own Lucene.Net.Search.DocIdSet.

    Declaration
    protected virtual FacetsCollector.Docs CreateDocs(int maxDoc)
    Parameters
    Type Name Description
    System.Int32 maxDoc
    Returns
    Type Description
    FacetsCollector.Docs
    | Improve this Doc View Source

    GetMatchingDocs()

    Returns the documents matched by the query, one FacetsCollector.MatchingDocs per visited segment.

    Declaration
    public virtual IList<FacetsCollector.MatchingDocs> GetMatchingDocs()
    Returns
    Type Description
    System.Collections.Generic.IList<FacetsCollector.MatchingDocs>
    | Improve this Doc View Source

    Search(IndexSearcher, Query, Filter, Int32, ICollector)

    Utility method, to search and also collect all hits into the provided Lucene.Net.Search.ICollector.

    Declaration
    public static TopDocs Search(IndexSearcher searcher, Query q, Filter filter, int n, ICollector fc)
    Parameters
    Type Name Description
    Lucene.Net.Search.IndexSearcher searcher
    Lucene.Net.Search.Query q
    Lucene.Net.Search.Filter filter
    System.Int32 n
    Lucene.Net.Search.ICollector fc
    Returns
    Type Description
    Lucene.Net.Search.TopDocs
    | Improve this Doc View Source

    Search(IndexSearcher, Query, Filter, Int32, Sort, ICollector)

    Utility method, to search and also collect all hits into the provided Lucene.Net.Search.ICollector.

    Declaration
    public static TopFieldDocs Search(IndexSearcher searcher, Query q, Filter filter, int n, Sort sort, ICollector fc)
    Parameters
    Type Name Description
    Lucene.Net.Search.IndexSearcher searcher
    Lucene.Net.Search.Query q
    Lucene.Net.Search.Filter filter
    System.Int32 n
    Lucene.Net.Search.Sort sort
    Lucene.Net.Search.ICollector fc
    Returns
    Type Description
    Lucene.Net.Search.TopFieldDocs
    | Improve this Doc View Source

    Search(IndexSearcher, Query, Filter, Int32, Sort, Boolean, Boolean, ICollector)

    Utility method, to search and also collect all hits into the provided Lucene.Net.Search.ICollector.

    Declaration
    public static TopFieldDocs Search(IndexSearcher searcher, Query q, Filter filter, int n, Sort sort, bool doDocScores, bool doMaxScore, ICollector fc)
    Parameters
    Type Name Description
    Lucene.Net.Search.IndexSearcher searcher
    Lucene.Net.Search.Query q
    Lucene.Net.Search.Filter filter
    System.Int32 n
    Lucene.Net.Search.Sort sort
    System.Boolean doDocScores
    System.Boolean doMaxScore
    Lucene.Net.Search.ICollector fc
    Returns
    Type Description
    Lucene.Net.Search.TopFieldDocs
    | Improve this Doc View Source

    Search(IndexSearcher, Query, Int32, ICollector)

    Utility method, to search and also collect all hits into the provided Lucene.Net.Search.ICollector.

    Declaration
    public static TopDocs Search(IndexSearcher searcher, Query q, int n, ICollector fc)
    Parameters
    Type Name Description
    Lucene.Net.Search.IndexSearcher searcher
    Lucene.Net.Search.Query q
    System.Int32 n
    Lucene.Net.Search.ICollector fc
    Returns
    Type Description
    Lucene.Net.Search.TopDocs
    | Improve this Doc View Source

    SearchAfter(IndexSearcher, ScoreDoc, Query, Filter, Int32, ICollector)

    Utility method, to search and also collect all hits into the provided Lucene.Net.Search.ICollector.

    Declaration
    public static TopDocs SearchAfter(IndexSearcher searcher, ScoreDoc after, Query q, Filter filter, int n, ICollector fc)
    Parameters
    Type Name Description
    Lucene.Net.Search.IndexSearcher searcher
    Lucene.Net.Search.ScoreDoc after
    Lucene.Net.Search.Query q
    Lucene.Net.Search.Filter filter
    System.Int32 n
    Lucene.Net.Search.ICollector fc
    Returns
    Type Description
    Lucene.Net.Search.TopDocs
    | Improve this Doc View Source

    SearchAfter(IndexSearcher, ScoreDoc, Query, Filter, Int32, Sort, ICollector)

    Utility method, to search and also collect all hits into the provided Lucene.Net.Search.ICollector.

    Declaration
    public static TopDocs SearchAfter(IndexSearcher searcher, ScoreDoc after, Query q, Filter filter, int n, Sort sort, ICollector fc)
    Parameters
    Type Name Description
    Lucene.Net.Search.IndexSearcher searcher
    Lucene.Net.Search.ScoreDoc after
    Lucene.Net.Search.Query q
    Lucene.Net.Search.Filter filter
    System.Int32 n
    Lucene.Net.Search.Sort sort
    Lucene.Net.Search.ICollector fc
    Returns
    Type Description
    Lucene.Net.Search.TopDocs
    | Improve this Doc View Source

    SearchAfter(IndexSearcher, ScoreDoc, Query, Filter, Int32, Sort, Boolean, Boolean, ICollector)

    Utility method, to search and also collect all hits into the provided Lucene.Net.Search.ICollector.

    Declaration
    public static TopDocs SearchAfter(IndexSearcher searcher, ScoreDoc after, Query q, Filter filter, int n, Sort sort, bool doDocScores, bool doMaxScore, ICollector fc)
    Parameters
    Type Name Description
    Lucene.Net.Search.IndexSearcher searcher
    Lucene.Net.Search.ScoreDoc after
    Lucene.Net.Search.Query q
    Lucene.Net.Search.Filter filter
    System.Int32 n
    Lucene.Net.Search.Sort sort
    System.Boolean doDocScores
    System.Boolean doMaxScore
    Lucene.Net.Search.ICollector fc
    Returns
    Type Description
    Lucene.Net.Search.TopDocs
    | Improve this Doc View Source

    SearchAfter(IndexSearcher, ScoreDoc, Query, Int32, ICollector)

    Utility method, to search and also collect all hits into the provided Lucene.Net.Search.ICollector.

    Declaration
    public virtual TopDocs SearchAfter(IndexSearcher searcher, ScoreDoc after, Query q, int n, ICollector fc)
    Parameters
    Type Name Description
    Lucene.Net.Search.IndexSearcher searcher
    Lucene.Net.Search.ScoreDoc after
    Lucene.Net.Search.Query q
    System.Int32 n
    Lucene.Net.Search.ICollector fc
    Returns
    Type Description
    Lucene.Net.Search.TopDocs
    | Improve this Doc View Source

    SetNextReader(AtomicReaderContext)

    Declaration
    public void SetNextReader(AtomicReaderContext context)
    Parameters
    Type Name Description
    Lucene.Net.Index.AtomicReaderContext context
    | Improve this Doc View Source

    SetScorer(Scorer)

    Declaration
    public void SetScorer(Scorer scorer)
    Parameters
    Type Name Description
    Lucene.Net.Search.Scorer scorer

    Implements

    Lucene.Net.Search.ICollector
    • Improve this Doc
    • View Source
    Back to top Copyright © 2022 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.