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,
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
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
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
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
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
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
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
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
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
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
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
: 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
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
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
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
"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
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
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
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
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
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
: 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
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.. "+"
>> 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.. "
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
26 matches
Mail list logo