23 namespace Lucene.Net.Search.Function
58 private class AnonymousClassDocValues:
DocValues
60 public AnonymousClassDocValues(
int[] arr,
OrdFieldSource enclosingInstance)
62 InitBlock(arr, enclosingInstance);
64 private void InitBlock(
int[] arr,
OrdFieldSource enclosingInstance)
67 this.enclosingInstance = enclosingInstance;
75 return enclosingInstance;
80 public override float FloatVal(
int doc)
82 return (
float) arr[doc];
85 public override System.String StrVal(
int doc)
88 return System.Convert.
ToString(arr[doc]);
91 public override System.String ToString(
int doc)
93 return Enclosing_Instance.Description() +
'=' + IntVal(doc);
97 protected internal override object InnerArray
102 protected internal System.String field;
113 public override System.String Description()
115 return "ord(" + field +
')';
121 int[] arr = Lucene.Net.Search.FieldCache_Fields.DEFAULT.GetStringIndex(reader, field).order;
122 return new AnonymousClassDocValues(arr,
this);
126 public override bool Equals(System.Object o)
131 return this.field.
Equals(other.field);
134 private static readonly
int hcode;
137 public override int GetHashCode()
139 return hcode + field.GetHashCode();