You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "Sowmya V.B." <vb...@gmail.com> on 2011/06/17 11:09:00 UTC

Lucene - TrieRangeQuery

Hi All

Can someone suggest me where I can get an implementation of
LongTrieRangeQuery class? I read about it in one of the Lucene
implementation based reports, but could not find it on Lucene Src.
Does that exist now?
The report I read referred to an implementation by Uwe  Schindler.

A related online article:
http://www.marcsturlese.com/2009/04/08/lucene-trierangequery/

S

-- 
Sowmya V.B.
----------------------------------------------------
Losing optimism is blasphemy!
http://vbsowmya.wordpress.com
----------------------------------------------------

RE: Lucene - TrieRangeQuery

Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi,

It's called NumericRangeQuery and included since Lucene 2.9 into Core.

Here the documentation from latest Lucene: http://s.apache.org/nrq 

Uwe
-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Sowmya V.B. [mailto:vbsowmya@gmail.com]
> Sent: Friday, June 17, 2011 11:09 AM
> To: java-user@lucene.apache.org
> Subject: Lucene - TrieRangeQuery
> 
> Hi All
> 
> Can someone suggest me where I can get an implementation of
> LongTrieRangeQuery class? I read about it in one of the Lucene
> implementation based reports, but could not find it on Lucene Src.
> Does that exist now?
> The report I read referred to an implementation by Uwe  Schindler.
> 
> A related online article:
> http://www.marcsturlese.com/2009/04/08/lucene-trierangequery/
> 
> S
> 
> --
> Sowmya V.B.
> ----------------------------------------------------
> Losing optimism is blasphemy!
> http://vbsowmya.wordpress.com
> ----------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Lucene - TrieRangeQuery

Posted by Ian Lea <ia...@gmail.com>.
That sort of error can be caused by version mismatches.  Double check
that you are using the same versions of java and lucene at compile and
run time, recompile everything, try again.


--
Ian.


On Fri, Jun 17, 2011 at 11:22 AM, Sowmya V.B. <vb...@gmail.com> wrote:
> Hi
>
> Thanks for the reply. I've been trying to use these classes -
> NumericRangeQuery, TermRangeQuery etc.
>
> However, though I don't get compilation errors, I get a runtime error. Here
> is a brief trace. I mentioned this in a previous mail thread..but it got
> lost in the middle I guess.:
>
> java.lang.NoSuchMethodError:
> org.apache.lucene.util.StringHelper.intern(Ljava/lang/String;)Ljava/lang/String;
>
> org.apache.lucene.search.TermRangeTermEnum.<init>(TermRangeTermEnum.java:79)
>    org.apache.lucene.search.TermRangeQuery.getEnum(TermRangeQuery.java:135)
>    org.apache.lucene.search.MultiTermQuery.rewrite(MultiTermQuery.java:76)
>    org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:386)
>    org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:288)
>    org.apache.lucene.search.Query.weight(Query.java:94)
>    org.apache.lucene.search.Searcher.createWeight(Searcher.java:185)
>    org.apache.lucene.search.Searcher.search(Searcher.java:136)
>    org.apache.lucene.search.Searcher.search(Searcher.java:146)
>
> I am not able to figure out what the issue here is.
> **************
> Hi,
>
> It's called NumericRangeQuery *and* included since *Lucene* 2.9 into Core.
>
> Here the documentation from latest *Lucene*: http://s.apache.org/nrq
>
> *Uwe*
> -----
> *Uwe* *Schindler*
>
>
> On Fri, Jun 17, 2011 at 11:09 AM, Sowmya V.B. <vb...@gmail.com> wrote:
>
>> Hi All
>>
>> Can someone suggest me where I can get an implementation of
>> LongTrieRangeQuery class? I read about it in one of the Lucene
>> implementation based reports, but could not find it on Lucene Src.
>> Does that exist now?
>> The report I read referred to an implementation by Uwe  Schindler.
>>
>> A related online article:
>> http://www.marcsturlese.com/2009/04/08/lucene-trierangequery/
>>
>> S
>>
>> --
>> Sowmya V.B.
>> ----------------------------------------------------
>> Losing optimism is blasphemy!
>> http://vbsowmya.wordpress.com
>> ----------------------------------------------------
>>
>
>
>
> --
> Sowmya V.B.
> ----------------------------------------------------
> Losing optimism is blasphemy!
> http://vbsowmya.wordpress.com
> ----------------------------------------------------
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


RE: Lucene - TrieRangeQuery

Posted by Uwe Schindler <uw...@thetaphi.de>.
It seems that you may have some older lucene-core.jar in your classpath when running.

