Re: i18n numbers

2009-03-27 Thread Robert Muir
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

RE: i18n numbers

2009-03-27 Thread Marcel Overdijk
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

RE: i18n numbers

2009-03-27 Thread Daan de Wit
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

Re: i18n numbers

2009-03-26 Thread Marcel Overdijk
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:

Re: i18n numbers

2009-03-26 Thread Robert Muir
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

Re: i18n numbers

2009-03-26 Thread Chris Lu
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

Re: i18n numbers

2009-03-26 Thread Marcel Overdijk
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

Re: i18n numbers

2009-03-26 Thread Erick Erickson
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