Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@apache.org Received: (qmail 80204 invoked from network); 3 Apr 2003 22:33:28 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 3 Apr 2003 22:33:28 -0000 Received: (qmail 4715 invoked by uid 97); 3 Apr 2003 22:35:22 -0000 Delivered-To: qmlist-jakarta-archive-lucene-user@nagoya.betaversion.org Received: (qmail 4708 invoked from network); 3 Apr 2003 22:35:21 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 3 Apr 2003 22:35:21 -0000 Received: (qmail 79919 invoked by uid 500); 3 Apr 2003 22:33:25 -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 79908 invoked from network); 3 Apr 2003 22:33:25 -0000 Received: from unknown (HELO isc?mail.infosciences.com) (141.156.69.115) by daedalus.apache.org with SMTP; 3 Apr 2003 22:33:25 -0000 Received: from Aviran (141.156.69.109 [141.156.69.109]) by isc_mail.infosciences.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id ZX7W2WVC; Thu, 3 Apr 2003 17:36:23 -0500 From: "Aviran Mordo" To: "'Lucene Users List'" Subject: RE: Querying Question Date: Thu, 3 Apr 2003 17:33:44 -0500 Message-ID: <000101c2fa31$1b80c2c0$6a00a8c0@Aviran> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 In-Reply-To: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N You should not tokenize the file name instead you should use doc.add(new Field(name, value, true, true, true)); Or Doc.add(Field.keyword(name,value)); Aviran -----Original Message----- From: Rob Outar [mailto:routar@ideorlando.org] Sent: Thursday, April 03, 2003 5:27 PM To: Lucene Users List Subject: RE: Querying Question Use the following type of Field: doc.add(new Field(name, value, true, true, true)); Thanks, Rob -----Original Message----- From: Aviran Mordo [mailto:amordo@infosciences.com] Sent: Thursday, April 03, 2003 5:19 PM To: 'Lucene Users List' Subject: RE: Querying Question Did you index the value field as a keyword? Aviran -----Original Message----- From: Rob Outar [mailto:routar@ideorlando.org] Sent: Thursday, April 03, 2003 5:11 PM To: Lucene Users List Subject: Querying Question Importance: High 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 --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org