HI Team,

I tried to run the same example as suggested by Chris Hostetter and i get
to know it's working fine for single field, but my requirement is it should
suggest based on multiple fields .i.e not only on "cat" field but it should
suggest based on few other fields like 'name','manu' etc. and due to
fuzzylookupfactory it's give suggestion based on starting characters, not
if users type any middle character of phrase eg. i tried with searching by
'stuff2' of 'electronics and stuff2' cat .

curl 'http://localhost:8983/solr/techproducts/suggest?wt=json&ind
ent=true&suggest.dictionary=mySuggester&suggest=true&suggest.q=stuff'
{
  "responseHeader":{
    "status":0,
    "QTime":2},
  "suggest":{"mySuggester":{
      "stuff":{
        "numFound":0,
        "suggestions":[]}}}}

On Fri, Apr 15, 2016 at 11:18 PM, Tejas Bhanushali <
contact.tejasbhanush...@gmail.com> wrote:

> Hi Team,
>
> Im getting the duplicate result when i do auto suggestion based on
> multiple filed by using copy filed . i have below table configuration .
>
> Segment -- have multiple category -- have multiple sub category -- have
> multiple products.
>
> suggestion are given based on
> segment name, category name, sub category name and product name.
>
> below is output .
>
> ---------------
>
> {
>   "responseHeader": {
>     "status": 0,
>     "QTime": 1375
>   },
>   "command": "build",
>   "suggest": {
>     "mySuggester": {
>       "Fruit": {
>         "numFound": 10,
>         "suggestions": [
>           {
>             "term": "<b>Fruit</b>s & Vegetables",
>             "weight": 1000,
>             "payload": ""
>           },
>           {
>             "term": "<b>Fruit</b>s & Vegetables",
>             "weight": 1000,
>             "payload": ""
>           },
>           {
>             "term": "<b>Fruit</b>s & Vegetables",
>             "weight": 980,
>             "payload": ""
>           },
>           {
>             "term": "<b>Fruit</b>s & Vegetables",
>             "weight": 980,
>             "payload": ""
>           },
>           {
>             "term": "<b>Fruit</b>s & Vegetables",
>             "weight": 800,
>             "payload": ""
>           },
>           {
>             "term": "<b>Fruit</b>s & Vegetables",
>             "weight": 588,
>             "payload": ""
>           },
>           {
>             "term": "Cut <b>Fruit</b>s",
>             "weight": 456,
>             "payload": ""
>           },
>           {
>             "term": "<b>Fruit</b>s",
>             "weight": 456,
>             "payload": ""
>           },
>           {
>             "term": "<b>Fruit</b>s & Vegetables",
>             "weight": 456,
>             "payload": ""
>           },
>           {
>             "term": "<b>Fruit</b>s",
>             "weight": 456,
>             "payload": ""
>           }
>         ]
>       }
>     }
>   }
> }
>
> --
> Thanks & Regards,
>
> Tejas Bhanushali
>



-- 
Thanks & Regards,

Tejas Bhanushali

Reply via email to