lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <>
Subject Re: sorting issue with un-tokenized field
Date Wed, 17 Jan 2007 21:09:44 GMT
I'd look at a couple of things:

1> are you absolutely sure you didn't store bookTitles more than once? i.e.
doc = new DOcument();
doc.add(new Term("bookTitles", .....));
doc.add(new Term("bookTitles", .....));

2> When you built your index, did you append to an old one or replace it?
I'm wondering if you have what you think you do in your index (you can look
with Luke <G>)...

3> If you're really stuck, you could use termdocs/termenum to count your
terms and see what document has more than one entry and try to work

Hope this helps

On 1/17/07, moraleslos <> wrote:
> Oops, accidently pressed the ENTER key before doing anything  ;-)
> I have a field called "bookTitle" that I specified as UN_TOKENIZED and
> STORED in the index (i.e. keyword).  However, when I do a sort on this
> field
> during a search I get this error:
> Exception occurred during search: java.lang.RuntimeException: there are
> more
> terms than documents in field "bookTitles", but it's impossible to sort on
> tokenized fields
> My gut feeling on this is that some of my "bookTitles" are long, e.g. > 10
> words, although I'm not sure if this is the cause.  Again I don't
> tokenized
> this when storing in the index.  Any suggestions on how to sort this field
> (which is just a String field) w/o running into this RuntimeException?
> Thanks in advance!
> -los
> --
> View this message in context:
> Sent from the Lucene - Java Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message