/// <summary> Returns a comparator for sorting hits according to a field containing integers.</summary> /// <param name="reader"> Index to use. /// </param> /// <param name="fieldname"> Fieldable containing integer values. /// </param> /// <returns> Comparator for sorting hits. /// </returns> /// <throws> IOException If an error occurs reading the index. </throws> internal static ScoreDocComparator comparatorInt(IndexReader reader, System.String fieldname, Lucene.Net.Search.IntParser parser) { System.String field = String.Intern(fieldname); int[] fieldOrder = Lucene.Net.Search.FieldCache_Fields.DEFAULT.GetInts(reader, field, parser); return(new AnonymousClassScoreDocComparator2(fieldOrder)); }
/// <summary> Creates a numeric range query using {@link FieldCache#GetInts(IndexReader,String,FieldCache.IntParser)}. This works with all /// int fields containing exactly one numeric term in the field. The range can be half-open by setting one /// of the values to <code>null</code>. /// </summary> public static FieldCacheRangeFilter NewIntRange(System.String field, Lucene.Net.Search.IntParser parser, System.ValueType lowerVal, System.ValueType upperVal, bool includeLower, bool includeUpper) { return(new AnonymousClassFieldCacheRangeFilter3(field, parser, lowerVal, upperVal, includeLower, includeUpper)); }
private int bottom; // Value of bottom of queue internal IntComparator(int numHits, System.String field, Lucene.Net.Search.Parser parser) { values = new int[numHits]; this.field = field; this.parser = (IntParser)parser; }
/// <summary> Create a cached int field source with a specific string-to-int parser. </summary> public IntFieldSource(string field, Lucene.Net.Search.IntParser parser) : base(field) { this.parser = parser; }
/// <summary> Creates a numeric range query using <see cref="FieldCache.GetInts(IndexReader,String,IntParser)" />. This works with all /// int fields containing exactly one numeric term in the field. The range can be half-open by setting one /// of the values to <c>null</c>. /// </summary> public static FieldCacheRangeFilter <int?> NewIntRange(string field, Lucene.Net.Search.IntParser parser, int?lowerVal, int?upperVal, bool includeLower, bool includeUpper) { return(new AnonymousClassFieldCacheRangeFilter3(field, parser, lowerVal, upperVal, includeLower, includeUpper)); }
private int bottom; // Value of bottom of queue internal IntComparator(int numHits, System.String field, Lucene.Net.Search.Parser parser) { values = new int[numHits]; this.field = field; this.parser = (IntParser) parser; }
/// <summary> Create a cached int field source with a specific string-to-int parser. </summary> public IntFieldSource(System.String field, Lucene.Net.Search.IntParser parser):base(field) { this.parser = parser; }