I don't remember the syntax right now, but how about giving a boost to certain fields, either while indexing or while searching ?
Patrick On 10/30/06, Amit Soni <[EMAIL PROTECTED]> wrote:
Hi Erick, Thanks for the reply. Actually the priorities mean when i search for example for cancer then in the result if get the result in order like 1. it appears in title 2. it appears in keywords 3. it appears in synonyms. But right now with the default implementation when i search for query 'cancer' then for say document range 1 to 10 i got 9th result which contains given 'cancer' query appears in synonyms field while in 10th result the 'cancer' query appears in keyword field . But actually i want 10th result before 9th. So i can do the same using Sort class. Or i can do the same with anything else. I hope you understand want i want to ask. Thanks, Amit Soni Erick Erickson wrote: > I think what you want is IndexSearcher.search(Query, Filter, Sort). > Filter may be null, and Sort is a Sort object that allows you to sort > on multiple fields at once, which I assume is what you mane by > "priorities". > > Read the cautions about memory usage for a Sort object though. > > Best > Erick > > On 10/30/06, *Amit Soni* < [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Hi list. > > I am using lucene search for one of my site search. In which i am > fetching values from the database and then index it. > > The fields which the docuement contains is: > 1. hwid > 2. title > 3. author > 4. keywords > 5. synonyms > > Now i want the search result should be as per the following > priorities > 1. title > 2. keywords > 3. synonyms > > But right now it is in some different priorities. So if some one > has and > idean regarding this then please let me know. > > Thanks, > Amit Soni > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > >