Re: Score higher if multiple terms match

2017-06-08 Thread David Hastings
Agreed, you need to show the debug query info from your original query: My syntax is something like this: >> >>> >> http://localhost:8983/solr/sales/select?indent=on&wt=json&; >> >>> >> fl=*,score&q=name:tv >> >>> >> promotion and could probably help you get the results you want On Thu, Jun 8,

Re: Score higher if multiple terms match

2017-06-08 Thread Erick Erickson
bq: I hope that clears the confusion. Nope, doesn't clear it up at all. It's not clear which query you're talking about at least to me. If you're searching for name:tv AND name:promotion and getting back a document that has only "tv" in the name field that's simply wrong and you need to find

Re: Score higher if multiple terms match

2017-06-08 Thread OTH
Hi - Sorry it was very late at night for me and I think I didn't pick my wordings right. bq: it is indeed returning documents with only either one of the two query terms What I meant was: Initially, I thought it was only returning documents which contained both 'tv' and 'promotion'. Then I realiz

Re: Score higher if multiple terms match

2017-06-07 Thread Erick Erickson
bq: it is indeed returning documents with only either one of the two query terms Uhm, this should not be true. What's the output of adding debug=query? And are you totally sure the above is true and you're just not seeing the other term in the return? Or that you have a synonyms file that is someh

Re: Score higher if multiple terms match

2017-06-07 Thread OTH
I'm sorry, there was a mistake. I previously wrote: However, these are returning only those documents which have both the terms > 'tv promotion' in them (there are a few). It's not returning any > document which have only 'tv' or only 'promotion' in them. That's not true at all; it is indeed r

Re: Score higher if multiple terms match

2017-06-07 Thread OTH
Thanks. Both of these are working in my case: name:"tv promotion" --> name:"tv promotion" name:tv AND name:promotion --> name:tv AND name:promotion (Although I'm assuming, the first might not have worked if my document had been say 'promotion tv' or 'tv xyz promotion') However, these are return

Re: Score higher if multiple terms match

2017-06-07 Thread David Hastings
sorry, i meant debug query where you would get output like this: "debug": { "rawquerystring": "name:tv promotion", "querystring": "name:tv promotion", "parsedquery": "+name:tv +text:promotion", On Wed, Jun 7, 2017 at 4:41 PM, David Hastings wrote: > well, short answer, use the anal

Re: Score higher if multiple terms match

2017-06-07 Thread David Hastings
well, short answer, use the analyzer to see whats happening. long answer theres a difference between name:tv promotion --> name:tv default_field:promotion name:"tv promotion" --> name:"tv promotion" name:tv AND name:promotion --> name:tv AND name:promotion since your default field most lik