23 namespace Lucene.Net.Search.Function
50 private class AnonymousClassDocValues:
DocValues
52 public AnonymousClassDocValues(
short[] arr,
ShortFieldSource enclosingInstance)
54 InitBlock(arr, 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.ShortParser parser;
101 public ShortFieldSource(System.String field, Lucene.Net.Search.ShortParser parser):base(field)
103 this.parser = parser;
107 public override System.String Description()
109 return "short(" + base.Description() +
')';
115 short[] arr = cache.
GetShorts(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.Int16).GetHashCode():parser.GetType().GetHashCode();