Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class DuplicateFilter

    Filter to remove duplicate values from search results.

    WARNING: for this to work correctly, you may have to wrap your reader as it cannot current deduplicate across different index segments.
    Inheritance
    object
    Filter
    DuplicateFilter
    Inherited Members
    Filter.NewAnonymous(Func<AtomicReaderContext, IBits, DocIdSet>)
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Sandbox.Queries
    Assembly: Lucene.Net.Sandbox.dll
    Syntax
    public class DuplicateFilter : Filter

    Constructors

    DuplicateFilter(string)

    Filter to remove duplicate values from search results.

    WARNING: for this to work correctly, you may have to wrap your reader as it cannot current deduplicate across different index segments.
    Declaration
    public DuplicateFilter(string fieldName)
    Parameters
    Type Name Description
    string fieldName
    See Also
    SlowCompositeReaderWrapper

    DuplicateFilter(string, KeepMode, ProcessingMode)

    Filter to remove duplicate values from search results.

    WARNING: for this to work correctly, you may have to wrap your reader as it cannot current deduplicate across different index segments.
    Declaration
    public DuplicateFilter(string fieldName, KeepMode keepMode, ProcessingMode processingMode)
    Parameters
    Type Name Description
    string fieldName
    KeepMode keepMode
    ProcessingMode processingMode
    See Also
    SlowCompositeReaderWrapper

    Properties

    FieldName

    Filter to remove duplicate values from search results.

    WARNING: for this to work correctly, you may have to wrap your reader as it cannot current deduplicate across different index segments.
    Declaration
    public virtual string FieldName { get; set; }
    Property Value
    Type Description
    string
    See Also
    SlowCompositeReaderWrapper

    KeepMode

    Filter to remove duplicate values from search results.

    WARNING: for this to work correctly, you may have to wrap your reader as it cannot current deduplicate across different index segments.
    Declaration
    public KeepMode KeepMode { get; set; }
    Property Value
    Type Description
    KeepMode
    See Also
    SlowCompositeReaderWrapper

    ProcessingMode

    Filter to remove duplicate values from search results.

    WARNING: for this to work correctly, you may have to wrap your reader as it cannot current deduplicate across different index segments.
    Declaration
    public ProcessingMode ProcessingMode { get; set; }
    Property Value
    Type Description
    ProcessingMode
    See Also
    SlowCompositeReaderWrapper

    Methods

    Equals(object)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current object.

    Returns
    Type Description
    bool

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    object.Equals(object)
    See Also
    SlowCompositeReaderWrapper

    GetDocIdSet(AtomicReaderContext, IBits)

    Creates a Lucene.Net.Search.DocIdSet enumerating the documents that should be permitted in search results. NOTE:null can be returned if no documents are accepted by this Lucene.Net.Search.Filter.

    Note: this method will be called once per segment in the index during searching. The returned Lucene.Net.Search.DocIdSet must refer to document IDs for that segment, not for the top-level reader.
    Declaration
    public override DocIdSet GetDocIdSet(AtomicReaderContext context, IBits acceptDocs)
    Parameters
    Type Name Description
    AtomicReaderContext context

    a Lucene.Net.Index.AtomicReaderContext instance opened on the index currently searched on. Note, it is likely that the provided reader info does not represent the whole underlying index i.e. if the index has more than one segment the given reader only represents a single segment. The provided context is always an atomic context, so you can call Lucene.Net.Index.AtomicReader.Fields on the context's reader, for example.

    IBits acceptDocs

    Lucene.Net.Util.IBits that represent the allowable docs to match (typically deleted docs but possibly filtering other documents)

    Returns
    Type Description
    DocIdSet

    A Lucene.Net.Search.DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE:null should be returned if the filter doesn't accept any documents otherwise internal optimization might not apply in the case an emptyLucene.Net.Search.DocIdSet is returned.

    Overrides
    Lucene.Net.Search.Filter.GetDocIdSet(Lucene.Net.Index.AtomicReaderContext, Lucene.Net.Util.IBits)
    See Also
    SlowCompositeReaderWrapper

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    object.GetHashCode()
    See Also
    SlowCompositeReaderWrapper

    See Also

    SlowCompositeReaderWrapper
    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.