23 namespace Lucene.Net.Search.Function
50 private class AnonymousClassDocValues:
DocValues
52 public AnonymousClassDocValues(
int[] arr,
IntFieldSource enclosingInstance)
54 InitBlock(arr, enclosingInstance);
56 private void InitBlock(
int[] arr,
IntFieldSource enclosingInstance)
59 this.enclosingInstance = enclosingInstance;
67 return enclosingInstance;
72 public override float FloatVal(
int doc)
74 return (
float) arr[doc];
77 public override int IntVal(
int doc)
82 public override System.String ToString(
int doc)
84 return Enclosing_Instance.
Description() +
'=' + IntVal(doc);
88 protected internal override object InnerArray
93 private Lucene.Net.Search.IntParser parser;
101 public IntFieldSource(System.String field, Lucene.Net.Search.IntParser parser):base(field)
103 this.parser = parser;
107 public override System.String Description()
109 return "int(" + base.Description() +
')';
115 int[] arr = cache.
GetInts(reader, field, parser);
116 return new AnonymousClassDocValues(arr,
this);
127 return this.parser == null?other.parser == null:this.parser.GetType() == other.parser.GetType();
131 public override int CachedFieldSourceHashCode()
133 return parser == null?typeof(System.Int32).GetHashCode():parser.GetType().GetHashCode();