Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 60441 invoked from network); 10 Mar 2005 09:23:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 10 Mar 2005 09:23:30 -0000 Received: (qmail 41446 invoked by uid 500); 10 Mar 2005 09:23:20 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 41410 invoked by uid 500); 10 Mar 2005 09:23:20 -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 41379 invoked by uid 99); 10 Mar 2005 09:23:20 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=SUBJ_ALL_CAPS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from intranet.runtime-collective.com (HELO mail.runtime-collective.com) (212.42.171.82) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 10 Mar 2005 01:23:19 -0800 Received: from [81.168.89.246] (helo=[192.168.1.4]) by mail.runtime-collective.com with smtp (Exim 3.35 #1 (Debian)) id 1D9Jsw-00052k-00 for ; Thu, 10 Mar 2005 09:23:14 +0000 Subject: RE: SPAN QUERY [HOW TO] From: Miles Barr To: java-user@lucene.apache.org In-Reply-To: References: Content-Type: text/plain Organization: Runtime Collective Ltd. Date: Thu, 10 Mar 2005 09:23:15 +0000 Message-Id: <1110446595.8124.153.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.0.3 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Thu, 2005-03-10 at 12:02 +0530, Karthik N S wrote: > U got it bingo,Am trying to do something similar as u replied. > But there is a glitch in the process > > If the search is done on the 'leaf_category' as u said > > with word such as 'CAMERA DIGITAL' instead of 'DIGITAL CAMERA' the > resultant > > return hits will be ZERO '0'. Usage of SpanQuery for such conditions > applied should return still > > the 1st document of 3. > > A permutation combination of words entered should result in the specific > document being returned. If depends what the type of leaf_category is. If you made it Keyword as I suggested then it won't be tokenized. i.e. there's one token 'DIGITAL CAMERA' instead of the two tokens you normally get, 'digital' and 'camera'. If you change the field type to Text you should be able to use a SpanNearQuery to do your search. -- Miles Barr Runtime Collective Ltd. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org