Re: Range queries get misinterpreted when parsed twice via the "Standard" parsers

2017-03-10 Thread Michael McCandless
Why don't we fix this in Lucene? It sounds like your fix (overriding toQueryString for the range query nodes) is contained? Could you open an issue and add a patch? I agree it's silly to produce [ts:X ts:Y] syntax. Mike McCandless http://blog.mikemccandless.com On Thu, Mar 9, 2017 at 8:59 PM,

Re: Range queries get misinterpreted when parsed twice via the "Standard" parsers

2017-03-09 Thread Michael Peterson
Everyone - thanks for the feedback. Trejkaz, I agree. The [ts:X ts:Y] range syntax seems odd at best and broken at worst. If the field name for the range has to be the same for both the lower and upper bound why put it there twice inside the braces? In addition, a user cannot type that syntax and

Re: Range queries get misinterpreted when parsed twice via the "Standard" parsers

2017-03-09 Thread Trejkaz
On Fri, 10 Mar 2017 at 01:19, Erick Erickson wrote: > There has never been a guarantee that going back and forth between a > parsed query and its string representation is idempotent. so this > isn't supported. Maybe delete the toQueryString method... There is a fundamental design problem with

Re: Range queries get misinterpreted when parsed twice via the "Standard" parsers

2017-03-09 Thread Erick Erickson
There has never been a guarantee that going back and forth between a parsed query and its string representation is idempotent. so this isn't supported. Best, Erick On Thu, Mar 9, 2017 at 5:58 AM, Michael Peterson wrote: > Hello, > > At Rocana we have a search system that builds a Lucene query on

Re: Range queries in successive positions

2012-03-02 Thread Ian Lea
Or take a look at search.regex.RegexQuery contrib module. You won't be able to use that via QueryParser either. It might make more sense to do the sanitizing before indexing rather than after. -- Ian. On Fri, Mar 2, 2012 at 7:26 AM, Trejkaz wrote: > On Fri, Mar 2, 2012 at 6:22 PM, su ha wro

Re: Range queries in successive positions

2012-03-01 Thread Trejkaz
On Fri, Mar 2, 2012 at 6:22 PM, su ha wrote: > Hi, > I'm new to Lucene. I'm indexed some documents with Lucene and need to > sanitize it to ensure > that they do not have any social security numbers (3-digits 2-digits > 4-digits). > > (How) Can I write a query (with the QueryParser) that searche

Re: Range Queries Performance Hit

2010-03-25 Thread Ian Lea
That question should be asked on the clucene list. This is the java-user lucene list. -- Ian. On Thu, Mar 25, 2010 at 12:19 PM, wrote: > > Hi, > > Is there something of this sort  provided in clucene as well..lucene for > c++ ??? > > thanks, > Suman > >> No.  See java classes >> >> org.apach

Re: Range Queries Performance Hit

2010-03-25 Thread suman . holani
Hi, Is there something of this sort provided in clucene as well..lucene for c++ ??? thanks, Suman > No. See java classes > > org.apache.lucene.search.NumericRangeQuery > org.apache.lucene.document.NumericField > > See also recent thread on this list with subject "Lucene 3.0 Search > Performan

Re: Range Queries Performance Hit

2010-03-25 Thread Ian Lea
No. See java classes org.apache.lucene.search.NumericRangeQuery org.apache.lucene.document.NumericField See also recent thread on this list with subject "Lucene 3.0 Search Performance Stats". -- Ian. On Thu, Mar 25, 2010 at 11:53 AM, wrote: > > U mean I need to use padding technique in ind

RE: Range Queries Performance Hit

2010-03-25 Thread suman . holani
U mean I need to use padding technique in indexing and searching in order to make numeric searches rt? for numbers 1...10 indexes should be 01 0210 rather than 1 10 2.9 thanks, Suman > You should use NumericRangeQuery and NumericField (since 2.9). > > - > Uwe Schindler > H.-H.-Me

RE: Range Queries Performance Hit

2010-03-25 Thread Uwe Schindler
You should use NumericRangeQuery and NumericField (since 2.9). - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message- > From: suman.hol...@zapak.co.in [mailto:suman.hol...@zapak.co.in] > Sent: Thursday, March 25, 2010

Re: Range queries in Lucene - numerical or lexicographical

2007-08-13 Thread Erick Erickson
U, because I didn't write the code? You can always contribute a patch. On 8/13/07, Mohammad Norouzi <[EMAIL PROTECTED]> wrote: > > Thanks Erick but unfortunately NumberTools works only with long primitive > type I am wondering why you didn't put some method for double and float. > > > > On 8/1

Re: Range queries in Lucene - numerical or lexicographical