A trick to find out if all come from the same JAR is using the following code:
System.err.println(getClass().getResource("org/apache/lucene/util/StringHelper.class").toString());

And compare that with:
System.err.println(getClass().getResource("org/apache/lucene/search/NumericRangeQuery.class").toString());

If both outputs contain a different JAR file name, you should fix your classpath. 

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Sowmya V.B. [mailto:vbsowmya@gmail.com]
> Sent: Friday, June 17, 2011 12:23 PM
> To: java-user@lucene.apache.org
> Subject: Re: Lucene - TrieRangeQuery
> 
> Hi
> 
> Thanks for the reply. I've been trying to use these classes -
> NumericRangeQuery, TermRangeQuery etc.
> 
> However, though I don't get compilation errors, I get a runtime error. Here is
> a brief trace. I mentioned this in a previous mail thread..but it got lost in the
> middle I guess.:
> 
> java.lang.NoSuchMethodError:
> org.apache.lucene.util.StringHelper.intern(Ljava/lang/String;)Ljava/lang/Strin
> g;
> 
> org.apache.lucene.search.TermRangeTermEnum.<init>(TermRangeTermEnu
> m.java:79)
> 
> org.apache.lucene.search.TermRangeQuery.getEnum(TermRangeQuery.java
> :135)
> 
> org.apache.lucene.search.MultiTermQuery.rewrite(MultiTermQuery.java:76
> )
>     org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:386)
>     org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:288)
>     org.apache.lucene.search.Query.weight(Query.java:94)
>     org.apache.lucene.search.Searcher.createWeight(Searcher.java:185)
>     org.apache.lucene.search.Searcher.search(Searcher.java:136)
>     org.apache.lucene.search.Searcher.search(Searcher.java:146)
> 
> I am not able to figure out what the issue here is.
> **************
> Hi,
> 
> It's called NumericRangeQuery *and* included since *Lucene* 2.9 into Core.
> 
> Here the documentation from latest *Lucene*: http://s.apache.org/nrq
> 
> *Uwe*
> -----
> *Uwe* *Schindler*
> 
> 
> On Fri, Jun 17, 2011 at 11:09 AM, Sowmya V.B. <vb...@gmail.com>
> wrote:
> 
> > Hi All
> >
> > Can someone suggest me where I can get an implementation of
> > LongTrieRangeQuery class? I read about it in one of the Lucene
> > implementation based reports, but could not find it on Lucene Src.
> > Does that exist now?
> > The report I read referred to an implementation by Uwe  Schindler.
> >
> > A related online article:
> > http://www.marcsturlese.com/2009/04/08/lucene-trierangequery/
> >
> > S
> >
> > --
> > Sowmya V.B.
> > ----------------------------------------------------
> > Losing optimism is blasphemy!
> > http://vbsowmya.wordpress.com
> > ----------------------------------------------------
> >
> 
> 
> 
> --
> Sowmya V.B.
> ----------------------------------------------------
> Losing optimism is blasphemy!
> http://vbsowmya.wordpress.com
> ----------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


RE: Lucene - TrieRangeQuery

Posted by Uwe Schindler <uw...@thetaphi.de>.
Sorry, you have to add a "/" at the beginning:

