I think there is a bug in your collector, because the "int doc" that is
passed to the collect method is per-segment, but you are passing it to the
top-level reader.
You should override the setNextReader method in Collector, and hold onto
the "int docBase" that's passed in that LeafReaderContext, t
Not sure if I'm doi9ng something wrong, or there is a bug somewhere but:
I was trying to create a test index of a lot every second in a year and try
query it (doesn't have to be time, I'm using it to explain the problem).
Example document consists of 7 fields:
document.add(new IntPoint("year", y
Not sure if I'm doi9ng something wrong, or there is a bug somewhere but:
I was trying to create a test index of a lot every second in a year and try
query it (doesn't have to be time, I'm using it to explain the problem).
Example document consists of 7 fields:
document.add(new IntPoint("year", y
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
is sent over
> the network
> to the backend where it is parsed again into a Query object for searching
> with the
> IndexSearcher.
>
> We are using Lucene 5.5.0.
>
> We've hit a problem with range queries with this model - namely that a
> range query
> of the form
string and that query string is sent over
the network
to the backend where it is parsed again into a Query object for searching
with the
IndexSearcher.
We are using Lucene 5.5.0.
We've hit a problem with range queries with this model - namely that a
range query
of the form
ts:[1000 TO 2000]
all.
>>
>> Is this possible with the default QueryParser?
>> Or is there some other programmatic way to do it?
>
> The programmatic way is to use SpanMultiTermQueryWrapper around each
> RangeQuery and then SpanNearQuery around the lot.
>
> The default QueryParser pro
this possible with the default QueryParser?
> Or is there some other programmatic way to do it?
The programmatic way is to use SpanMultiTermQueryWrapper around each
RangeQuery and then SpanNearQuery around the lot.
The default QueryParser probably can't do it. I believe someone was
enhancing i
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 searches for this pattern?
e.g. I can do [000 to 999] or [00 to 9
Even though the NumericRangeQuery.new* methods do not support
BigInteger, the underlying recursive algorithm supports any sized
number.
Has this been explored?
-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For
gt;>>> 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...@za
.-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
t;
>> -
>> 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]
>>> Se
ndler
> 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 12:08 PM
>> To: java-user@luce
25, 2010 12:08 PM
> To: java-user@lucene.apache.org
> Subject: Range Queries Performance Hit
>
> Hello,
>
>
> Range queries are lowering down the performance of search.
> I am using date in my clucene application .
>
> lucene doc has these kind of fields:
>
Hello,
Range queries are lowering down the performance of search.
I am using date in my clucene application .
lucene doc has these kind of fields:
startdt="1242758400" enddt="1241980500"
now when i am searching for
searchingdate = new RangeQuery(lastyear time in sec
From: Jake Mannix [mailto:jake.man...@gmail.com]
> On Sun, Nov 15, 2009 at 11:02 PM, Uwe Schindler wrote:
>
>
> > the second approach is slower, when deleted docs
> > are involved and 0 is inside the range (need to consult TermDocs).
> >
>
> This is a good point (and should be mentioned in your
On Sun, Nov 15, 2009 at 11:02 PM, Uwe Schindler wrote:
> the second approach is slower, when deleted docs
> are involved and 0 is inside the range (need to consult TermDocs).
>
This is a good point (and should be mentioned in your blog, John) - for
while
custom FieldCache-like implementations (
ey
> Sent: Monday, November 16, 2009 7:55 AM
> To: java-user@lucene.apache.org
> Subject: Re: share some numbers for range queries
>
> On Mon, Nov 16, 2009 at 1:02 AM, John Wang wrote:
> > I did some performance analysis for different ways of doing numeric
> > ra
On Mon, Nov 16, 2009 at 1:02 AM, John Wang wrote:
> I did some performance analysis for different ways of doing numeric
> ranging with lucene. Thought I'd share:
FYI, the second approach is already implemented in both Lucene and Solr.
http://lucene.apache.org/java/2_9_1/api/core/org/apache/luce
Hi:
I did some performance analysis for different ways of doing numeric
ranging with lucene. Thought I'd share:
http://invertedindex.blogspot.com/2009/11/numeric-range-queries-comparison.html
-John
I'm in the design phase and not used lucene so far... that should come
pretty soon though.
The range query that I have been looking at in the API documentation and the
code, calls for a field name and subsequently search a field for range
(example of date searching)... and I did not see operators
Erick,
Sorry I meant the first option as in the range query for fields. Ok will
look at the span query most of the time the number of terms will small,
although there is one use case where it could go up to 50 consecutives
terms.
-Raymond-
On Tue, Mar 3, 2009 at 9:30 PM, Erick Erickson wrote:
>
Hi Raymond,
On 3/3/2009 at 1:19 PM, Raymond Balmès wrote:
> On Tue, Mar 3, 2009 at 7:18 PM, Raymond Balmès
> wrote:
> > Just a simplified view of my problem :
> >
> > A document contains the terms "index01 blabla index02 xxx yyy index03
> > ... index10". I have the terms indexed in the collection
But it's still not clear what the semantics of your
search are. Do you mean
"I want index04, index05, index06, index07 and index08
to appear in that order in the field"? If so you can use one
of the SpanQuery family, specifying a large slop and
respecting order. But this could get clumsy with large
sorry [index04 TO index 08]
On Tue, Mar 3, 2009 at 7:18 PM, Raymond Balmès wrote:
> Just a simplified view of my problem :
>
> A document contains the terms "index01 blabla index02 xxx yyy index03 ...
> index10". I have the terms indexed in the collection.
> I now want to look for documents whic
Just a simplified view of my problem :
A document contains the terms "index01 blabla index02 xxx yyy index03 ...
index10". I have the terms indexed in the collection.
I now want to look for documents which contains [page04 TO page08]... looks
like I can't do it
-RB-
On Tue, Mar 3, 2009 at 6:33 PM
Hi Raymond,
On 3/3/2009 at 12:04 PM, Raymond Balmès wrote:
> The range query only works on fields (using a string compare)... is
> there any reason why it is not possible on the words of the document.
>
> The following query [stringa TO stringb] would just give the list of
> documents which cont
Hi all,
The range query only works on fields (using a string compare)... is there
any reason why it is not possible on the words of the document.
The following query [stringa TO stringb] would just give the list of
documents which contains words between those two strings.
-RB-
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
Hi all,
Lucene query parser synax page
(http://lucene.apache.org/java/docs/queryparsersyntax.html) provides
the following two examples of range query:
mod_date:[20020101 TO 20030101]
and
title:{Aida TO Carmen}
Now my question is, numerically 10 is greater than 2, but in
string-only comparison 2 i
n I have set the 1024 value in boolean to
> integer.max but now is giving a out of memory exception . Can some body
> suggest me a way out or a technique to effectively use range queries I
> need to use this feature extensively for my application for ranges like
> 0 - 10 ,
Use "
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
curre
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
suggest me a way out or a technique to effectively use range queries I
need to use this feature extensively for my application for ranges like
0 - 10 ,
Regards and Thanks
Kinnar Kumar Sen
TO SUCEED BE DIFFERENT BE DARING AND BE THERE FIRST
DISCLAIMER
;01", ...
Thanks,
Koji
> -Original Message-
> From: Shivani Sawhney [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 09, 2006 12:20 AM
> To: java-user@lucene.apache.org
> Subject: Using Range Queries
>
>
> Hi,
>
>
>
> I am trying to search ac
}
-Original Message-
From: Shivani Sawhney [mailto:[EMAIL PROTECTED]
Sent: 08 February 2006 15:20
To: java-user@lucene.apache.org
Subject: Using Range Queries
Hi,
I am trying to search across some documents and have min and max
experience,
min and max ctc and email as some of the sea
Hi,
I am trying to search across some documents and have min and max experience,
min and max ctc and email as some of the search fields. I have problem using
the Range Query.
The problem is as follows. If I am trying to search for documents with exp
between 0 to 9, I get 15 hits, assuming that
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
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
2. How do I search for negative numbers in a range. For example
On Jan 5, 2006, at 4:42 PM, Urvashi Gadi wrote:
Any pointers on how to handle range queries if the data type is
double or float?
There is a bit of this on the wiki:
<http://wiki.apache.org/jakarta-lucene/SearchNumericalFields>
The main thing to note is that what is inde
Hi All,
Any pointers on how to handle range queries if the data type is double
or float?
Best,
Urvashi
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Tony,
If your improvements are of general utility, please contribute them.
Even if they are not, post them as-is and perhaps someone will take the
time to make them more reusable.
Cheers,
Doug
Tony Schwartz wrote:
I think there are a few things that should be added to lucene to really give
ich may require
changing how you construct Query objects in some way).
You need to ensure that the string representation of any terms used
for range queries be in lexicographical order. Every term in Lucene
is essentially a string.
Hope this helps
1. Use RangeFilters on the lowest precision date you need. If you only need
to filter
to the day, index the date in a separate field with day precision. This will
speed up
filter creation a great deal.
2. Use as few characters as possible when indexing, so if you can come up with
your own
da
Hi all,
I am new user of lucene. This query is posted at least
once on alomost all lucene mailing lists. The query
being about handling of date fields.
In my case I need to find documents with dates older
than a particular date. So ideally I am not supposed
to specify the lower bound. When using
For numeric fields, this will never happen.
For text fields, I could either
1) just use the first token generated (yuck)
2) don't run it through the analyzer (v1.0)
3) run it through an analyzer specific to range and prefix queries (post v1.0)
Since I know the schema, I can pick and choose di
On Apr 5, 2005, at 2:49 PM, Yonik Seeley wrote:
Just curious. I plan on overriding the current getRangeQuery() anyway
since it currently doesn't run the endpoints through the analyzer.
What will you do when multiple tokens are returned from the analyzer?
Erik
--
Was there any later thread on the QueryParser supporting open ended
range queries after this:
http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg07973.html
Just curious. I plan on overriding the current getRangeQuery() anyway
since it currently doesn't run the endpoints throug
60 matches
Mail list logo