Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3604572F5 for ; Tue, 27 Dec 2011 11:19:26 +0000 (UTC) Received: (qmail 61636 invoked by uid 500); 27 Dec 2011 11:19:22 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 61596 invoked by uid 500); 27 Dec 2011 11:19:22 -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 61588 invoked by uid 99); 27 Dec 2011 11:19:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Dec 2011 11:19:22 +0000 X-ASF-Spam-Status: No, hits=-0.6 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nash12@gmail.com designates 209.85.210.176 as permitted sender) Received: from [209.85.210.176] (HELO mail-iy0-f176.google.com) (209.85.210.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Dec 2011 11:19:16 +0000 Received: by iapp10 with SMTP id p10so27485068iap.35 for ; Tue, 27 Dec 2011 03:18:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:reply-to:from:date:message-id:subject:to:content-type; bh=ZvtPceL5FPbqXcGPx0kUm7OJJBB3bdx8Vxehva4BDgo=; b=l4GqwdAEW5CUpL9xUQPn8/e0G6fPB32URM1ducVCPDlJCSQxUex/Ri6ukalk8hGnNT W/wBdqFBhklTXh0P/4WoOefnu2TjQ85L0F/jnBinqkNVlffzoiL6kKWRgYHAo5nhxx32 H5l60jURufeFRlDSr7I2DOtfYLfXl1cA5adP4= Received: by 10.50.46.166 with SMTP id w6mr30821493igm.6.1324984736158; Tue, 27 Dec 2011 03:18:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.43.135.8 with HTTP; Tue, 27 Dec 2011 03:18:35 -0800 (PST) Reply-To: me@maxbeutel.de From: Max Date: Tue, 27 Dec 2011 12:18:35 +0100 Message-ID: Subject: How can I check if a more complex query condition matched? To: solr-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 I have a more complex query condition like this: (city:15 AND country:60)^4 OR city:15^2 OR country:60^2 What I want to achive with this query is basically if a document has city = 15 AND country = 60 it is more important then another document which only has city = 15 OR country = 60 Furhtermore I want to show in my results view why a certain document matched, something like "matched city and country" or "matched city only" or "matched country only". This is a bit of an simplified example, but the question remains: how can solr tell me which of the conditions in the query matched? If I match against a simple field only, I can get away with highlight fields, but conditions spanning multiple fields seem much more tricky. Thanks for any ideas on this!