Utilize the payload field.
> I don't need to search multiple fields; I need to search just one field but
> get the corresponding values from another field as well.
> I.e. if a user is searching for cities, I wouldn't need the countries to
> also be searched.  However, when the list of cities is displayed, I need
> their corresponding countries to also be displayed.
> This is obviously possible with the regular Solr index, but I can't figure
> out how to do it with the Suggester index, which seems to only be able to
> have one field.
> Thanks
>
> On Fri, Apr 14, 2017 at 8:46 AM, Binoy Dalal <binoydala...@gmail.com> wrote:
>
>> You can create a copy field and copy to it from all the fields you want to
>> retrieve the suggestions from and then use that field with the suggester.
>>
>> On Thu 13 Apr, 2017, 23:21 OTH, <omer.t....@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I've followed the steps here to set up auto-suggest:
>>> https://lucidworks.com/2015/03/04/solr-suggester/
>>>
>>> So basically I configured the auto-suggester in solrconfig.xml, where I
>>> told it which field in my index needs to be used for auto-suggestion.
>>>
>>> The problem is:
>>> When the user searches in the text box in the front end, if they are
>>> searching for cities, I also need the countries to appear in the
>> drop-down
>>> list which the user sees.
>>> The field which is being searched is only 'city' here.  However, I need
>> to
>>> retrieve the corresponding value in the 'country' field as well.
>>>
>>> How could I do this using the suggester?
>>>
>>> Thanks
>>>
>> --
>> Regards,
>> Binoy Dalal
>>

Reply via email to