2

I'm attempting to item boosting working with Solr and I can't for the life of me get it to work. I'm certain that I've had it working in the past for other projects.

The problem looks to be on the Solr configuration side. I'm using the indexing.resolveItemBoost pipeline to return a value, which is working. I can also verify that the boost is getting correctly serialized into the document to be sent to Solr by debugging in Sitecore.ContentSearch.SolrProvider.DocumentSerializers.SolrFieldBoostingDictionarySerializer.Serialize. So I'm pretty certain that the value is getting to Solr.

Despite that, I'm not getting boosting happening. If I do a query, I'm not seeing the boost applied. I can also look deeper into the Solr query that it's running and call something like this: http://localhost:8987/solr/site_search_web_index/select?wt=json&indent=true&q=_group:968d4570f0a64539b2657aacbed0dc65+OR+_group:cb855c58d0ca4fccbe64c98a3a7d922e&debugQuery=on. I see in the debug information the following:

  "sitecore://web/{968d4570-f0a6-4539-b265-7aacbed0dc65}?lang=en&ver=1&ndx=site_search_web":"\n3.693737 = product of:\n  7.387474 = sum of:\n    7.387474 = weight(_group:968d4570f0a64539b2657aacbed0dc65 in 18783) [ClassicSimilarity], result of:\n      7.387474 = score(doc=18783,freq=1.0), product of:\n        0.70710677 = queryWeight, product of:\n          10.447466 = idf(docFreq=1, maxDocs=25352)\n          0.06768213 = queryNorm\n        10.447466 = fieldWeight in 18783, product of:\n          1.0 = tf(freq=1.0), with freq of:\n            1.0 = termFreq=1.0\n          10.447466 = idf(docFreq=1, maxDocs=25352)\n          1.0 = fieldNorm(doc=18783)\n  0.5 = coord(1/2)\n",
  "sitecore://web/{cb855c58-d0ca-4fcc-be64-c98a3a7d922e}?lang=en&ver=1&ndx=site_search_web":"\n3.693737 = product of:\n  7.387474 = sum of:\n    7.387474 = weight(_group:cb855c58d0ca4fccbe64c98a3a7d922e in 18789) [ClassicSimilarity], result of:\n      7.387474 = score(doc=18789,freq=1.0), product of:\n        0.70710677 = queryWeight, product of:\n          10.447466 = idf(docFreq=1, maxDocs=25352)\n          0.06768213 = queryNorm\n        10.447466 = fieldWeight in 18789, product of:\n          1.0 = tf(freq=1.0), with freq of:\n            1.0 = termFreq=1.0\n          10.447466 = idf(docFreq=1, maxDocs=25352)\n          1.0 = fieldNorm(doc=18789)\n  0.5 = coord(1/2)\n"},

That indicates to me that two documents are matching and are resolving to the exact same score, and it doesn't look like the boost is coming into play.

I feel like I must be missing something in the Solr configuration, but I'm not sure what it could be.

Any thoughts?

We're using the following versions:

  • Sitecore 8.1 Update-2
  • Solr 4.10, but also tried 5.5.1
  • Solr Schema version 1.6, but also tried 1.4
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.