20 namespace Lucene.Net.Search.Function
81 public static readonly
Type BYTE =
new Type(
"byte");
84 public static readonly
Type SHORT =
new Type(
"short");
87 public static readonly
Type INT =
new Type(
"int");
90 public static readonly
Type FLOAT =
new Type(
"float");
92 private System.String typeName;
93 internal Type(System.String name)
98 public override System.String ToString()
100 return GetType().FullName +
"::" + typeName;
118 private static ValueSource GetValueSource(System.String field, Type type)
120 if (type == Type.BYTE)
124 if (type == Type.SHORT)
126 return new ShortFieldSource(field);
128 if (type == Type.INT)
130 return new IntFieldSource(field);
132 if (type == Type.FLOAT)
134 return new FloatFieldSource(field);
136 throw new System.ArgumentException(type +
" is not a known Field Score Query Type!");