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
@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! :)
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:
"&fq=title:
l be a bit different then:
q=new_ngram_field:utr
rows=0
facet=true
facet.field=non_analyzed_city_field
-Original message-
From: PeterKerk
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 for "u
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:
ue to enable the faceting
engine.
http://localhost:8983/solr/db/select/?wt=json&q=*:*&rows=0&facet=true&facet.field=city&facet.prefix=bost
-Original message-
From: PeterKerk
Sent: Thu 19-08-2010 17:11
To: solr-user@lucene.apache.org;
Subject: RE: Autosuggest on
Ok, I now tried this:
http://localhost:8983/solr/db/select/?wt=json&indent=on&q=*:*&fl=city&facet.field=city&facet.prefix=Bost
Then I get:
{
"responseHeader":{
"status":0,
"QTime":0,
"params":{
"fl":"city",
"indent":"on",
"q":"*:*",
"facet.prefix":"Bost",
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
EdgeNGramTok