Solr 'boost' of results should find results that are not found by traditional Solr search
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3491446. -->
Reported by: [scott_euser](https://www.drupal.org/user/3267594)
Related to !852 !877
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Similar to <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/ai/issues/3481376" title="Status: Closed (fixed)">#3481376: For AI Search combined with database search, results are reordered by new results are not added</a></span>, ensure that the 'Boost' functionality actually combines results, finding results that would not otherwise be found.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>Search for something that Solr finds no results for (ie, no keyword match) but that vector search finds results for because of semantic match</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Currently using elevateIds but actually also need something like</p>
<pre>q=(text:"my content query" OR id:(123 124))</pre><p>
or if there are already braces</p>
<pre>q=((text:"my content query" AND text:"something else") OR id:(123 124))</pre><p>Note: syntax could be wrong here...</p>
<p>Goal is to ensure that if 123 or 124 are not results in a SOLR query, but are in a Vector query, they end up as results in the combined query. The elevateIds is still correct as is and should be left in place.</p>
<p>This probably needs to happen using hook_search_api_solr_converted_query_alter() - or really the event subscriber equivalent. Possibly via pre-query but not sure it supports nesting so needs testing.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>Solve the issue</p>
<h3 id="summary-ui-changes">User interface changes</h3>
<p>N/A</p>
<h3 id="summary-api-changes">API changes</h3>
<p>N/A</p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p>N/A</p>
issue