23 namespace Lucene.Net.Search.Function
59 private class AnonymousClassDocValues:
DocValues
63 InitBlock(end, arr, enclosingInstance);
69 this.enclosingInstance = enclosingInstance;
78 return enclosingInstance;
83 public override float FloatVal(
int doc)
85 return (
float) (end - arr[doc]);
88 public override int IntVal(
int doc)
90 return end - arr[doc];
93 public override System.String StrVal(
int doc)
96 return System.Convert.
ToString(IntVal(doc));
99 public override System.String ToString(
int doc)
101 return Enclosing_Instance.Description() +
'=' + StrVal(doc);
105 protected internal override object InnerArray
121 public override System.String Description()
123 return "rord(" + field +
')';
129 Lucene.Net.Search.StringIndex sindex = Lucene.Net.Search.FieldCache_Fields.DEFAULT.GetStringIndex(reader, field);
131 int[] arr = sindex.order;
132 int end = sindex.lookup.Length;
134 return new AnonymousClassDocValues(end, arr,
this);
138 public override bool Equals(System.Object o)
146 private static readonly
int hcode;
149 public override int GetHashCode()
151 return hcode + field.GetHashCode();