Can somebody take a look in why I'm not getting the correct alphabetical
I changed last_name field to be 'UN_TOKENIZED' and sorting on only last
name, then network status. But with last name as 'J' in query, I am getting
I would expect 'JAHN' to come before 'johnson'.
can somebody suggest wht's going wrong here.
> I am doing custom sorting within lucene using overloaded
> searcher.search(query, sort). First precedence is to sort based on 'last
> name' and then on 'network status', where 'INN' is better than 'OUT'.
> Fields are stored in the indexes like this:
> FIRST_NAME(Field.Store.NO, Field.Index.NO_NORMS)
> LAST_NAME_EXACT(Field.Store.NO, Field.Index.NO_NORMS)
> And analyzer used is 'keyword analyzer' on these fields. And the fields
> are sorted with following lines.
> ArrayList<SortField> sorts = new ArrayList<SortField>();
> sorts.add(new SortField("LAST_NAME_EXACT"));
> sorts.add(new SortField(ProviderFieldInfo.NETWORK.toString(),
> super.setSort(sorts.toArray(new SortField[sorts.size()]));
> Now, with the above line my expectation is to see 'last name' sorted
> alphabatically and then if two 'last names' are same then 'network
> status(INN/OUT)' must get precedence and if both 'network status' and
> 'last name' are same then socre will decide the order. Is this expectation
> The result I'm getting is in this order: The query used is a prefix query,
> where 'last name' entered is 'john' and first name is 'p'.
> JOHNSON, PETER A INN
> JOHNSON, PETER B INN
> JOHNSON, PEGGY A OUT
> JOHNSON, PHILLIP W INN
> JOHNSON-STUHR, PAMELA J OUT
> JOHN, P G INN
> JOHNSON, PAUL G INN
> JOHNSON, PETER R INN
> Can somebody take alook and see what should be done to get expected
View this message in context:
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
To unsubscribe, e-mail: java-user-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: java-user-help@xxxxxxxxxxxxxxxxx