Re: Issue with range queries on Lucene 6.6 using IntPoint

2017-07-01 Thread Michael McCandless
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

Issue with range queries on Lucene 6.6 using IntPoint

2017-07-01 Thread Alexander Filipchik
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

Issue with range queries on Lucene 6.6 using IntPoint

2017-06-30 Thread Alexander Filipchik
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

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
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

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

2017-03-09 Thread Michael Peterson
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]

Re: Range queries in successive positions

2012-03-02 Thread Ian Lea
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

Re: Range queries in successive positions

2012-03-01 Thread Trejkaz
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

Range queries in successive positions

2012-03-01 Thread su ha
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

BigInteger usage in numeric Trie range queries

2011-11-28 Thread Jason Rutherglen
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

Re: Range Queries Performance Hit

2010-03-25 Thread Ian Lea
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

Re: Range Queries Performance Hit

2010-03-25 Thread suman . holani
.-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

Re: Range Queries Performance Hit

2010-03-25 Thread Ian Lea
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

RE: Range Queries Performance Hit

2010-03-25 Thread suman . holani
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

RE: Range Queries Performance Hit

2010-03-25 Thread Uwe Schindler
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: >

Range Queries Performance Hit

2010-03-25 Thread suman . holani
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

RE: share some numbers for range queries

2009-11-16 Thread Uwe Schindler
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

Re: share some numbers for range queries

2009-11-15 Thread Jake Mannix
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 (

RE: share some numbers for range queries

2009-11-15 Thread Uwe Schindler
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

Re: share some numbers for range queries

2009-11-15 Thread Yonik Seeley
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

share some numbers for range queries

2009-11-15 Thread John Wang
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

Re: Why do range queries work on fields only ?

2009-03-04 Thread Raymond Balmès
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

Re: Why do range queries work on fields only ?

2009-03-04 Thread Raymond Balmès
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: >

RE: Why do range queries work on fields only ?

2009-03-03 Thread Steven A Rowe
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

Re: Why do range queries work on fields only ?

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

Re: Why do range queries work on fields only ?

2009-03-03 Thread Raymond Balmès
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

Re: Why do range queries work on fields only ?

2009-03-03 Thread Raymond Balmès
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

RE: Why do range queries work on fields only ?

2009-03-03 Thread Steven A Rowe
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

Why do range queries work on fields only ?

2009-03-03 Thread Raymond Balmès
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-

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

Range queries in Lucene - numerical or lexicographical

2007-08-11 Thread Nilesh Bansal
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

re :Range queries

2006-05-09 Thread Nadav Har'El
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 "

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 curre

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
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

RE: Using Range Queries

2006-02-08 Thread Koji Sekiguchi
;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

RE: Using Range Queries

2006-02-08 Thread Mike Streeton
} -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

Using Range Queries

2006-02-08 Thread Shivani Sawhney
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

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

Range queries

2006-01-23 Thread Gwyn Carwardine
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

Re: Handling fractional field range queries

2006-01-06 Thread Erik Hatcher
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

Handling fractional field range queries

2006-01-05 Thread Urvashi Gadi
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]

Re: Regarding range queries.

2005-08-09 Thread Doug Cutting
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

Re: Regarding range queries.

2005-08-09 Thread Erik Hatcher
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

Re: Regarding range queries.

2005-08-09 Thread Tony Schwartz
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

Regarding range queries.

2005-08-08 Thread santo santo
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

Re: QueryParser: open ended range queries

2005-04-05 Thread Yonik Seeley
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

Re: QueryParser: open ended range queries

2005-04-05 Thread Erik Hatcher
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 --

QueryParser: open ended range queries

2005-04-05 Thread Yonik Seeley
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