Problem/Motivation

Scratch my original message, I see it is dynamically found, but the incorrect bit of the string for us is the prefix:
Our field:
knns_rendered_item_1

Calculated $solr_field:
knn_rendered_item_1

Steps to reproduce

Not sure here what the difference is, only can see SearchApiSolrDenseVectorConfigSubscriber::postConfigFilesGeneration() creates both

Proposed resolution

Not sure, for now we have extended PureVector and just set $solr_field ourselves manually.

Remaining tasks

MR

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

scott_euser created an issue. See original summary.

scott_euser’s picture

Title: Make retrieval of Solr dense vector field dynamic for rerank plugins » Solr dense vector field is knns_(solr_field) not knn_(solr_field)
Assigned: scott_euser » Unassigned
Issue summary: View changes

Got the issue wrong, updated summary and title

kevinquillen’s picture

I have only seen knn and not the other - what kind of field were you making a dense vector type?

kevinquillen’s picture

I am using an aggregated field with 5 text fields concatenated for dense vector.

scott_euser’s picture

Aha I see ill give that a shot to see if that is the difference. We tried rendered html (adding some contextual content)

kevinquillen’s picture

I'm sure there is a programmatic way to get the full id or prefix without doing that, I will have to check.

scott_euser’s picture

Status: Active » Needs review

This solves it for me, using the search api to solr field map

kevinquillen’s picture

You beat me to it, only I was trying this:

$vector_field = reset($vector_fields);
$solr_fields = $index->getServerInstance()->getBackend()->getSolrFieldNames($index);
$solr_field = $solr_fields[$vector_field->getFieldIdentifier()];
scott_euser’s picture

Yeah could keep it simpler, wasn't sure how reliable so did the fallback thing but probably not needed :)

kevinquillen’s picture

Status: Needs review » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

jan kellermann’s picture

The search didn't work for us either until we installed this patch. It would be great if you could tag a new RC so that others can save themselves the time. Thank you very much.

kevinquillen’s picture

Done. Guess I forgot to do that part.