Beispiel #1
0
 /// <summary> Returns a comparator for sorting hits according to a field containing bytes.</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 comparatorByte(IndexReader reader, System.String fieldname, Lucene.Net.Search.ByteParser parser)
 {
     System.String field      = String.Intern(fieldname);
     sbyte[]       fieldOrder = Lucene.Net.Search.FieldCache_Fields.DEFAULT.GetBytes(reader, field, parser);
     return(new AnonymousClassScoreDocComparator(fieldOrder));
 }
 /// <summary> Creates a numeric range query using {@link FieldCache#GetBytes(IndexReader,String,FieldCache.ByteParser)}. This works with all
 /// byte 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 NewByteRange(System.String field, Lucene.Net.Search.ByteParser parser, System.Byte lowerVal, System.Byte upperVal, bool includeLower, bool includeUpper)
 {
     return(new AnonymousClassFieldCacheRangeFilter1(field, parser, lowerVal, upperVal, includeLower, includeUpper));
 }
Beispiel #3
0
 internal ByteComparator(int numHits, System.String field, Lucene.Net.Search.Parser parser)
 {
     values      = new sbyte[numHits];
     this.field  = field;
     this.parser = (ByteParser)parser;
 }
Beispiel #4
0
 /// <summary> Create a cached byte field source with a specific string-to-byte parser. </summary>
 public ByteFieldSource(System.String field, Lucene.Net.Search.ByteParser parser) : base(field)
 {
     this.parser = parser;
 }
Beispiel #5
0
 /// <summary> Creates a numeric range filter using <see cref="FieldCache.GetBytes(IndexReader,String,ByteParser)" />. This works with all
 /// byte 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 <sbyte?> NewByteRange(string field, Lucene.Net.Search.ByteParser parser, sbyte?lowerVal, sbyte?upperVal, bool includeLower, bool includeUpper)
 {
     return(new AnonymousClassFieldCacheRangeFilter1(field, parser, lowerVal, upperVal, includeLower, includeUpper));
 }
			internal ByteComparator(int numHits, System.String field, Lucene.Net.Search.Parser parser)
			{
				values = new sbyte[numHits];
				this.field = field;
				this.parser = (ByteParser) parser;
			}
Beispiel #7
0
		/// <summary> Create a cached byte field source with a specific string-to-byte parser. </summary>
		public ByteFieldSource(System.String field, Lucene.Net.Search.ByteParser parser):base(field)
		{
			this.parser = parser;
		}