23 namespace Lucene.Net.Search.Function
50 private class AnonymousClassDocValues:
DocValues
52 public AnonymousClassDocValues(
float[] arr,
FloatFieldSource enclosingInstance)
54 InitBlock(arr, enclosingInstance);
59 this.enclosingInstance = enclosingInstance;
67 return enclosingInstance;
72 public override float FloatVal(
int doc)
77 public override System.String ToString(
int doc)
79 return Enclosing_Instance.
Description() +
'=' + arr[doc];
83 protected internal override object InnerArray
88 private Lucene.Net.Search.FloatParser parser;
96 public FloatFieldSource(System.String field, Lucene.Net.Search.FloatParser parser):base(field)
102 public override System.String Description()
104 return "float(" + base.Description() +
')';
110 float[] arr = cache.
GetFloats(reader, field, parser);
111 return new AnonymousClassDocValues(arr,
this);
122 return this.parser == null?other.parser == null:this.parser.GetType() == other.parser.GetType();
126 public override int CachedFieldSourceHashCode()
128 return parser == null?typeof(System.Single).GetHashCode():parser.GetType().GetHashCode();