Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 52F2D200C12 for ; Sun, 5 Feb 2017 10:49:41 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 517BD160B59; Sun, 5 Feb 2017 09:49:41 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9A477160B32 for ; Sun, 5 Feb 2017 10:49:40 +0100 (CET) Received: (qmail 46984 invoked by uid 500); 5 Feb 2017 09:49:38 -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 46972 invoked by uid 99); 5 Feb 2017 09:49:38 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Feb 2017 09:49:38 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 19A261A0250 for ; Sun, 5 Feb 2017 09:49:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.779 X-Spam-Level: * X-Spam-Status: No, score=1.779 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=visionsr-com.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id UVN2iaJ8DRqn for ; Sun, 5 Feb 2017 09:49:36 +0000 (UTC) Received: from mail-qt0-f170.google.com (mail-qt0-f170.google.com [209.85.216.170]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 852DD5FB9F for ; Sun, 5 Feb 2017 09:49:36 +0000 (UTC) Received: by mail-qt0-f170.google.com with SMTP id x49so82663524qtc.2 for ; Sun, 05 Feb 2017 01:49:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=visionsr-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=7cxDRSBr8OaMLUaUYkJUI7ARsOQYEDxfMZ5v0+3Yyi4=; b=Nmi0Rt8lxR+VgeBlXQoyagQfaIsow7uHQ86SGKYAvQ/vkTpEr0GeGyWi91VywqjejP rYvjuVCRx0CXB4OM/SvkFx/wKygqsLSIanYTAkiLD6xoPg5o4z21hVPdiCh6NzZrqB3g PXTugkNFb9H1dwFmXRqqGf67XgcmCRojHN1EPtLA4qAdmRvL3ovBhBH7s2FjFe5BWaKf tKDeFlo1K/80awsCLfjLVRznhkK5SpVNJqzHZgsuA71Xcc4MgLBdXIswiMFvoYNllKrb 2crl1KsSzEyrsFlEOoUZryWyNIovtAQaxFUld1I8yHuJlzVlmFyv2xMrawTiO/cWDhgd TzTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=7cxDRSBr8OaMLUaUYkJUI7ARsOQYEDxfMZ5v0+3Yyi4=; b=h9A4uiM5BOeCXEnF8muJVRAlfInT2bDGPQGfnTaCyhojp18GFS1T1wOIKSgCckNVrJ IqR3Z8ckt3oLHV3xsJVu7eUVRikp72njLUsPr7mtUgfZKKdHvbKF5Cu1J4L/VLynBeDJ UNX9jGkxfGiHBDnsq457a5HKYNqVQyCbRIHYTOkM+FVVklyZnwmoovdDt/BhuR/Y4gSu CmWsWjprLpYLEwlRojUznWn4VjJ/7oekqxDszPgLkXDotLihUdFKAmD0CQ0MPhipyuI8 xYxWI3SJ6IM6LKG4xZaF/mY+B77fqOz78maV0/JdNihd6RYmYBGpnK+KruhYvCP1MnZ5 kbfA== X-Gm-Message-State: AMke39lQzb8jN/CueyleMH9QDCwic2gDIrghx8dNByxQvrI5ex9k0kKe4lqlFmH8ToCr0CTEB0C2OmMDQEbX3g== X-Received: by 10.200.45.5 with SMTP id n5mr4453210qta.174.1486288176103; Sun, 05 Feb 2017 01:49:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.57.43 with HTTP; Sun, 5 Feb 2017 01:49:35 -0800 (PST) From: Cristian Popovici Date: Sun, 5 Feb 2017 11:49:35 +0200 Message-ID: Subject: Find groups where at least one item matches a query To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=001a11353c1ec55e750547c56e6e archived-at: Sun, 05 Feb 2017 09:49:41 -0000 --001a11353c1ec55e750547c56e6e Content-Type: text/plain; charset=UTF-8 Hi all, I'm new to Solr and I need a bit of help. I have a structure of documents indexed in Solr that are grouped together by a property. I need to retrieve all groups where at least one entry in the group matches a query. Example: I have two documents indexed and both share the *groupId *property that defines the grouping field. *{* * "groupId": "223",* * "modality": "Computed Tomography",* * "anatomy": "Subcutaneous fat",* * "pathology": "Metastasis",* *}* *{* * "groupId": "223",* * "modality": "Computed Tomography",* * "anatomy": "Subcutaneous fat",* * "pathology": "Normal",* *}* I need to retrieve both entries in the group when performing a query like: *(pathology:Normal)* Is this possible in solr? Thanks! --001a11353c1ec55e750547c56e6e--