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 60A9818FE3 for ; Fri, 21 Aug 2015 05:41:16 +0000 (UTC) Received: (qmail 41056 invoked by uid 500); 21 Aug 2015 05:41:12 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 40991 invoked by uid 500); 21 Aug 2015 05:41:12 -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 40979 invoked by uid 99); 21 Aug 2015 05:41:11 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Aug 2015 05:41:11 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 4F98BDFB49 for ; Fri, 21 Aug 2015 05:41:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.899 X-Spam-Level: ** X-Spam-Status: No, score=2.899 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, WEIRD_PORT=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id kl8TapsUlc1N for ; Fri, 21 Aug 2015 05:41:10 +0000 (UTC) Received: from mail-io0-f176.google.com (mail-io0-f176.google.com [209.85.223.176]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 220AE24F52 for ; Fri, 21 Aug 2015 05:41:10 +0000 (UTC) Received: by iods203 with SMTP id s203so70895632iod.0 for ; Thu, 20 Aug 2015 22:41:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=uXfWicicjNfK57oZ3rNdaWLGRy8iz1g+w4Etvj29tYU=; b=CtjJ1BOMgpxt+YSTo3ZQTmBdoWwvMsM3j60S44RYD1tLwrdo+W+/oT2/PDZS8japk9 P2pr5Od9pkE3UidulC5hvX1y4WduUOu1lzFouTULWgvprzijlKeFJDTf4RTSXJRavjrV fEaLrs5U73AZ4d/hiZ/gWT6R6bDpThMW9iV3GM5FLyEUqPSb+UVQknM7By9R8wWumSTG 7YTRk5/PSQrYmfE91tKP0+/5Yt4XvyoYf5EEgTu0VJMKoZXCuWJCesWjlKLnLaPW76Gd FXxH+fiyFMZp6reM8xPSJZCIH1/EEF14G/EF7k9ZezQP86rcw+3XCqWEoKdbXofrcMjK n3aQ== MIME-Version: 1.0 X-Received: by 10.107.10.167 with SMTP id 39mr5636267iok.16.1440135669597; Thu, 20 Aug 2015 22:41:09 -0700 (PDT) Received: by 10.79.12.23 with HTTP; Thu, 20 Aug 2015 22:41:09 -0700 (PDT) Date: Fri, 21 Aug 2015 13:41:09 +0800 Message-ID: Subject: Remove duplicate suggestions in Solr From: Zheng Lin Edwin Yeo To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=001a113edc5603ca88051dcbb73a --001a113edc5603ca88051dcbb73a Content-Type: text/plain; charset=UTF-8 Hi, I would like to check, is there anyway to remove duplicate suggestions in Solr? I have several documents that looks very similar, and when I do a suggestion query, it came back with all same results. I'm using Solr 5.2.1 This is my suggestion pipeline: all json true edismax 10 id, score content^50 title^50 extrasearch^30.0 textnge^50.0 product(map(query($type1query),0,0,1,$type1boost),map(query($type2query),0,0,1,$type2boost),map(query($type3query),0,0,1,$type3boost),map(query($type4query),0,0,1,$type4boost),$typeboost) 1.0 content_type:"application/pdf" 0.9 content_type:"application/msword" 0.5 content_type:"NA" 0.0 content_type:"NA" 0.0 on id, textng, textng2, language_s true true html 50 false This is my query: http://localhost:8983/edm/chinese2/suggest?q=do our best&defType=edismax&qf=content^5 textng^5&pf=textnge^50&pf2=content^20 textnge^50&pf3=content^40%20textnge^50&ps2=2&ps3=2&stats.calcdistinct=true This is the suggestion result: "highlighting":{ "responsibility001":{ "id":["responsibility001"], "textng":["We will strive to do our best. <br> "], "responsibility002":{ "id":["responsibility002"], "textng":["We will strive to do our best. <br> "], "responsibility003":{ "id":["responsibility003"], "textng":["We will strive to do our best. <br> "], "responsibility004":{ "id":["responsibility004"], "textng":["We will strive to do our best. <br> "], "responsibility005":{ "id":["responsibility005"], "textng":["We will strive to do our best. <br> "], "responsibility006":{ "id":["responsibility006"], "textng":["We will strive to do our best. <br> "], "responsibility007":{ "id":["responsibility007"], "textng":["We will strive to do our best. <br> "], "responsibility008":{ "id":["responsibility008"], "textng":["We will strive to do our best. <br> "], "responsibility009":{ "id":["responsibility009"], "textng":["We will strive to do our best. <br> "], "responsibility010":{ "id":["responsibility010"], "textng":["We will strive to do our best. <br> "], Regards, Edwin --001a113edc5603ca88051dcbb73a--