Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 22263 invoked from network); 18 Mar 2008 23:36:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Mar 2008 23:36:57 -0000 Received: (qmail 50798 invoked by uid 500); 18 Mar 2008 23:36:48 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 50769 invoked by uid 500); 18 Mar 2008 23:36:48 -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 50758 invoked by uid 99); 18 Mar 2008 23:36:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2008 16:36:48 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [203.217.22.128] (HELO file1.syd.nuix.com.au) (203.217.22.128) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2008 23:36:00 +0000 Received: from host68.syd.nuix.com.au (host68.syd.nuix.com.au [192.168.222.68]) by file1.syd.nuix.com.au (Postfix) with ESMTP id 468B34A81E4 for ; Wed, 19 Mar 2008 10:35:09 +1100 (EST) From: Daniel Noll Organization: Nuix Pty Ltd To: java-user@lucene.apache.org Subject: Re: Question with Hits Interface Date: Wed, 19 Mar 2008 10:30:13 +1100 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803191030.14232.daniel@nuix.com> X-Virus-Checked: Checked by ClamAV on apache.org On Wednesday 19 March 2008 01:44:33 Ramdas M Ramakrishnan wrote: > I am using a MultiFieldQueryParser to parse and search the index. Once I > have the Hits and iterate thru it, I need to know the following? > > For every hit document I need to know under which indexed field was this > Hit originating from? Say I have indexed 2 Fields how will I know from the > Hit which Field the Hit came from? query.createWeight(searcher).explain(reader, docId) ? Or just look at the text. Why do you need to know this anyway? If it's for sorting title matches higher, you're supposed to use boosting for that. If it's for highlighting then the highlighter would do nothing if there are no matches. Daniel --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org