Hi,
I have an index which I generated with clucene where there is a float field.
This float field is stored as a simple verbatim character string.
The solr schema doc states that for such float fields:
<!-- numeric field types that store and index the text
value verbatim (and hence don't support range queries, since the
lexicographic ordering isn't equal to the numeric ordering) -->
And for sortable float fields:
<!-- Numeric field types that manipulate the value into
a string value that isn't human-readable in its internal form,
but with a lexicographic ordering the same as the numeric ordering,
so that range queries work correctly. -->
What does exactly means 'a string value that isn't human-readable in
its internal form' ?
Does that mean that such a field as to be indexed as a binary
representation of the number to allow the use of the sfloat type ?
I noticed that in the FloatField class, the method getSortField is like that:
public SortField getSortField(SchemaField field,boolean reverse) {
return new SortField(field.name,SortField.FLOAT, reverse);
}
It seems to return the right type of SortField.FLOAT adapted to my field.
In SortableFloatField,
public SortField getSortField(SchemaField field,boolean reverse) {
return getStringSort(field,reverse);
}
I'm not sure to understand all of this,
but what I feel is that since the type 'FloatField' gives that 'new
SortField(field.name,SortField.FLOAT)' , it should suits my verbatim
float data for sorting the query results.
Do I have the right feeling ?
thanks for your help
--
Jerome Eteve.
[EMAIL PROTECTED]
http://jerome.eteve.free.fr/