From solr-user-return-138301-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Mon Jan 15 17:33:29 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 8D28A180657 for ; Mon, 15 Jan 2018 17:33:29 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 7C344160C31; Mon, 15 Jan 2018 16:33:29 +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 C230B160C25 for ; Mon, 15 Jan 2018 17:33:28 +0100 (CET) Received: (qmail 88907 invoked by uid 500); 15 Jan 2018 16:33:26 -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 88895 invoked by uid 99); 15 Jan 2018 16:33:26 -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; Mon, 15 Jan 2018 16:33:26 +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 165891A0B7A for ; Mon, 15 Jan 2018 16:33:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.999 X-Spam-Level: * X-Spam-Status: No, score=1.999 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=sematext-com.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 0NwOSzHvSs2A for ; Mon, 15 Jan 2018 16:33:23 +0000 (UTC) Received: from mail-wr0-f172.google.com (mail-wr0-f172.google.com [209.85.128.172]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 52EE55FB71 for ; Mon, 15 Jan 2018 16:33:23 +0000 (UTC) Received: by mail-wr0-f172.google.com with SMTP id x1so8159482wrb.5 for ; Mon, 15 Jan 2018 08:33:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sematext-com.20150623.gappssmtp.com; s=20150623; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=Ats0858yWlpzAjhcn73PATCypXm1WYrwD4mqCp1pA10=; b=Eh3l2MDRMF8Md2GbzpHBPNB4IKvytvRjbk3vaeARBsWX+zDTdrUhEg6qb/r0xZNtM0 omyUszx+fuJ/HFr//PG5GEDHHLLeHyfxbojHS/DRYc3YEdNDRKZiRUFkNUNTzTOXY/np FLmehxQcyvQinCuN/50+RfXiLSHzrzh5veTjUgMGpSCYgXnA6npReuuiwKys4buLdld8 o9tXVFmpeFbJqtOrVQ3c3Vo3HFp3JefCOlp+inTi8AV+FZfKA7PSlGMXglNn8Ziqr3HD U2rpQEO0guTVYaUDI9IcEr+mHF8rR02xXALLlaP5bkDRuk1Cn+aEgUfAa4z065t1ISx+ Xvdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=Ats0858yWlpzAjhcn73PATCypXm1WYrwD4mqCp1pA10=; b=RYwu9b6XRwYWyfrbIO18xXtBwgqmD0Qu0Tzp2Bot7CAyELhkp5AX1SKWCm02P3QFXE +RFlNdJY0MsmIliowD3L6rvwVyuaFqgzfUSuAFkVn1ZHBLlo386A5c5JJ5oAIVMxdjds En/Y+UDB/In+C6RbmryrQOA2+S1s44e914ogkUlxiutbkbaQ9jrWin+lINnQNI3pREzc kGfP804M8h0SHBOWvV6yhxCxn8Ce1SiBHPOnoj6WWUB3zGB7m0lkSWj6/+czn0H2v+3q WDKQNBNH64sKuwEjmE24wjAKuWpFOrKa9ExHUXUOyw2xCEumIo9N81TFLiQHYtXjvO2Y 95HA== X-Gm-Message-State: AKwxytdmWFjrgGCuKQNGIQ6qH74+TwZKAMXBifnTOsx/IJFUYrSrqZN3 YIDq24uH23GPwt1iUQstEOb8Go6kCs4= X-Google-Smtp-Source: ACJfBov3MzmKJdOExLowsRfisJw8tHz4wFXKfO07aGaBK3tZIt5SCVBNdR21230LW7azHs03Epfklg== X-Received: by 10.223.154.211 with SMTP id a77mr6791970wrc.157.1516033996821; Mon, 15 Jan 2018 08:33:16 -0800 (PST) Received: from [192.168.0.13] (cable-77-77-227-36.dynamic.telemach.ba. [77.77.227.36]) by smtp.gmail.com with ESMTPSA id d14sm29144wre.32.2018.01.15.08.33.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jan 2018 08:33:15 -0800 (PST) From: =?utf-8?Q?Emir_Arnautovi=C4=87?= Content-Type: multipart/alternative; boundary="Apple-Mail=_0DA84321-F862-4FD0-935D-7FE3609FD8EF" Mime-Version: 1.0 (Mac OS X Mail 11.2 \(3445.5.20\)) Subject: Re: Parallelizing queries without Custom Component Date: Mon, 15 Jan 2018 17:33:12 +0100 References: To: solr-user@lucene.apache.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3445.5.20) --Apple-Mail=_0DA84321-F862-4FD0-935D-7FE3609FD8EF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi Max, It seems to me that you are looking for grouping = https://lucene.apache.org/solr/guide/6_6/result-grouping.html = or field = collapsing = https://lucene.apache.org/solr/guide/6_6/collapse-and-expand-results.html = feature. HTH, Emir -- Monitoring - Log Management - Alerting - Anomaly Detection Solr & Elasticsearch Consulting Support Training - http://sematext.com/ > On 15 Jan 2018, at 17:27, Max Bridgewater = wrote: >=20 > Hi, >=20 > My index is composed of product reviews. Each review contains the id = of the > product it refers to. But it also contains a rating for this product = and > the number of negative feedback provided on this product. >=20 > { > id: solr doc id, > rating: number between 0 and 5, > product_id: the product that is being reviewed, > negative_feedback: how many negative feedbacks on this product > } >=20 > The query below returns the "worst" review for the given product = 7453632. > Worst is defined as rated 1 to 3 and having the highest number of = negative > feedback. >=20 > /select?q=3Dproduct_id:7453632&fq=3Drating:[1 TO = 3]&sort=3Dnegative_feedback > desc&rows=3D1 >=20 > The query works as intended. Now the challenging part is to extend = this > query to support many product_id. If executed with many product Id, = the > result should be the list of worst reviews for all the provided = products. >=20 > A query of the following form would return the list of worst products = for > products: 7453632,645454,534664. >=20 > /select?q=3Dproduct_id:[7453632,645454,534664]&fq=3Drating:[1 TO > 3]&sort=3Dnegative_feedback desc >=20 > Is there a way to do this in Solr without custom component? >=20 > Thanks. > Max --Apple-Mail=_0DA84321-F862-4FD0-935D-7FE3609FD8EF--