Ok, I now do this (searching for "utr" in cityname):
http://localhost:8983/solr/db/select/?wt=json&indent=on&q=*:*&rows=0&facet=true&facet.field=city&facet.prefix=utr

In the DB there's 1 location with cityname 'Utrecht' and the other 1 is with
'Utrecht Overvecht'

So in my dropdown I would like:
Utrecht (1)
Utrecht Overvecht (1)

But I get this:
{
 "responseHeader":{
  "status":0,
  "QTime":0,
  "params":{
        "facet":"true",
        "indent":"on",
        "q":"*:*",
        "facet.prefix":"utr",
        "facet.field":"city",
        "wt":"json",
        "rows":"0"}},
 "response":{"numFound":6,"start":0,"docs":[]
 },
 "facet_counts":{
  "facet_queries":{},
  "facet_fields":{
        "city":[
         "utrecht",2,
         "utrechtovervecht",1]},
  "facet_dates":{}}}

As you can see it looks at field city, where the tokenizer looks at each
individual word. I also tried city_raw, but that was without any results.

How can I fix that my dropdown will show the correct values?
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Autosuggest-on-PART-of-cityname-tp1226088p1241444.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to