System.err.println(getClass().getResource("/org/apache/lucene/util/StringHelper.class").toString());
System.err.println(getClass().getResource("/org/apache/lucene/search/NumericRangeQuery.class").toString());

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Uwe Schindler [mailto:uwe@thetaphi.de]
> Sent: Friday, June 17, 2011 1:03 PM
> To: 'java-user@lucene.apache.org'
> Subject: RE: Lucene - TrieRangeQuery
> 
> It seems that you may have some older lucene-core.jar in your classpath
> when running.
> 
> A trick to find out if all come from the same JAR is using the following code:
> System.err.println(getClass().getResource("org/apache/lucene/util/StringHe
> lper.class").toString());
> 
> And compare that with:
> System.err.println(getClass().getResource("org/apache/lucene/search/Num
> ericRangeQuery.class").toString());
> 
> If both outputs contain a different JAR file name, you should fix your
> classpath.
> 
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
> 
> 
> > -----Original Message-----
> > From: Sowmya V.B. [mailto:vbsowmya@gmail.com]
> > Sent: Friday, June 17, 2011 12:23 PM
> > To: java-user@lucene.apache.org
> > Subject: Re: Lucene - TrieRangeQuery
> >
> > Hi
> >
> > Thanks for the reply. I've been trying to use these classes -
> > NumericRangeQuery, TermRangeQuery etc.
> >
> > However, though I don't get compilation errors, I get a runtime error.
> > Here is a brief trace. I mentioned this in a previous mail thread..but
> > it got lost in the middle I guess.:
> >
> > java.lang.NoSuchMethodError:
> > org.apache.lucene.util.StringHelper.intern(Ljava/lang/String;)Ljava/la
> > ng/Strin
> > g;
> >
> >
> org.apache.lucene.search.TermRangeTermEnum.<init>(TermRangeTermEnu
> > m.java:79)
> >
> >
> org.apache.lucene.search.TermRangeQuery.getEnum(TermRangeQuery.java
> > :135)
> >
> >
> org.apache.lucene.search.MultiTermQuery.rewrite(MultiTermQuery.java:76
> > )
> >
> org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:386)
> >
> org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:288)
> >     org.apache.lucene.search.Query.weight(Query.java:94)
> >     org.apache.lucene.search.Searcher.createWeight(Searcher.java:185)
> >     org.apache.lucene.search.Searcher.search(Searcher.java:136)
> >     org.apache.lucene.search.Searcher.search(Searcher.java:146)
> >
> > I am not able to figure out what the issue here is.
> > **************
> > Hi,
> >
> > It's called NumericRangeQuery *and* included since *Lucene* 2.9 into
> Core.
> >
> > Here the documentation from latest *Lucene*: http://s.apache.org/nrq
> >
> > *Uwe*
> > -----
> > *Uwe* *Schindler*
> >
> >
> > On Fri, Jun 17, 2011 at 11:09 AM, Sowmya V.B. <vb...@gmail.com>
> > wrote:
> >
> > > Hi All
> > >
> > > Can someone suggest me where I can get an implementation of
> > > LongTrieRangeQuery class? I read about it in one of the Lucene
> > > implementation based reports, but could not find it on Lucene Src.
> > > Does that exist now?
> > > The report I read referred to an implementation by Uwe  Schindler.
> > >
> > > A related online article:
> > > http://www.marcsturlese.com/2009/04/08/lucene-trierangequery/
> > >
> > > S
> > >
> > > --
> > > Sowmya V.B.
> > > ----------------------------------------------------
> > > Losing optimism is blasphemy!
> > > http://vbsowmya.wordpress.com
> > > ----------------------------------------------------
> > >
> >
> >
> >
> > --
> > Sowmya V.B.
> > ----------------------------------------------------
> > Losing optimism is blasphemy!
> > http://vbsowmya.wordpress.com
> > ----------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Lucene - TrieRangeQuery

Posted by "Sowmya V.B." <vb...@gmail.com>.
Hi

Thanks for the reply. I've been trying to use these classes -
NumericRangeQuery, TermRangeQuery etc.

However, though I don't get compilation errors, I get a runtime error. Here
is a brief trace. I mentioned this in a previous mail thread..but it got
lost in the middle I guess.:

java.lang.NoSuchMethodError:
org.apache.lucene.util.StringHelper.intern(Ljava/lang/String;)Ljava/lang/String;

org.apache.lucene.search.TermRangeTermEnum.<init>(TermRangeTermEnum.java:79)
    org.apache.lucene.search.TermRangeQuery.getEnum(TermRangeQuery.java:135)
    org.apache.lucene.search.MultiTermQuery.rewrite(MultiTermQuery.java:76)
    org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:386)
    org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:288)
    org.apache.lucene.search.Query.weight(Query.java:94)
    org.apache.lucene.search.Searcher.createWeight(Searcher.java:185)
    org.apache.lucene.search.Searcher.search(Searcher.java:136)
    org.apache.lucene.search.Searcher.search(Searcher.java:146)

I am not able to figure out what the issue here is.
**************
Hi,

It's called NumericRangeQuery *and* included since *Lucene* 2.9 into Core.

Here the documentation from latest *Lucene*: http://s.apache.org/nrq

*Uwe*
-----
*Uwe* *Schindler*


On Fri, Jun 17, 2011 at 11:09 AM, Sowmya V.B. <vb...@gmail.com> wrote:

> Hi All
>
> Can someone suggest me where I can get an implementation of
> LongTrieRangeQuery class? I read about it in one of the Lucene
> implementation based reports, but could not find it on Lucene Src.
> Does that exist now?
> The report I read referred to an implementation by Uwe  Schindler.
>
> A related online article:
> http://www.marcsturlese.com/2009/04/08/lucene-trierangequery/
>
> S
>
> --
> Sowmya V.B.
> ----------------------------------------------------
> Losing optimism is blasphemy!
> http://vbsowmya.wordpress.com
> ----------------------------------------------------
>



-- 
Sowmya V.B.
----------------------------------------------------
Losing optimism is blasphemy!
http://vbsowmya.wordpress.com
----------------------------------------------------