From solr-user-return-138049-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Thu Jan 4 04:23:09 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 4BAB918077A for ; Thu, 4 Jan 2018 04:23:09 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3B1E5160C39; Thu, 4 Jan 2018 03:23:09 +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 81766160C1B for ; Thu, 4 Jan 2018 04:23:08 +0100 (CET) Received: (qmail 12750 invoked by uid 500); 4 Jan 2018 03:23:06 -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 Delivered-To: moderator for solr-user@lucene.apache.org Received: (qmail 39390 invoked by uid 99); 4 Jan 2018 01:17:14 -0000 X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.311 X-Spam-Level: X-Spam-Status: No, score=-0.311 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled X-WSS-ID: 0P20BKE-07-B0K-03 X-M-MSG: From: "Deepak Udapudi" To: "solr-user@lucene.apache.org" Subject: problem with Solr Sorting by score and distance together Thread-Topic: problem with Solr Sorting by score and distance together Thread-Index: AdOE9lg5ZrghpyIzTx6/fdAcCy5EOg== Date: Thu, 4 Jan 2018 01:16:59 +0000 Message-ID: <74b9e0a5940546fbae8235d8aa6ba71d@SACMSG501C.deltads.ent> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.1.143.239] Content-Type: multipart/alternative; boundary=_000_74b9e0a5940546fbae8235d8aa6ba71dSACMSG501Cdeltadsent_ MIME-Version: 1.0 --_000_74b9e0a5940546fbae8235d8aa6ba71dSACMSG501Cdeltadsent_ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Hi all, Problem :- Assume that, I am searching for car care centers. Solr collection has the = = data for all the major car care centers. As an example I search for = =46irestone car care centers in a 5 miles radius. In the search results I a= m= supposed to receive the firestone car care centers list within 5 miles fro= m= the specified location and the centers should be sorted in distance order. In the solr query handler I have specified the following. i) I have specified the query condition (q) to be based = = on distance parameter (basically search for records within a certain = distance in miles). ii) I have specified the filter query conditions (fq) = where fields accepting general text are matching free text input (for ex :-= = =46irestone Carcare) iii) I have specified the sort condition(sort ) to be based= = on score(calculated based on the filter query (fq) conditions applied in th= e= 2nd item in the list) and distance. If there are duplicate records matchin= g= by score, then distance should be used to order the duplicate records. I am not getting the desired results. Records are still sorted by score = which was calculated using the distance field but not using the filter quer= y= conditions that were specified. Basically, the firestone car care centers = = that I am looking for are not appearing in the top of the results and also = = they are not in the order of distance if the records are matching. Queries :- i) Why is my sort clause specified by me (based on fq = conditions score and distance) not being applied correctly=3F ii) Is my approach to fix the problem correct=3F iii) Please let me know the corrective action. Thanks in advance. Regards, Deepak The information contained in this email message and any attachments is = confidential and intended only for the addressee(s). If you are not an = addressee, you may not copy or disclose the information, or act upon it, an= d= you should delete it entirely from your email system. Please notify the = sender that you received this email in error. --_000_74b9e0a5940546fbae8235d8aa6ba71dSACMSG501Cdeltadsent_--