lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <>
Subject [jira] Commented: (LUCENE-252) [PATCH] Problem with Sort logic on tokenized fields
Date Wed, 07 Mar 2007 23:01:24 GMT


Hoss Man commented on LUCENE-252:

FieldCacheImpl.getStringIndex already throws an exception if it detects it's being used on
a tokenized field (but i'm not sure if it does a perfect job of detecting that ... it seems
to make a naive assumption based on the number of terms) ... i'm guessing that check wasn't
in the code when this bug was initially filed.

I agree with Doug, silently using the stored field value if/when a field is tokenized is a
bad idea .. there is a seperate patch available for doing this that allows people to be much
more explicit about their intentions -- see (LUCENE-769)

> [PATCH] Problem with Sort logic on tokenized fields
> ---------------------------------------------------
>                 Key: LUCENE-252
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>    Affects Versions: 1.4
>         Environment: Operating System: other
> Platform: All
>            Reporter: Aviran Mordo
>         Assigned To: Lucene Developers
>         Attachments: dif.txt, FieldCacheImpl_Tokenized_fields_lucene_2.0.patch, FieldCacheImpl_Tokenized_fields_lucene_2.0_v1.1.patch,
> When you set s SortField to a Text field which gets tokenized
> FieldCacheImpl uses the term to do the sort, but then sorting is off 
> especially with more then one word in the field. I think it is much 
> more logical to sort by field's string value if the sort field is Tokenized and
> stored. This way you'll get the CORRECT sort order

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message