Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@apache.org Received: (qmail 29092 invoked from network); 13 Feb 2003 17:09:33 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 13 Feb 2003 17:09:33 -0000 Received: (qmail 22497 invoked by uid 97); 13 Feb 2003 17:11:06 -0000 Delivered-To: qmlist-jakarta-archive-lucene-user@nagoya.betaversion.org Received: (qmail 22490 invoked from network); 13 Feb 2003 17:11:06 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 13 Feb 2003 17:11:06 -0000 Received: (qmail 7970 invoked by uid 500); 13 Feb 2003 17:04:10 -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 7925 invoked from network); 13 Feb 2003 17:04:09 -0000 Received: from s149v112.servlets.net (209.221.149.112) by daedalus.apache.org with SMTP; 13 Feb 2003 17:04:09 -0000 Received: from Hercules (249-127.customer.cloud9.net [168.100.249.127]) (authenticated) by s149v112.servlets.net (8.11.6/8.11.6) with ESMTP id h1DH47519012 for ; Thu, 13 Feb 2003 09:04:07 -0800 From: "James Berrettini" To: "'Lucene User listserv'" Subject: BooleanQuery Date: Thu, 13 Feb 2003 12:04:18 -0500 Organization: Jive Software, Inc. Message-ID: <004d01c2d381$f5d082c0$7001a8c0@Hercules> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N I'm having some trouble retrieving data I need from a combined query. Here's what I'm trying to do: I want to search on several fields of my documents and then return the best hits. I'm doing something like this: org.apache.lucene.search.Query bodyQuery =3D QueryParser.parse(queryString.toLowerCase(), "body", analyzer); org.apache.lucene.search.Query subjectQuery =3D QueryParser.parse(queryString.toLowerCase(), "subject", analyzer); org.apache.lucene.search.Query attachmentsQuery =3D QueryParser.parse(queryString.toLowerCase(), "attachmentsText", analyzer); BooleanQuery bQuery =3D new BooleanQuery(); bQuery.add(subjectQuery,false,false); bQuery.add(bodyQuery,false,false); bQuery.add(attachmentsQuery, false, false); Hits hits =3D searcher.search(comboQuery); All well and good. But when I'm displaying the results, I want to know = which fields were responsible for the hit. It doesn't seem like this is = something that is available within in the hit. One option is to search again in = all hits for the field where this occurred. That doesn't seem efficient. = Another is to conduct several queries, but then merging the results becomes a = little problematic. Any recommendations of which way to go? Jim --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org