Class QueryWrapperFilter
Constrains search results to only match those which also match a provided query.
This could be used, for example, with a NumericRangeQuery on a suitably formatted date field to implement date filtering. One could re-use a singleCachingWrapperFilter(QueryWrapperFilter)
that matches, e.g., only documents modified
within the last week. This would only need to be reconstructed once per day.
Inherited Members
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.dll
Syntax
public class QueryWrapperFilter : Filter
Constructors
QueryWrapperFilter(Query)
Constructs a filter which only matches documents matching
query
.
Declaration
public QueryWrapperFilter(Query query)
Parameters
Type | Name | Description |
---|---|---|
Query | query |
Properties
Query
Returns the inner Query
Declaration
public Query Query { get; }
Property Value
Type | Description |
---|---|
Query |
Methods
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object o)
Parameters
Type | Name | Description |
---|---|---|
object | o |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
GetDocIdSet(AtomicReaderContext, IBits)
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.
Declaration
public override DocIdSet GetDocIdSet(AtomicReaderContext context, IBits acceptDocs)
Parameters
Type | Name | Description |
---|---|---|
AtomicReaderContext | context | a 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 Fields on the context's reader, for example. |
IBits | acceptDocs | IBits that represent the allowable docs to match (typically deleted docs but possibly filtering other documents) |
Returns
Type | Description |
---|---|
DocIdSet | A DocIdSet that provides the documents which should be permitted or
prohibited in search results. NOTE: |
Overrides
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
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. |