vanng822 / go-solr

Solr client in Go, core admin, add docs, update, delete, search and more
MIT License
69 stars 42 forks source link

Why can't i use Suggestion #59

Closed muthukumar4721 closed 2 weeks ago

muthukumar4721 commented 2 weeks ago

For example : if i send any productname or something to the solr, it should return the suggestions from the solr

vanng822 commented 2 weeks ago

I guess you mean this https://solr.apache.org/guide/6_6/suggester.html You have to set up in solr. This is a simple client. Once you set it up you could Resource https://github.com/vanng822/go-solr/blob/master/solr/search.go#L55

Will close this since it is not related to this lib

muthukumar4721 commented 2 weeks ago

Now got it, can I use the resource function from the search?

vanng822 commented 2 weeks ago

You can use Search by calling something like s.Resource("/products/suggest", ...some...params...)

Take look in https://github.com/vanng822/go-solr/blob/master/solr/search.go#L102