Closed (fixed)
Project:
Search API
Version:
8.x-1.x-dev
Component:
Plugins
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Jul 2018 at 14:26 UTC
Updated:
8 Mar 2019 at 19:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
brettboylen commentedAdded a patch that I believe fixes the issue.
Comment #3
borisson_Not sure if this resolves the issue. I see that this issue was made against an old Search API version. Does this still happen on the latest version?
Comment #4
drunken monkeyThe proposed change does make sense, thanks! When a boost was already set for an item, it does make sense that old and new boost should be multiplie.
However, as Joris says, it's unclear how this relates to your problem description. Do you have multiple processors enabled that influence boost, or some other item boost setup?
Moreover, without your change, the type boost processor should still work fine, just overwrite whatever boost comes in before. So, it's even less clear what the relation between problem and solution is.
Finally, before we can commit this, this would also need a regression test. Probably just another test in
TypeBoostTestwhich sets a boost on an item before sending it to be preprocessed and then checking whether the boosts got correctly multiplied.Comment #5
brettboylen commented@drunken monkey,
We are using elasticsearch_connector which lets boosts to be set on a per-field basis. The problem is that type-specific boosting doesn't work at all in this case. I can give you more details on exactly what we have setup, upon request, if you want. I have two child issues associated with this same issue report. One is for the search api solr module, so this does not seem to only be affecting elasticsearch_connector.
Comment #6
drunken monkeyWhat would be helpful is if you could tell me whether the items arriving in the backend plugin’s
indexItems()method (no matter whether ES or Solr) actually have an item boost set according to their type. If they do, the problem is not in the Search API, but in the backend plugin. (It's possible that the same bug exists for both the ES and Solr plugins – could, e.g., be Lucene-specific.)Comment #7
brettboylen commentedI can review that sometime this week and get back to you on that request. You may be correct in stating that it could be the same bug existing in both modules, but I'll have to check and get back to you.
Thanks!
Comment #8
kleve commented@drunken-monkey I can verify that the boost is indeed passed to the backend plugin´s indexItems(). For more details, see related post here https://www.drupal.org/project/elasticsearch_connector/issues/2980257#co...
Comment #9
drunken monkeyAlright, thanks for confirming this!
Then let’s just add the test and commit this small improvement.
Comment #10
borisson_Yep, that improvement does seem like it improves things. Great work @drunken monkey!
Comment #11
brettboylen commentedGood work with the tests! My sincerest apologies that I didn't have time to go back and confirm what you had requested regarding
indexItems(). Too busy with work, unfortunately.Comment #12
drunken monkeySeems I forgot to upload the actual patch? Doing that now – if test bot is happy, I’ll commit.
Comment #15
drunken monkeyAlright, looks good. Thanks for reviewing, Joris!
Committed.
Thanks again, everyone!