Hi Everyone,

I am very new to Lucene and am trying to perform a sort on a field
containing strings. I get the error message:

there are more terms than documents in field <my sort field> 

I have read through the same problem in the user group archives and the
replies usually ask the person if they are trying to sort on a tokenised
field, however, I can't see any further correspondence to say whether
they were or not and if they found a solution.

I create my index as below, where field is the field name I am trying to
sort and sortvalue is the text content of the field. From what I have
read, I think this is creating an index field which is stored but not
tokenised:

doc.add(Field.Keyword(field, sortvalue));

Does anyone know how to look into this problem further or can point me
in the direction of a solution?

Many thanks in anticipation,

Beverley Taylor


Reply via email to