From lucene-user-return-4134-qmlist-jakarta-archive-lucene-user=nagoya.apache.org@jakarta.apache.org Thu Apr 03 22:10:16 2003 Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@apache.org Received: (qmail 24212 invoked from network); 3 Apr 2003 22:10:15 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 3 Apr 2003 22:10:15 -0000 Received: (qmail 4073 invoked by uid 97); 3 Apr 2003 22:12:09 -0000 Delivered-To: qmlist-jakarta-archive-lucene-user@nagoya.betaversion.org Received: (qmail 4066 invoked from network); 3 Apr 2003 22:12:09 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 3 Apr 2003 22:12:09 -0000 Received: (qmail 23889 invoked by uid 500); 3 Apr 2003 22:10:11 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 23773 invoked from network); 3 Apr 2003 22:10:10 -0000 Received: from mail.ideorlando.org (208.63.70.76) by daedalus.apache.org with SMTP; 3 Apr 2003 22:10:10 -0000 Received: by mail.ideorlando.org (Postfix, from userid 8) id 346F2367DA; Thu, 3 Apr 2003 22:10:23 +0000 (UTC) X-Scanned-By: AMaViS at a badly configured site. Received: from ROUTARDBW (unknown [208.62.52.106]) by mail.ideorlando.org (Postfix) with SMTP id 86F67367E0 for ; Thu, 3 Apr 2003 22:10:22 +0000 (UTC) From: "Rob Outar" To: "Lucene Users List" Subject: Querying Question Date: Thu, 3 Apr 2003 17:11:14 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 1 (Highest) X-MSMail-Priority: High X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: High X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 In-Reply-To: <00cd01c2fa0e$c5f35560$6800a8c0@sloop> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi all, I am a little fuzzy on complex querying using AND, OR, etc.. For example: I have the following name/value pairs file 1 = name = "checkpoint" value = "filename_1" file 2 = name = "checkpoint" value = "filename_2" file 3 = name = "checkpoint" value = "filename_3" file 4 = name = "checkpoint" value = "filename_4" I ran the following Query: name:\"checkpoint\" AND value:\"filenane_1\" Instead of getting back file 1, I got back all four files? Then after trying different things I did: +("name:\"checkpoint\") AND +(value:\"filenane_1\") it then returned file 1. Our project queries solely on name value pairs and we need the ability to query using AND, OR, NOTS, etc.. What the correct syntax for such queries? The code I use is : QueryParser p = new QueryParser("", new RepositoryIndexAnalyzer()); this.query = p.parse(query.toLowerCase()); Hits hits = this.searcher.search(this.query); Thanks as always, Rob --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org