Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 99402 invoked from network); 12 Nov 2010 07:30:26 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Nov 2010 07:30:26 -0000 Received: (qmail 43191 invoked by uid 500); 12 Nov 2010 07:30:56 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 43009 invoked by uid 500); 12 Nov 2010 07:30:55 -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 42988 invoked by uid 99); 12 Nov 2010 07:30:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Nov 2010 07:30:54 +0000 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=FREEMAIL_FROM,FREEMAIL_REPLYTO,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of simon.willnauer@googlemail.com designates 209.85.216.48 as permitted sender) Received: from [209.85.216.48] (HELO mail-qw0-f48.google.com) (209.85.216.48) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Nov 2010 07:30:47 +0000 Received: by qwf7 with SMTP id 7so837402qwf.35 for ; Thu, 11 Nov 2010 23:30:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:reply-to :in-reply-to:references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=mc7GvZe/RP9O8dZmVqihopRpz6D0mcYswQTY6mePMbw=; b=khfqJLwNRhk8zfw2T2NFrdrkv1BjAOJnfVZV/Ki5C1RRCgnff9pbGA4ujSW1z2jEta FyAMs0SZNcHdDSxX2WJOvtKxdhzqsixZFnh/OeayAyo22aPH5bJC7/UFJrXZIStvIDi2 3XEkdr7XYex06KwSQSRsdgEJCgw4OHMHziez0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; b=s398VX8+1Y8cuwPQRKmsHyRYYU8CXY5J4FFOByVWVLKfdsyQDoXdvGhKmWawsO4Uwu txjehK+lT1Sr3oHvTPawJgqIrGDLuqXsTqoQEvDPMuc83UVFi1hOXm5qqsb2lKqb5qVX tjC//a+zSsAYNqgHzJrYAujBGRzhtmN+h0aMw= MIME-Version: 1.0 Received: by 10.229.235.142 with SMTP id kg14mr1697268qcb.128.1289547026568; Thu, 11 Nov 2010 23:30:26 -0800 (PST) Received: by 10.229.100.139 with HTTP; Thu, 11 Nov 2010 23:30:26 -0800 (PST) Reply-To: simon.willnauer@gmail.com In-Reply-To: <1289439706.9757.28.camel@bdilley-workstation> References: <1289439706.9757.28.camel@bdilley-workstation> Date: Fri, 12 Nov 2010 08:30:26 +0100 Message-ID: Subject: Re: Non matched terms From: Simon Willnauer To: java-user@lucene.apache.org, brian@shopnation.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org I assume that you don't use trunk and you don't have access to the new Scorer#visitScorers(ScorerVisitor visitor) methods which would make that little easier I guess. Yet, what you could do is you could override TermQuery and wrap the created scorer such that you set a flag if and only if that scorer scores a document (which corresponds to a match then). that way you can afterwards easily figure out what parts of you query did or did not match. does that help? simon On Thu, Nov 11, 2010 at 2:41 AM, Brian C. Dilley wro= te: > Hi, I'm using Lucene for a search project and I have the following > requirements and I was wondering if one of you fine folks could point me > in the right direction (currently i'm using the RAMDirectory, > IndexSearcher, StandardAnalyzer and QueryParser): > > Given the example search string: > > "red leather calvin klein shiny pants" > > I will be searching 2 indexes. =C2=A0One is an index of category names th= e > other is an index of attributes. =C2=A0Lets say the following happens: > > red - matches an attribute > leather - matches an attribute > calvin klein - matches an antribute > pants - matches a category > shiny - matches nothing. > > I want to identify the non-matching "shiny" search term. =C2=A0That is, g= iven > a search string i want lucene to tell me what part(s) of it don't match > anything. > > Is this possible? =C2=A0I've tried using extractTerms (along with another= API > call that I am forgetting the name of right now) but it doesn't work for > all Query types (ie: Fuzzy). > > Thanks in advance! > > > --------------------------------------------------------------------- > 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