Elks
Elks

Reputation: 85

Returning price and thumbnail info from solr suggester

I am using the solr (6.5.1) suggester to return autocomplete results. I am trying to display a price and a thumbnail with the autocomplete results but can't find a way to do this.

Is there a way to return more fields?

I see these two questions from two years ago that seem to be trying to accomplish what I want, and both say that at the time it is not doable.

Solr Suggestion with multiple payloads

Returning an entire Document on Solr Suggestion

Has anything changed since two years ago?

Is there a different way that this can be accomplished?

Upvotes: 0

Views: 261

Answers (1)

Persimmonium
Persimmonium

Reputation: 15791

just put all info you need into a field, and use that field as payload. For example you could:

  1. append some string info, separated by |: payload:"17|/path/to/thumbnail"
  2. or you could use Solr BinaryField and put a Java pojo containing the info you need there serialized

I would go the simple route, the first one.

Upvotes: 2

Related Questions