From java-user-return-24267-apmail-lucene-java-user-archive=lucene.apache.org@lucene.apache.org Mon Oct 30 14:14:19 2006 Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 77637 invoked from network); 30 Oct 2006 14:14:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Oct 2006 14:14:18 -0000 Received: (qmail 48370 invoked by uid 500); 30 Oct 2006 14:14:21 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 48340 invoked by uid 500); 30 Oct 2006 14:14:21 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 48329 invoked by uid 99); 30 Oct 2006 14:14:21 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Oct 2006 06:14:21 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [203.199.37.133] (HELO rediff.co.in) (203.199.37.133) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 30 Oct 2006 06:14:05 -0800 Received: (qmail 18836 invoked from network); 30 Oct 2006 14:10:02 -0000 Received: from unknown (HELO bhavin) (172.16.3.151) by mailserver with SMTP; 30 Oct 2006 14:10:02 -0000 Message-ID: <008101c6fc2f$9fd92b30$970310ac@bhavin> Reply-To: "Bhavin Pandya" From: "Bhavin Pandya" To: References: <45459906.8050601@netcore.co.in> <359a92830610300445j27bc4210v68ae8033ad880889@mail.gmail.com> <45460718.60605@netcore.co.in> <48b038c60610300608g48687c91r78e1f9a4b4bf5eaf@mail.gmail.com> Subject: Re: Lucene search priorities Date: Mon, 30 Oct 2006 19:58:06 +0530 Organization: rediff.com MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Checked: Checked by ClamAV on apache.org Hi amit, You can give boost to query at search time... and you can boost to perticular field at index time.... - Bhavin pandya ----- Original Message ----- From: "Patrick Turcotte" To: ; Sent: Monday, October 30, 2006 7:38 PM Subject: Re: Lucene search priorities >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 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* < amit_soni@netcore.co.in >> > > 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: java-user-unsubscribe@lucene.apache.org >> > >> > For additional commands, e-mail: java-user-help@lucene.apache.org >> > >> > >> > >> >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org