lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angel Todorov <attodo...@gmail.com>
Subject Re: SOLR Suggester returns either the full field value or single terms only
Date Tue, 27 Jun 2017 12:37:20 GMT
Hi Alessandro,

Thanks. I've experimented a bit more and here is what I have discovered -
 If my query is enclosed with quotes, then i get multi terms, if it is not
enclosed in quotes, i only get single terms,

Example: will only return single terms:

http://localhost:8080/solr/<core
name>/suggest?suggest=true&suggest.dictionary=mySuggester&wt=json&suggest.q=
*video*

Sample result:

{"responseHeader":{"status":0,"QTime":32},"suggest":{"mySuggester":{"video":{"numFound":10,"suggestions":[{"term":"video","weight":4169589427484439,"payload":""},{"term":"videos","weight":274540867653296,"payload":""},{"term":"videopilot5011pilot2016","weight":137270433826648,"payload":""},{"term":"videoplaylisthttp","weight":137270433826648,"payload":""},{"term":"videotransition","weight":34317608456662,"payload":""}]
.... }}}}

Example: multiterm results

http://localhost:8080/solr/<core
name>/suggest?suggest=true&suggest.dictionary=mySuggester&wt=json&suggest.q=
*"video"*

{"responseHeader":{"status":0,"QTime":12},"suggest":{"mySuggester":{"\"video\"":{"numFound":10,"suggestions":[{"term":"video
shows","weight":3491976244405923328,"payload":""},{"term":"video
from","weight":948906588153783552,"payload":""},{"term":"video
leaving","weight":189781317630756704,"payload":""},{"term":"video
entitled","weight":151825054104605376,"payload":""}}] .... }}}}

What's more , if my query is something like "video g", i get results that
don't include "video", for example:

http://localhost:8080/solr/<core
name>/suggest?suggest=true&suggest.dictionary=mySuggester&wt=json&suggest.q=*"video
g"*

{"responseHeader":{"status":0,"QTime":48},"suggest":{"mySuggester":{"\"video
g\"":{"numFound":10,"suggestions":[{"term":"g
eo","weight":952090016707589760,"payload":""},{"term":"g
em","weight":297528130221121792,"payload":""},{"term":"g
spokesperson","weight":297528130221121792,"payload":""},{"term":"g
prepares","weight":238022504176897440,"payload":""}]}}}}

and so on. I am not sure why it's working in this way, but it doesn't seem
right to me. I am running on SOLR 5.1, if it makes any difference. Could it
be the solr version?

Thanks again,
Angel


On Tue, Jun 27, 2017 at 11:43 AM, alessandro.benedetti <a.benedetti@sease.io
> wrote:

> Hi Angel,
> can you give me an example of query, a couple of documents of example, and
> the suggestions you get ( which you don't expect) ?
>
> The config seems fine ( I remember there were some tricky problems with the
> default separator, but a space should be fine there).
>
> Cheers
>
>
>
> -----
> ---------------
> Alessandro Benedetti
> Search Consultant, R&D Software Engineer, Director
> Sease Ltd. - www.sease.io
> --
> View this message in context: http://lucene.472066.n3.
> nabble.com/SOLR-Suggester-returns-either-the-full-field-
> value-or-single-terms-only-tp4342763p4342987.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message