Class FieldValueFilter
A Filter that accepts all documents that have one or more values in a given field. this Filter request IBits from the IFieldCache and build the bits if not present.
Inherited Members
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.dll
Syntax
public class FieldValueFilter : Filter
Constructors
FieldValueFilter(string)
Creates a new FieldValueFilter
Declaration
public FieldValueFilter(string field)
Parameters
Type | Name | Description |
---|---|---|
string | field | The field to filter |
FieldValueFilter(string, bool)
Creates a new FieldValueFilter
Declaration
public FieldValueFilter(string field, bool negate)
Parameters
Type | Name | Description |
---|---|---|
string | field | The field to filter |
bool | negate | If |
Properties
Field
Returns the field this filter is applied on.
Declaration
public virtual string Field { get; }
Property Value
Type | Description |
---|---|
string | The field this filter is applied on. |
Negate
Returns true
if this filter is negated, otherwise false
Declaration
public virtual bool Negate { get; }
Property Value
Type | Description |
---|---|
bool |
|
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
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. |