Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 85036 invoked from network); 3 Feb 2005 18:00:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Feb 2005 18:00:31 -0000 Received: (qmail 3634 invoked by uid 500); 3 Feb 2005 18:00:26 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 3613 invoked by uid 500); 3 Feb 2005 18:00:26 -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 3589 invoked by uid 99); 3 Feb 2005 18:00:26 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from 87.52.220-216.q9.net (HELO mail.futurebrandexp.com) (216.220.52.87) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 03 Feb 2005 10:00:24 -0800 Received: from p001002 ([204.225.84.27]) by mail.futurebrandexp.com with Microsoft SMTPSVC(5.0.2195.5329); Thu, 3 Feb 2005 13:04:51 -0500 Message-ID: <013201c50a1a$db152270$7703d00a@hypermedia.com> From: "Luke Shannon" To: "Lucene Users List" References: <4202590F.8080209@polopoly.com> Subject: Parsing The Query: Every document that doesn't have a field containing x Date: Thu, 3 Feb 2005 13:04:50 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-OriginalArrivalTime: 03 Feb 2005 18:04:51.0199 (UTC) FILETIME=[DB2500F0:01C50A1A] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hello; I have a query that finds document that contain fields with a specific value. query1 = QueryParser.parse("jpg", "kcfileupload", new StandardAnalyzer()); This works well. I would like a query that find documents containing all kcfileupload fields that don't contain jpg. The example I found in the book that seems to relate shows me how to find documents without a specific term: QueryParser parser = new QueryParser("contents", analyzer); parser.setOperator(QueryParser.DEFAULT_OPERATOR_AND); But than it says: Negating a term must be combined with at least one nonnegated term to return documents; in other words, it isn't possible to use a query like NOT term to find all documents that don't contain a term. So does that mean the above example wouldn't work? The API says: a plus (+) or a minus (-) sign, indicating that the clause is required or prohibited respectively; I have been playing around with using the minus character without much luck. Can someone give point me in the right direction to figure this out? Thanks, Luke --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org