this is really no problem at all... use RBBI to identify runs of numbers in
your query string, and then replace them with the normalized version. you
will need icu jar for this.
String userQuery = "Potter 19,99";
Locale locale = new Locale("nl");
RuleBasedBreakIterator bi = (RuleBa
nal Message-
>> From: Marcel Overdijk [mailto:marceloverd...@gmail.com]
>> Sent: vrijdag 27 maart 2009 7:55
>> To: java-user@lucene.apache.org
>> Subject: Re: i18n numbers
>>
>>
>> That would make sense yes.
>>
>> But the problem is I'm havi
7:55
> To: java-user@lucene.apache.org
> Subject: Re: i18n numbers
>
>
> That would make sense yes.
>
> But the problem is I'm having a general query filed. I don't know user
> entered String or a number, or what he meant... Is 2008 a year
(number) or
> part of an
That would make sense yes.
But the problem is I'm having a general query filed. I don't know user
entered String or a number, or what he meant... Is 2008 a year (number) or
part of an address String e.g. keeping the address.
Or maybe he's combining stuff like "Potter 19,99"
Robert Muir wrote:
marcel,
I'd suggest parsing/display numbers in a locale-sensitive way with
NumberFormat (be sure to supply correct locale)... and keeping them in the
index one consistent way (i.e. 19.99)
On Thu, Mar 26, 2009 at 6:03 PM, Marcel Overdijk
wrote:
>
> Thanks for your reply.
>
> It's indeed a webap
Marcel,
First of all, do you really want the user to search price:19.99 ?
Maybe you should use some logic like price>=19.99?
If so, you should use range query to handle this case.
--
Chris Lu
-
Instant Scalable Full-Text Search On Any Database/Application
site: http://www
Thanks for your reply.
It's indeed a webapp with a html front-end.
I agree letting end-user enter a Lucene query might not what you want.
Probably I will be using an "all" index which indexes all fields of my
entity. So in the book example including book title, isbn, price,
author.firstname, aut
What does the front end look like? Is it a web page or a custom app? And
do you expect your users to actually enter the field name? I'd be reluctant
to allow any but the geekiest of users to enter the Lucene syntax (i.e. the
field
names). Users shouldn't know anything about the underlying structure