What's the purpose of having two fields "title" and "title_search"?
They both are exactly the same so it seems you could get rid of
one
Just a nit.
Erick
As far as the analysis page is concerned, I suspect you took out
this definition from your solrconfig.xml file:
PUT IT BACK ;). Really,
@iorixxx: thanks, you 2nd solution worked.
The first one didn't (does not matter now), I got this:
With the first solution all queries work as expected, however with this:
q=title_search:"new%20yk"*
still new york is returned.
--
View this message in context:
http://lucene.472066.n3.nabb
Hi Peter,
Here are two different ways to do it.
1) Use phrase query q=yourField:"new y" with the following type.
2) Use prefix query q={!prefix f=yourField}new y with following type:
https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-PrefixQueryParser
On Thu, Jan 9, 2014 at 11:34 PM, PeterKerk wrote:
> Basically a user starts typing the first letters of a city and I want to
> return citynames that start with those letters, case-insensitive and not
> splitting the cityname on separate words (whether the separator is a
> whitespace or a "-").
>
Hi Ahmet,
Thanks. Also for that link, although it's too advanced for my usecase.
I see that by using KeywordTokenizerFactory it almost works now, but when I
search on:
"new y", no results are found,
but when I search on "new", I do get "New York".
So the space in the searchquery is still caus
Hi Peter,
Use KeywordTokenizerFactory instead of Whitespace tokenizer.
Also you might interested in this :
http://www.cominvent.com/2012/01/25/super-flexible-autocomplete-with-solr/
Ahmet
On Thursday, January 9, 2014 6:35 PM, PeterKerk wrote:
Basically a user starts typing the first letters
Basically a user starts typing the first letters of a city and I want to
return citynames that start with those letters, case-insensitive and not
splitting the cityname on separate words (whether the separator is a
whitespace or a "-").
But although the search of a user is case-insensitive, I want
@Ahmet:
Thanks, but I also need to be able to search via wildcard and just found
that a "-" might be resulting in unwanted results. E.g. when using this
query:
http://localhost:8983/solr/tt-cities/select/?indent=off&facet=false&fl=id,title,provincetitle_nl&q=title_search:nij*&defType=lucene&start
You can also use phrase queries as title_search:"new york" if your
intent is to find the words "new" and "york" right next to each other.
There's also "slop", as "new york"~3 if you want to find the two words
within 3 (in this example) positions of each other.
Take a look at the admin/analysis pag
Hi Peter,
q=title_search:new york parsed as title_search:new default_search_field:york.
If you use a tokenized type, use parenthesis q=title_search:(new york)
If you use string type, use term query parser q={!term f=city_search}new york
Ahmet
On Wednesday, January 8, 2014 11:22 AM, PeterKerk
10 matches
Mail list logo