GreenRover
GreenRover

Reputation: 1526

solr: boost query will be ignored

Hello when i execute following query

fl=id model label timestamp score uuid&echoParams=all&qf=label^6 content_level_high^5 content_level_middle^2 content_level_less^1&hl.fl=teaser&wt=xml&rows=9&defType=edismax&facet=true&bq=model:"Component"^10 model:"Object"^90 model:"Address"^1 model:"eav_table_54f5d74b4efef9.49994240"^14&debugQuery=on&start=0&q=Fraumünster 

The same query easier to readable

defType=edismax
fl=id model label timestamp score uuid
qf=label^6 content_level_high^5 content_level_middle^2 content_level_less^1
bq=model:"Component"^10 model:"Object"^90 model:"Address"^1 model:"eav_table_54f5d74b4efef9.49994240"^14
q=Fraumünster
start=0
rows=9
wt=xml
facet=true
echoParams=all
debugQuery=on
hl.fl=teaser

to a solr 3.6.2 server it seams that the boost on "model" field will be totaly ignored.

Because all entrys get the same score by having a single hit in "label". So the order should imho be done by boost query order.

Here a full explain: http://explain.solr.pl/explains/ipu6qacf

The raw query result: http://pastebin.com/3uFdd8uw

Solr schema (for solr 5.x): http://pastebin.com/0pZB5gDt

Solr config: http://pastebin.com/Kd6W2nYD

The documents to in solr add syntax: http://pastebin.com/HMBrwAWV

Has anyone an idea what is wrong with the boost query?

Upvotes: 2

Views: 537

Answers (1)

Matthias M
Matthias M

Reputation: 14940

Please specify all boost queries in single parameters:

bq=model:"Component"^10&bq=model:"Object"^90&bq=model:"Address"^1&bq=model:"eav_table_54f5d74b4efef9.49994240"^14

Then the query is correctly parsed and recognized in the relevance:

+(content_level_less:chang | label:chang^6.0 | content_level_high:chang^5.0 | content_level_middle:chang^2.0) model:Component^10.0 model:Object^90.0 model:Address model:eav_table_54f5d74b4efef9.49994240^14.0

0.1813628 = (MATCH) sum of: 0.13184154 = (MATCH) max of: 0.13184154 = (MATCH) weight(label:chang^6.0 in 4) [DefaultSimilarity], result of: 0.13184154 = score(doc=4,freq=3.0), product of: 0.041205455 = queryWeight, product of: 6.0 = boost 1.8472979 = idf(docFreq=2, maxDocs=7) 0.003717633 = queryNorm 3.1996138 = fieldWeight in 4, product of: 1.7320508 = tf(freq=3.0), with freq of: 3.0 = termFreq=3.0 1.8472979 = idf(docFreq=2, maxDocs=7) 1.0 = fieldNorm(doc=4) 0.04952125 = (MATCH) weight(model:Component^10.0 in 4) [DefaultSimilarity], result of: 0.04952125 = score(doc=4,freq=1.0), product of: 0.04290709 = queryWeight, product of: 10.0 = boost 1.1541507 = idf(docFreq=5, maxDocs=7) 0.003717633 = queryNorm 1.1541507 = fieldWeight in 4, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 1.1541507 = idf(docFreq=5, maxDocs=7) 1.0 = fieldNorm(doc=4)

I hope that helps!

Upvotes: 2

Related Questions