Re: Autosuggest on PART of cityname

2010-08-23 Thread gwk
On 8/20/2010 7:04 PM, PeterKerk wrote: @Markus: thanks, will try to work with that. @Gijs: I've looked at the site and the search function on your homepage is EXACTLY what I need! Do you have some Solr code samples for me to study perhaps? (I just need the relevant fields in the schema.xml and

RE: Autosuggest on PART of cityname

2010-08-20 Thread PeterKerk
Ok, I now do this (searching for utr in cityname): http://localhost:8983/solr/db/select/?wt=jsonindent=onq=*:*rows=0facet=truefacet.field=cityfacet.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

RE: Autosuggest on PART of cityname

2010-08-20 Thread Markus Jelsma
different then:   q=new_ngram_field:utr rows=0 facet=true facet.field=non_analyzed_city_field     -Original message- From: PeterKerk vettepa...@hotmail.com Sent: Fri 20-08-2010 12:36 To: solr-user@lucene.apache.org; Subject: RE: Autosuggest on PART of cityname Ok, I now do this (searching

Re: Autosuggest on PART of cityname

2010-08-20 Thread gwk
On 8/19/2010 4:45 PM, PeterKerk wrote: I want to have a Google-like autosuggest function on citynames. So when user types some characters I want to show cities that match those characters but ALSO the amount of locations that are in that city. Now with Solr I now have the parameter:

Re: Autosuggest on PART of cityname

2010-08-20 Thread PeterKerk
@Markus: thanks, will try to work with that. @Gijs: I've looked at the site and the search function on your homepage is EXACTLY what I need! Do you have some Solr code samples for me to study perhaps? (I just need the relevant fields in the schema.xml and the query url) It would help me a lot!

RE: Autosuggest on PART of cityname

2010-08-19 Thread Markus Jelsma
You need a new analyzed field with the EdgeNGramTokenizer or you can try facet.prefix for this to work. To retrieve the number of locations for that city, just use the results from the faceting engine as usual.   I'm unsure which approach is actually faster but i'd guess using the

RE: Autosuggest on PART of cityname

2010-08-19 Thread PeterKerk
Ok, I now tried this: http://localhost:8983/solr/db/select/?wt=jsonindent=onq=*:*fl=cityfacet.field=cityfacet.prefix=Bost Then I get: { responseHeader:{ status:0, QTime:0, params:{ fl:city, indent:on, q:*:*, facet.prefix:Bost, facet.field:city,

RE: Autosuggest on PART of cityname

2010-08-19 Thread Markus Jelsma
to enable the faceting engine.   http://localhost:8983/solr/db/select/?wt=jsonq=*:*rows=0facet=truefacet.field=cityfacet.prefix=bost   -Original message- From: PeterKerk vettepa...@hotmail.com Sent: Thu 19-08-2010 17:11 To: solr-user@lucene.apache.org; Subject: RE: Autosuggest on PART