FAQ
Hi,

I have this exception there are more terms than documents in field
"Title", but it's impossible to sort on tokenized fields.

I'm try to sort the result by Title and the field title is un_tokenized
and it has only one term such as document, 06, rational, etc, and some other
fields have tokenized.

The query that I build is something like that: documentName:a or
documentDescription:a or contents:a etc, sort = new Sort("Title"); then
searcHits = searcher.search(query,sort);

I don't know why I get this error message, anyone can help?

Thank you.

--
View this message in context: http://www.nabble.com/search-results-with-sort-tf4413911.html#a12590769
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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

Search Discussions

  • Chris Hostetter at Sep 13, 2007 at 7:34 pm
    : I have this exception there are more terms than documents in field
    : "Title", but it's impossible to sort on tokenized fields.
    :
    : I'm try to sort the result by Title and the field title is un_tokenized
    : and it has only one term such as document, 06, rational, etc, and some other
    : fields have tokenized.

    if you are getting that exception, then i'm 99% certain you have at least
    one doc in your index that either:
    a) has multiple values for the Title field
    b) has a Title field that was added as TOKENIZED

    ... the only possible way i can think of for the code path that
    generates that error to be triggered is in one of those situations ...
    perhaps you changed your code at some point and didn't remove all the old
    documents from your index?



    -Hoss


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Spinergywmy at Sep 14, 2007 at 1:52 am
    Hi,

    Thanks.

    However, I tested with more terms in title field, for instance, lucene
    sort, abc_def, and that works.

    I deleted the old index file and re-index the whole documents again, and
    it works fine. So, I'm little bit confuse about how that really work.

    Please advise.
    --
    View this message in context: http://www.nabble.com/search-results-with-sort-tf4413911.html#a12667066
    Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedSep 10, '07 at 11:15a
activeSep 14, '07 at 1:52a
posts3
users2
websitelucene.apache.org

2 users in discussion

Spinergywmy: 2 posts Chris Hostetter: 1 post

People

Translate

site design / logo © 2022 Grokbase