Suppose I have a book index with field="publisher", field="title", etc.
If a user has bought Manning books, then I like to sort the result with Manning
books listed first.
In essence, I'm asking for a parameterized custom sorting. Is there a way to do
this?
Thanks,
-James
-
Hi James,
Check out the org.apache.lucene.search.package, there are several sort
classes that will let you write a custom sorter. If you have a copy
of LIA, look at chapter 6 for an example (
http://www.lucenebook.com/search?query=custom+sort+section%3A6* )
Otis
--- James Huang <[EMAIL PROTECT
Hi Otis,
Thanks for your answer. I do have LIA (but not with me
now physically), and have the impression that the
search ordering is predetermined (at index time); what
I want is search-time ordering, e.g.,
"I'm at (x,y) now and low on gas; find me the closest
airports that can land 747, the clos