Boost pages over media (PDFs)
- DarrenPotterParticipant5 years, 6 months ago #14408
Hi,
PDFs are dominating my search results a little too much. Can I use type to boost pages or give media files less weighting? If so, how do I do that?
Darren
DarrenPotterParticipant5 years, 6 months ago #14412Thanks for the reply. I tried it exactly as you showed it but the search broke and I got the following message:
Solr HTTP error: OK (400) {“error”:{“metadata”:[“error-class”,”org.apache.solr.common.SolrException”,”root-error-class”,”org.apache.solr.parser.TokenMgrError”],”msg”:”org.apache.solr.search.SyntaxError: Cannot parse ‘type:\”attachment\”^.5 type:\”page\”^1’: Lexical error at line 1, column 19. Encountered: \”.\” (46), after : \”\””,”code”:400}}
DarrenPotterParticipant5 years, 6 months ago #14414It’s WPSOLR PRO 19.5.
I tried those values. The search didn’t break this time but I’m not seeing any difference, even when I tried some pretty extreme boosts e.g.
attachment^1
page^3000wpsolrKeymaster5 years, 6 months ago #14416Mea culpa, I made my previous tests with Elasticsearch.
So, now with Solr, I confirm that partial decimals notation like “.5” crashes. One need to use “0.5”
So, the previous example should have been (for Solr):
attachment^0.5 page^1
But then, on my local env, the boosts work as expected, and PDFs are displayed after pages in results.
DarrenPotterParticipant5 years, 6 months ago #14420Thanks for the quick replies; I’ve managed to improve the results. Will look into upgrading!
You must be logged in to reply to this topic.