bq: I want to boost to show the document having id=2. but my query is no working.
Exactly _how_ is it not working? Boosting just influences position, it doesn't impose an absolute order. It's quite possible that you're successfully changing the score, just not enough to show. Use the debug=all, perhaps with explainOther just to see. The faster test would be to return the score with the document and try several different boosts to see if the score changes. Best, Erick On Thu, Dec 21, 2017 at 7:41 AM, Emir Arnautović <emir.arnauto...@sematext.com> wrote: > Hi, > Can you try: > &wt=json&&defType=edismax&indent=on > &q=video > &qf=object_desc_NGRAM^10 object_name^2 > > It is edismax that expands query to search in fields listed in qf. > > HTH, > Emir > -- > Monitoring - Log Management - Alerting - Anomaly Detection > Solr & Elasticsearch Consulting Support Training - http://sematext.com/ > > > >> On 21 Dec 2017, at 16:31, ruby <rshoss...@gmail.com> wrote: >> >> I'm playing with following query but can't get the *object_desc* field >> boosted correctly. Maybe someone can tell me what I'm missing here: >> >> &wt=json&&defType=edismax&indent=on >> &q=object_name_NGRAM:video OR object_desc_NGRAM:video >> &qf=object_desc_NGRAM^10 object_name^2 >> >> field definition: >> <fieldType name="text_ngram" class="solr.TextField" >> positionIncrementGap="100"> >> <analyzer type="index"> >> <tokenizer class="solr.StandardTokenizerFactory"/> >> <tokenizer class="solr.LowerCaseTokenizerFactory"/> >> <filter class="solr.EdgeNGramFilterFactory" minGramSize="1" >> maxGramSize="50"/> >> </analyzer> >> <analyzer type="query"> >> <tokenizer class="solr.StandardTokenizerFactory"/> >> <tokenizer class="solr.LowerCaseTokenizerFactory"/> >> </analyzer> >> </fieldType> >> >> <field indexed="true" multiValued="true" >> name="object_name_NGRAM" >> required="false" >> stored="false" >> type="text_ngram"/> >> >> <field indexed="true" multiValued="true" >> name="object_desc_NGRAM" >> required="false" >> stored="false" >> type="text_ngram"/> >> >> >> example documents: >> <doc> >> <field name="id">1</field> >> <field name="object_name_NGRAM">video gaming</field> >> <field name="object_desc_NGRAM">economic</field> >> </doc> >> >> >> <doc> >> <field name="id">2</field> >> <field name="object_name_NGRAM">economic</field> >> <field name="object_desc_NGRAM">video</field> >> </doc> >> >> <doc> >> <field name="id">2</field> >> <field name="object_name_NGRAM">video gaming is an economic >> business</field> >> <field name="object_desc_NGRAM">gaming</field> >> </doc> >> >> >> I want to boost to show the document having id=2. but my query is no >> working. >> >> >> >> -- >> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html >