Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 68489 invoked from network); 17 Oct 2009 20:24:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Oct 2009 20:24:54 -0000 Received: (qmail 25656 invoked by uid 500); 17 Oct 2009 20:24:52 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 25566 invoked by uid 500); 17 Oct 2009 20:24:51 -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 25556 invoked by uid 99); 17 Oct 2009 20:24:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Oct 2009 20:24:51 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 Oct 2009 20:24:42 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MzFp7-0007wt-5F for java-user@lucene.apache.org; Sat, 17 Oct 2009 13:24:21 -0700 Message-ID: <25941499.post@talk.nabble.com> Date: Sat, 17 Oct 2009 13:24:21 -0700 (PDT) From: Rich Livingstone To: java-user@lucene.apache.org Subject: How to make each term of query appear in at least one field of multiple field query MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: nabble@bananasoft.net X-Virus-Checked: Checked by ClamAV on apache.org I am a bit stumped by how to ensure that, where there are multiple terms in my query, that each term must appear at least once across all specified fields of my document. I am using MultiFieldQueryParser and BooleanClause.Occur.SHOULD in the query; I tried putting all fields into a single giant field and prefixing each term with + but that loses the ability to boost individual fields in the search (unless there is a way to add a boost per term indexed at index time?) so it doesn't seem a good solution as I need the boosting too. Anyone any idea how to do this ? BooleanClause.Occur.MUST would force all terms to be in all fields, I would have thought - and the ability to do weighting is important to me. I'm using Lucene 2.2.0. Thanks for any help ! -- View this message in context: http://www.nabble.com/How-to-make-each-term-of-query-appear-in-at-least-one-field-of-multiple-field-query-tp25941499p25941499.html Sent from the Lucene - Java Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org