Search code examples
solrsearch-suggestion

Number of fields returned by Solr Suggester


By the default Solr Suggester component is returning 3 fields for each of the suggestions:

{
    "term": "electronics and computer1",
    "weight": 2199,
    "payload": ""
}

Is there a way to extend number of fields returned for each of the suggestions? I would like to have for example additional fields here which I've added to the index (e.g. ID of an index record).


Solution

  • you can always stuff a number of infoss into a single payload field, separated by some char (like |). Simple, but works.