Thanks.. but how do I know whether the filed is tokenized or not?
I just used code to sort below:
....
Query query =QueryParser.parse(contents, title, new StandardAnalyzer());
booleanQuery.add(query, true, false);
....
hits= searcher.search(booleanQuery,new Sort("operatingName"));
......
operatingName field contains name of stores. other fields contains a single
word or numbers. Those are ok. But this filed contains words. Once I sort
on this filed, it doesn't give me proper result. Like you told me, it seems
tokenize name of stores and sort it. How can I solve this problem?
Erik Hatcher wrote:
>
> Thie is probably due to you sorting by a tokenized field. Be sure
> you are sorting on an untokenized field!
>
> Erik
>
> On Dec 21, 2006, at 10:00 AM, wawa wrote:
>
>>
>> I have some problem to sort words. Somehow it sorts in strange
>> way. sort
>> result is below:
>>
>> ...
>> BILLIARD & CAFE
>> BIZIM CAFE
>> BOLSA CAFE BIDA
>> BONAMICO CAFE
>> BONESSIMO CAFE
>> CAFE BAR AZZURRI
>> A BICA CAFE
>> ATRIUM CAFE
>> CAFE 668
>> THE APPLE CAFE
>> .....
>>
>> Is there any way to sort properly?
>>
>>
>> --
>> View this message in context: http://www.nabble.com/Sorting-words-
>> tf2865974.html#a8009240
>> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Sorting-words-tf2865974.html#a8009973
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]