How to index the absolute image url instead of image uri in search api drupal 8.

Image field formatter renders the image url but there is no option to index the url part.


It looks like that should be available as a field.

enter image description here

If your field name is "field_image", you would select "field_image:entity:uri". I think that would give you "public://path-to-file-in-public-directory.jpg"

You could add a custom field to your index in a custom module at src/Plugin/search_api/processor:

In this way, you can add any sort of custom value that's not available by default in the fields provided.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.