2007-08-12 Thread Chris Hostetter
: Subject: Re: Range queries in Lucene - numerical or lexicographical : : Thanks. Probably this should be mentioned on the documentation page. it does say right above the "date" example: " Sorting is done lexicographically." (Admitedly I'm not sure why the word

Re: Range queries in Lucene - numerical or lexicographical

2007-08-12 Thread Mohammad Norouzi
Thanks Erick but unfortunately NumberTools works only with long primitive type I am wondering why you didn't put some method for double and float. On 8/13/07, Nilesh Bansal <[EMAIL PROTECTED]> wrote: > > Thanks. Probably this should be mentioned on the documentation page. > > -Nilesh > > On 8/12

Re: Range queries in Lucene - numerical or lexicographical

2007-08-12 Thread Nilesh Bansal
Thanks. Probably this should be mentioned on the documentation page. -Nilesh On 8/12/07, Erick Erickson <[EMAIL PROTECTED]> wrote: > As has been discussed several times, Lucene is a string-only engine, and > has no native understanding of numerical values. You have to normalize > them for string

Re: Range queries in Lucene - numerical or lexicographical

2007-08-12 Thread Erick Erickson
As has been discussed several times, Lucene is a string-only engine, and has no native understanding of numerical values. You have to normalize them for string searches. See NumberTools. Best Erick On 8/11/07, Nilesh Bansal <[EMAIL PROTECTED]> wrote: > > Hi all, > > Lucene query parser synax page

re :Range queries

2006-05-09 Thread Nadav Har'El
"Kinnar Kumar Sen, Noida" <[EMAIL PROTECTED]> wrote on 09/05/2006 12:57:16 PM: > When I am trying RANGE QUERY on my index it works fine for a small > index but when the index is large such as 0 - 100 it gives an > exception > > Boolean Clause Exception I have set the 1024 value in boole

RE: Range queries

2006-05-09 Thread mark harwood
Typically the 3 most important things to remember when using numerical range queries are: 1) Use a filter instead. 2) Use a filter instead. 3) Use a filter instead. Seriously, number rangeQueries are normally a bad idea because: a) they can produce "too many term" errors (your current problem) b

RE: Range queries

2006-05-09 Thread Ramana Jelda
the best. Jelda > -Original Message- > From: Kinnar Kumar Sen, Noida [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 09, 2006 11:57 AM > To: java-user@lucene.apache.org > Cc: [EMAIL PROTECTED] > Subject: re :Range queries > > > Hi > > When I am

re :Range queries

2006-05-09 Thread Kinnar Kumar Sen, Noida
Hi When I am trying RANGE QUERY on my index it works fine for a small index but when the index is large such as 0 - 100 it gives an exception Boolean Clause Exception I have set the 1024 value in boolean to integer.max but now is giving a out of memory exception . Can some body sugg

RE: Range queries

2006-01-25 Thread Mike Streeton
many Boolean queries or does not return any results at all. Mike -Original Message- From: Mike Streeton [mailto:[EMAIL PROTECTED] Sent: 25 January 2006 11:28 To: java-user@lucene.apache.org Subject: RE: Range queries I can recommend this method, this is how we do it, but what we store in

RE: Range queries

2006-01-25 Thread Mike Streeton
are more difficult and so far I have used the same technique to do fixed position floats. Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Hostetter Sent: 24 January 2006 22:37 To: java-user@lucene.apache.org Subject: Re: Range queries : As

Re: Range queries

2006-01-24 Thread Chris Hostetter
: As Gwyn pointed out, that would make -3 > -2. Personally, I'd use : unsigned numbers and shift the range -- for 16 bit numbers I'd map : -32768..32767 to 0..65535 by adding 32768. I guess you could do that by : having overriding getRangeQuery() (LIA, p207 -- wonderful book). there are a lot

Re: Range queries

2006-01-24 Thread John Haxby
Erik Hatcher wrote: 2. How do I search for negative numbers in a range. For example field:[-3 TO 2] ? I don't mind hacking code such that my numbers are indexed as +0001 and -0001 and then I can override the query parser to change my query to [-003 TO +002]. However.. "+"

RE: Range queries

2006-01-24 Thread Gwyn Carwardine
>> 2. How do I search for negative numbers in a range. For example >> field:[-3 TO >> 2] ? >> >> I don't mind hacking code such that my numbers are indexed as >> +0001 and >> -0001 and then I can override the query parser to change my >> query to >> [-003 TO +002]. However.. "

Re: Range queries

2006-01-24 Thread Erik Hatcher
On Jan 23, 2006, at 10:38 AM, Gwyn Carwardine wrote: Two queries about ranges: 1. field:[a TO z] does not return the same as field:[z TO a] I think it should. The standard QueryParser or even the range query should ascertain the lowest and highest and switch them around if necessary This