Sorry, that was formatted. The quotes are actually escaped, like this:

{"term":"<b>m</b>icrosoft office","weight":14,"payload":"{\"count\": 1534255, 
\"id\": \"microsoft office\"}”}

wunder
Walter Underwood
wun...@wunderwood.org
http://observer.wunderwood.org/  (my blog)


> On Apr 15, 2017, at 10:40 AM, Walter Underwood <wun...@wunderwood.org> wrote:
> 
> JSON does not have a binary data type, so true BLOBs are not possible in 
> JSON. Sorry, I wasn’t clear.
> 
> The payload I use is JSON in a string. It looks like this:
> 
> suggest: {
> skill_names_infix: {
> m: {
> numFound: 10,
> suggestions: [
> {
> term: "<b>m</b>icrosoft office",
> weight: 14,
> payload: "{"count": 1534255, "id": "microsoft office"}"
> },
> {
> term: "<b>m</b>icrosoft excel",
> weight: 13,
> payload: "{"count": 940151, "id": "microsoft excel"}"
> },
> 
> wunder
> wunder
> Walter Underwood
> wun...@wunderwood.org
> http://observer.wunderwood.org/  (my blog)
> 
> 
>> On Apr 15, 2017, at 9:07 AM, OTH <omer.t....@gmail.com> wrote:
>> 
>> Hi - just wondering, what would be the difference between using a blob /
>> binary field to store the JSON rather than simply using a string field?
>> Thanks
>> 
>> On Sat, Apr 15, 2017 at 2:50 AM, Walter Underwood <wun...@wunderwood.org>
>> wrote:
>> 
>>> We recently needed multiple values in the payload, so I put a JSON blob in
>>> there. It comes back as a string, so you have to decode that JSON
>>> separately. Otherwise, it was a pretty clean solution.
>>> 
>>> wunder
>>> Walter Underwood
>>> wun...@wunderwood.org
>>> http://observer.wunderwood.org/  (my blog)
>>> 
>>> 
>>>> On Apr 14, 2017, at 1:57 PM, OTH <omer.t....@gmail.com> wrote:
>>>> 
>>>> Thanks, that works!  But is it possible to have multiple payloadFields?
>>>> 
>>>> On Sat, Apr 15, 2017 at 1:23 AM, Marek Tichy <ma...@gn.apc.org> wrote:
>>>> 
>>>>> 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