A {@link Filter} that only accepts numeric values within a specified range. To use this, you must first index the numeric values using {@link NumericField} (expert: {@link NumericTokenStream}).

You create a new NumericRangeFilter with the static factory methods, eg:

            Filter f = NumericRangeFilter.newFloatRange("weight",
            new Float(0.3f), new Float(0.10f),
            true, true);
            
accepts all documents whose float valued "weight" field ranges from 0.3 to 0.10, inclusive. See {@link NumericRangeQuery} for details on how Lucene indexes and searches numeric valued fields.

NOTE: This API is experimental and might change in incompatible ways in the next release.

Namespace: Lucene.Net.Search
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
[SerializableAttribute]
public sealed class NumericRangeFilter : MultiTermQueryWrapperFilter
Visual Basic
<SerializableAttribute> _
Public NotInheritable Class NumericRangeFilter _
	Inherits MultiTermQueryWrapperFilter
Visual C++
[SerializableAttribute]
public ref class NumericRangeFilter sealed : public MultiTermQueryWrapperFilter

Inheritance Hierarchy

System..::..Object
  Lucene.Net.Search..::..Filter
    Lucene.Net.Search..::..MultiTermQueryWrapperFilter
      Lucene.Net.Search..::..NumericRangeFilter

See Also