On Thu, Jan 9, 2014 at 11:34 PM, PeterKerk <vettepa...@hotmail.com> 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 "-").
> But although the search of a user is case-insensitive, I want to return the
> values including casing, search on "new york" would return "New York",
> where
> the latter is how it's stored in my MS-SQL DB.
>

Did you have a look at Analyzing Suggestor, it might be a better match for
your needs:
http://blog.mikemccandless.com/2012/09/lucenes-new-analyzing-suggester.html

Regards,
   Alex.

Personal website: http://www.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all at
once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD book)

Reply via email to