Documentation of 'org.apache.lucene.search.SpanFilter' Java class
SpanFilter
org.apache.lucene.search

Class SpanFilter

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    CachingSpanFilter, SpanQueryFilter


    public abstract class SpanFilter
    extends Filter
    Abstract base class providing a mechanism to restrict searches to a subset of an index and also maintains and returns position information. This is useful if you want to compare the positions from a SpanQuery with the positions of items in a filter. For instance, if you had a SpanFilter that marked all the occurrences of the word "foo" in documents, and then you entered a new SpanQuery containing bar, you could not only filter by the word foo, but you could then compare position information for post processing.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      SpanFilter() 
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method and Description
      abstract SpanFilterResult bitSpans(IndexReader reader)
      Returns a SpanFilterResult with true for documents which should be permitted in search results, and false for those that should not and Spans for where the true docs match.
      • Methods inherited from class org.apache.lucene.search.Filter

        bits
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpanFilter

        public SpanFilter()
    • Method Detail

      • bitSpans

        public abstract SpanFilterResult bitSpans(IndexReader reader)
                                           throws java.io.IOException
        Returns a SpanFilterResult with true for documents which should be permitted in search results, and false for those that should not and Spans for where the true docs match.
        Parameters:
        reader - The IndexReader to load position and bitset information from
        Returns:
        A SpanFilterResult
        Throws:
        java.io.IOException - if there was an issue accessing the necessary information

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.