Lucene.Net  3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties
Public Member Functions | Properties | List of all members
Lucene.Net.Search.SpanQueryFilter Class Reference

Constrains search results to only match those which also match a provided query. Also provides position information about where each document matches at the cost of extra space compared with the QueryWrapperFilter. There is an added cost to this above what is stored in a QueryWrapperFilter. Namely, the position information for each matching document is stored. This filter does not cache. See the Lucene.Net.Search.CachingSpanFilter for a wrapper that caches. More...

Inherits Lucene.Net.Search.SpanFilter.

Public Member Functions

 SpanQueryFilter (SpanQuery query)
 Constructs a filter which only matches documents matching query.
 
override DocIdSet GetDocIdSet (IndexReader reader)
 
 
override 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.
 
override System.String ToString ()
 
override bool Equals (System.Object o)
 
override int GetHashCode ()
 

Properties

virtual SpanQuery Query [get]
 

Detailed Description

Constrains search results to only match those which also match a provided query. Also provides position information about where each document matches at the cost of extra space compared with the QueryWrapperFilter. There is an added cost to this above what is stored in a QueryWrapperFilter. Namely, the position information for each matching document is stored.

This filter does not cache. See the Lucene.Net.Search.CachingSpanFilter for a wrapper that caches.

<version> $Id:$ </version>

Definition at line 41 of file SpanQueryFilter.cs.

Constructor & Destructor Documentation

Lucene.Net.Search.SpanQueryFilter.SpanQueryFilter ( SpanQuery  query)

Constructs a filter which only matches documents matching query.

Parameters
queryThe Lucene.Net.Search.Spans.SpanQuery to use as the basis for the Filter.

Definition at line 54 of file SpanQueryFilter.cs.

Member Function Documentation

override SpanFilterResult Lucene.Net.Search.SpanQueryFilter.BitSpans ( IndexReader  reader)
virtual

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
readerThe Lucene.Net.Index.IndexReader to load position and DocIdSet information from
Returns
A SpanFilterResult

<throws> java.io.IOException if there was an issue accessing the necessary information </throws>

Implements Lucene.Net.Search.SpanFilter.

Definition at line 65 of file SpanQueryFilter.cs.

override bool Lucene.Net.Search.SpanQueryFilter.Equals ( System.Object  o)

Definition at line 99 of file SpanQueryFilter.cs.

override DocIdSet Lucene.Net.Search.SpanQueryFilter.GetDocIdSet ( IndexReader  reader)
virtual

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

Note: This method will be called once per segment in the index during searching. The returned DocIdSet must refer to document IDs for that segment, not for the top-level reader.

/summary>

Returns
a DocIdSet that provides the documents which should be permitted or prohibited in search results. NOTE: null can be returned if no documents will be accepted by this Filter.
Parameters
readerA IndexReader instance opened on the index currently searched on. Note, it is likely that the provided reader 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.
See Also
DocIdBitSet

Implements Lucene.Net.Search.Filter.

Definition at line 59 of file SpanQueryFilter.cs.

override int Lucene.Net.Search.SpanQueryFilter.GetHashCode ( )

Definition at line 104 of file SpanQueryFilter.cs.

override System.String Lucene.Net.Search.SpanQueryFilter.ToString ( )

Definition at line 94 of file SpanQueryFilter.cs.

Property Documentation

virtual SpanQuery Lucene.Net.Search.SpanQueryFilter.Query
get

Definition at line 90 of file SpanQueryFilter.cs.


The documentation for this class was generated from the following file: