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 E83FE17F75 for ; Wed, 8 Oct 2014 03:35:51 +0000 (UTC) Received: (qmail 83819 invoked by uid 500); 8 Oct 2014 03:35:48 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 83751 invoked by uid 500); 8 Oct 2014 03:35:48 -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 83736 invoked by uid 99); 8 Oct 2014 03:35:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Oct 2014 03:35:47 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of erickerickson@gmail.com designates 209.85.213.178 as permitted sender) Received: from [209.85.213.178] (HELO mail-ig0-f178.google.com) (209.85.213.178) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Oct 2014 03:35:42 +0000 Received: by mail-ig0-f178.google.com with SMTP id h3so565298igd.17 for ; Tue, 07 Oct 2014 20:35:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=rq9dGKtVL+koVqt+saeAdgQEf7owmruN6oXeXGzvJUI=; b=blGgopncbK2tI70ufTPF6gapoy/RNg8F1zHtvdZLLXNSh+CLtrd03o/z3/KLnAQd1h Ef95AxNUZ3RAFlZmueza9gKvlwPwRa755AcrDkDnBpPf132fCOCLiol2EGZwZx5JvXEj CvmauOYG+xIAG/b7+YYWgbaUsKAWu5bDFTdoLzesLdrvOJTf1V5xDeHL4iCA0BU4dWI+ YYH2T32eMIsgH8rpT73poUnGfCbfWdzbWy5qTXCvkQV/Tn+sCS5r7IdrTvxjy1zcXDwF mgBDnGSZvOKuoyDC51KJMhj8RSUM9txYB2XHYukqSTWiHtyfPRLPYM+kHp6G1j8FaLQz bf2Q== MIME-Version: 1.0 X-Received: by 10.50.154.6 with SMTP id vk6mr11817515igb.28.1412739322002; Tue, 07 Oct 2014 20:35:22 -0700 (PDT) Received: by 10.107.171.75 with HTTP; Tue, 7 Oct 2014 20:35:21 -0700 (PDT) In-Reply-To: <1412709727.33329.YahooMailNeo@web124703.mail.ne1.yahoo.com> References: <1412697300032-4163162.post@n3.nabble.com> <1412709727.33329.YahooMailNeo@web124703.mail.ne1.yahoo.com> Date: Tue, 7 Oct 2014 20:35:21 -0700 Message-ID: Subject: Re: Exact matches are not coming on Top for autocomplete search results. From: Erick Erickson To: solr-user@lucene.apache.org, Ahmet Arslan Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org bq: bq=typeahead:"New York World"^50 would do the trick. I don't think so. All the examples have that phrase in them, so the boost query would apply to all. But Shobhit can do something similar with a copyField to a field that, say, was a keyword tokenizer followed by a lower case filter and put a very high boost on _that_ instead... Best, Erick On Tue, Oct 7, 2014 at 12:22 PM, Ahmet Arslan wrote: > Hi, > > You can add an optional (phrase) clause to boost exact matches. If you are using (e)dismay > > bq=typeahead:"New York World"^50 would do the trick. > > Ahmet > > > > On Tuesday, October 7, 2014 6:55 PM, Shobhit wrote: > Hi, > I am trying to get the exact search term coming at top in Solr search > results, but solr is not returning the exact matching records on top, > instead exact matching terms are coming somewhere down after few records. > > For example : > I am searching for term "New York World", and I want the New York World to > come on top of solr search results, but solr is returning results as , > > New York World Journal > New York World Telegram > New York World > > *Search query used : * > > http://localhost:8981/typeahead/suggest/?q=new+york+world > > *schema.xml * > > > > > > > ignoreCase="true" expand="true"/> > > minGramSize="1"/> > > > > > > > replacement="$1" replace="all"/> > > > > > multiValued="true"/> > > *solrconfig.xml* > > requestHandler name="typeahead" class="solr.SearchHandler"> > > json > 10 > true > autosuggest > AND > > name_s,pk_id,city_s,state_s,country_s > > > kindly provide your suggestions to achieve this. > > > > -- > View this message in context: http://lucene.472066.n3.nabble.com/Exact-matches-are-not-coming-on-Top-for-autocomplete-search-results-tp4163162.html > Sent from the Solr - User mailing list archive at Nabble.com. >