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 B09B118727 for ; Tue, 16 Feb 2016 12:50:10 +0000 (UTC) Received: (qmail 39229 invoked by uid 500); 16 Feb 2016 12:50:06 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 39152 invoked by uid 500); 16 Feb 2016 12:50: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 Received: (qmail 39141 invoked by uid 99); 16 Feb 2016 12:50:06 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Feb 2016 12:50:06 +0000 Received: from mail-ob0-f177.google.com (mail-ob0-f177.google.com [209.85.214.177]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id C24B41A03E7 for ; Tue, 16 Feb 2016 12:50:05 +0000 (UTC) Received: by mail-ob0-f177.google.com with SMTP id jq7so71815026obb.0 for ; Tue, 16 Feb 2016 04:50:05 -0800 (PST) X-Gm-Message-State: AG10YOTuO98PxEagRIDwaf9+WDQe/ngN/IXKWfBdNJIJ1Qb7Li2QcOfZEAyGPbnMGlhO9fupvL8VchSv+6x1Sg== MIME-Version: 1.0 X-Received: by 10.182.28.7 with SMTP id x7mr16432443obg.13.1455627005037; Tue, 16 Feb 2016 04:50:05 -0800 (PST) Received: by 10.202.48.137 with HTTP; Tue, 16 Feb 2016 04:50:04 -0800 (PST) In-Reply-To: References: <1455539837623-4257367.post@n3.nabble.com> <1455542430632-4257378.post@n3.nabble.com> <1455559819167-4257420.post@n3.nabble.com> <1455599921170-4257510.post@n3.nabble.com> <56C2D64F.9040801@sematext.com> Date: Tue, 16 Feb 2016 12:50:04 +0000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: SOLR ranking From: Alessandro Benedetti To: "solr-user@lucene.apache.org" Content-Type: multipart/alternative; boundary=089e015380ba8f9906052be292c2 --089e015380ba8f9906052be292c2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable You can describe the pf field as an exact phrase query : ""~0 . But You can specify the slop with : The ps Parameter Default amount of slop on phrase queries built with pf, pf2 and/or pf3 fiel= ds (affects boosting). Just take a look to the edismax page in the wiki, it seems well described : https://cwiki.apache.org/confluence/display/solr/The+Extended+DisMax+Query+= Parser But if this is what you want : Query : A B Results : 1) A B 2) A C B 3) A C C B ... 4) A C C C C C C C C C B It's not going to be simple. On 16 February 2016 at 12:33, Binoy Dalal wrote: > By my understanding, it will depend on whether you're explicitly running > the phrase query or whether you're also searching for the terms > individually. > In the first case, it will not match. > In the second case, it will match just as long as your field contains all > the terms. > > On Tue, 16 Feb 2016, 17:52 Modassar Ather wrote: > > > In that case will a phrase with a given slop match a document having th= e > > terms of the given phrase with more than the given slop in between them > > when pf field and mm=3D100%? Per my understanding as a phrase it will n= ot > > match for sure. > > > > Best, > > Modassar > > > > > > On Tue, Feb 16, 2016 at 5:26 PM, Alessandro Benedetti < > > abenedetti@apache.org > > > wrote: > > > > > If I remember well , it is going to be as a phrase query ( when you u= se > > the > > > "quotes") . > > > So the close proximity means a match of the phrase with 0 tolerance ( > so > > > the terms must respect the position distance in the query). > > > If I remember well I debugged that recently. > > > > > > Cheers > > > > > > On 16 February 2016 at 11:42, Modassar Ather > > > wrote: > > > > > > > Actually you can get it with the edismax. > > > > Just set mm to 100% and then configure a pf field ( or more) . > > > > You are going to search all the search terms mandatory and boost > > phrases > > > > match . > > > > > > > > @Alessandro Thanks for your insight. > > > > I thought that the document will be boosted if all of the terms > appear > > in > > > > close proximity by setting pf. Not sure how much is meant by the > close > > > > proximity. Checked it on dismax query parser wiki too. > > > > > > > > Best, > > > > Modassar > > > > > > > > On Tue, Feb 16, 2016 at 3:36 PM, Alessandro Benedetti < > > > > abenedetti@apache.org > > > > > wrote: > > > > > > > > > Binoy, the omitTermFreqAndPositions is set only for text_ws which > is > > > used > > > > > only on the "indexed_terms" field. > > > > > The text_general fields seem fine to me. > > > > > > > > > > Are you omitting norms on purpose ? To be fair it could be releva= nt > > in > > > > > title or short topic searches to boost up short field values, > > > containing > > > > a > > > > > lot of terms from the searched query. > > > > > > > > > > To respond Modassar : > > > > > > > > > > I don't think the phrase will be searched as individual ANDed ter= ms > > > until > > > > > > the query has it like below. > > > > > > "Eating Disorders" OR (Eating AND Disorders). > > > > > > > > > > > > > > > > Actually you can get it with the edismax. > > > > > Just set mm to 100% and then configure a pf field ( or more) . > > > > > You are going to search all the search terms mandatory and boost > > > phrases > > > > > match . > > > > > > > > > > Cheers > > > > > > > > > > On 16 February 2016 at 07:57, Emir Arnautovic < > > > > > emir.arnautovic@sematext.com> > > > > > wrote: > > > > > > > > > > > Hi Nitin, > > > > > > You can use pf parameter to boost results with exact phrase. Yo= u > > can > > > > also > > > > > > use pf2 and pf3 to boost results with bigrams (phrase matches > with > > 2 > > > > or 3 > > > > > > words in case input is with more than 3 words) > > > > > > > > > > > > Regards, > > > > > > Emir > > > > > > > > > > > > > > > > > > On 16.02.2016 06:18, Nitin.K wrote: > > > > > > > > > > > >> I am using edismax parser with the following query: > > > > > >> > > > > > >> > > > > > >> > > > > > > > > > > > > > > > localhost:8983/solr/tgl/select?q=3Deating%20disorders&wt=3Dxml&tie=3D1.0&= rows=3D200&q.op=3DAND&indent=3Dtrue&defType=3Dedismax&stopwords=3Dtrue&lowe= rcaseOperators=3Dtrue&debugQuery=3Dtrue&qf=3Dtopic_title%5E100+subtopic_tit= le%5E40+index_term%5E20+drug%5E15+content%5E3&pf2=3DtopTitle%5E200+subTopTi= tle%5E80+indTerm%5E40+drugString%5E30+content%5E6 > > > > > >> > > > > > >> Configuration of schema.xml > > > > > >> > > > > > >> > > > > stored=3D"true" > > > > > >> /> > > > > > >> > stored=3D"false"/> > > > > > >> > > > > > >> > > > > >> stored=3D"true"/> > > > > > >> > > > stored=3D"false"/> > > > > > >> > > > > > >> > stored=3D"true" > > > > > >> multiValued=3D"true"/> > > > > > >> stored=3D"false" > > > > > >> multiValued=3D"true"/> > > > > > >> > > > > > >> > > > > >> multiValued=3D"true"/> > > > > > >> > stored=3D"false" > > > > > >> multiValued=3D"true"/> > > > > > >> > > > > > >> > > > stored=3D"true"/> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > >> positionIncrementGap=3D"100" omitNorms=3D"true"> > > > > > >> > > > > > >> > > > > class=3D"solr.StandardTokenizerFactory"/> > > > > > >> > > > > >> ignoreCase=3D"true" > > > > > >> words=3D"stopwords.txt" /> > > > > > >> > > class=3D"solr.LowerCaseFilterFactory"/> > > > > > >> > > > > > >> > > > > > >> > > > > class=3D"solr.StandardTokenizerFactory"/> > > > > > >> > > > > >> ignoreCase=3D"true" > > > > > >> words=3D"stopwords.txt" /> > > > > > >> class=3D"solr.SynonymFilterFactory" > > > > > >> synonyms=3D"synonyms.txt" > > > > > >> ignoreCase=3D"true" expand=3D"true"/> > > > > > >> > > class=3D"solr.LowerCaseFilterFactory"/> > > > > > >> > > > > > >> > > > > > >> > > > > >> positionIncrementGap=3D"100" > > > > > >> omitTermFreqAndPositions=3D"true" omitNorms=3D"true"> > > > > > >> > > > > > >> > > > > >> class=3D"solr.WhitespaceTokenizerFactory"/> > > > > > >> > > > > >> ignoreCase=3D"true" > > > > > >> words=3D"stopwords.txt" /> > > > > > >> > > class=3D"solr.LowerCaseFilterFactory"/> > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> I want , if user will search for a phrase then that pharse > should > > > > always > > > > > >> takes the priority in comaprison to the individual words; > > > > > >> > > > > > >> Example: "Eating Disorders" > > > > > >> > > > > > >> First it will search for "Eating Disorders" together and then > the > > > > > >> individual > > > > > >> words "Eating" and "Disorders" > > > > > >> but while searching for individual words, it will always retur= n > > > those > > > > > >> documents where both the words should exist for which i am > already > > > > using > > > > > >> q.op=3D"AND" in my query. > > > > > >> > > > > > >> Thanks, > > > > > >> Nitin > > > > > >> > > > > > >> > > > > > >> > > > > > >> > > > > > >> -- > > > > > >> View this message in context: > > > > > >> > > > > > http://lucene.472066.n3.nabble.com/SOLR-ranking-tp4257367p4257510.html > > > > > >> Sent from the Solr - User mailing list archive at Nabble.com. > > > > > >> > > > > > > > > > > > > -- > > > > > > Monitoring * Alerting * Anomaly Detection * Centralized Log > > > Management > > > > > > Solr & Elasticsearch Support * http://sematext.com/ > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > -------------------------- > > > > > > > > > > Benedetti Alessandro > > > > > Visiting card : http://about.me/alessandro_benedetti > > > > > > > > > > "Tyger, tyger burning bright > > > > > In the forests of the night, > > > > > What immortal hand or eye > > > > > Could frame thy fearful symmetry?" > > > > > > > > > > William Blake - Songs of Experience -1794 England > > > > > > > > > > > > > > > > > > > > > -- > > > -------------------------- > > > > > > Benedetti Alessandro > > > Visiting card : http://about.me/alessandro_benedetti > > > > > > "Tyger, tyger burning bright > > > In the forests of the night, > > > What immortal hand or eye > > > Could frame thy fearful symmetry?" > > > > > > William Blake - Songs of Experience -1794 England > > > > > > -- > Regards, > Binoy Dalal > --=20 -------------------------- Benedetti Alessandro Visiting card : http://about.me/alessandro_benedetti "Tyger, tyger burning bright In the forests of the night, What immortal hand or eye Could frame thy fearful symmetry?" William Blake - Songs of Experience -1794 England --089e015380ba8f9906052be292c2--