Return-Path: Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: (qmail 59606 invoked from network); 15 May 2010 14:13:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 May 2010 14:13:32 -0000 Received: (qmail 74241 invoked by uid 500); 15 May 2010 14:13:30 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 74162 invoked by uid 500); 15 May 2010 14:13:30 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 74154 invoked by uid 99); 15 May 2010 14:13:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 May 2010 14:13:30 +0000 X-ASF-Spam-Status: No, hits=-0.9 required=10.0 tests=AWL,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [130.73.108.11] (HELO mailer.zib.de) (130.73.108.11) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 15 May 2010 14:13:21 +0000 Received: from mailsrv2.zib.de (sc2.zib.de [130.73.108.31]) by mailer.zib.de (8.13.7+Sun/8.13.7) with ESMTP id o4FEChgc001034 for ; Sat, 15 May 2010 16:12:48 +0200 (CEST) Received: from [127.0.0.1] (probibw22.zib.de [130.73.63.102]) by mailsrv2.zib.de (8.13.4/8.13.4) with ESMTP id o4FECgO3021087 for ; Sat, 15 May 2010 16:12:42 +0200 (MEST) Message-ID: <4BEEABD2.8010509@zib.de> Date: Sat, 15 May 2010 16:12:34 +0200 From: Sascha Szott User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.9) Gecko/20100317 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: solr-user@lucene.apache.org Subject: Re: How to tell which field matched? References: <96D26846-EF62-4864-8F55-653CC66614C7@gmail.com> In-Reply-To: <96D26846-EF62-4864-8F55-653CC66614C7@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, I'm not sure if debugQuery=on is a feasible solution in a productive environment, as generating such extra information requires a reasonable amount of computation. -Sascha Jon Baer wrote: > Does the standard debug component (?debugQuery=on) give you what you need? > > http://wiki.apache.org/solr/SolrRelevancyFAQ#Why_does_id:archangel_come_before_id:hawkgirl_when_querying_for_.22wings.22 > > - Jon > > On May 14, 2010, at 4:03 PM, Tim Garton wrote: > >> All, >> I've searched around for help with something we are trying to do >> and haven't come across much. We are running solr 1.4. Here is a >> summary of the issue we are facing: >> >> A simplified example of our schema is something like this: >> >> >> > required="true" /> >> >> > stored="true" multiValued="true" /> >> > stored="true" multiValued="true" /> >> > stored="true" multiValued="true" /> >> >> When someone does a search we search across the title, >> supplement_title, and supplement_pdf_text fields. When we get our >> results, we would like to be able to tell which field the search >> matched and if it's a multiValued field, which of the multiple values >> matched. This is so that we can display results similar to: >> >> Example Title >> Example Supplement Title >> Example Supplement Title 2 (your search matched this document) >> Example Supplement Title 3 >> >> Example Title 2 >> Example Supplement Title 4 >> Example Supplement Title 5 >> Example Supplement Title 6 (your search matched this document) >> >> etc. >> >> How would you recommend doing this? Is there some way to get solr to >> tell us which field matched, including multiValued fields? As a >> workaround we have been using highlighting to tell which field >> matched, but it doesn't get us what we want for multiValued fields and >> there is a significant cost to enabling the highlighting. Should we >> design our schema in some other fashion to achieve these results? >> Thanks. >> >> -Tim >