lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbla...@telemadrid.es
Subject Re: there are more terms than documents in field <my sort field>
Date Wed, 23 Nov 2005 15:43:24 GMT





I think you are doing it right. Fields used for sorting must be Keyword
type. See you are not adding the Field more than once for the same
Document.

-----"Taylor, BE \(Beverley\)" <b.e.taylor@dl.ac.uk> escribió: -----


Para: <java-user@lucene.apache.org>
De: "Taylor, BE \(Beverley\)" <b.e.taylor@dl.ac.uk>
Fecha: 23/11/2005 16:04
Asunto: there are more terms than documents in field <my sort field>

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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message