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 Patrick Diviacco <pa...@gmail.com> on 2011/04/19 16:10:34 UTC

Lucene: Indexsearcher: java.lang.UnsupportedOperationException

I get the following error message: java.lang.UnsupportedOperationException

with Lucene search method: topDocs = searcher.search(booleanQuery, null,
100);

I'm using an old version of Lucene: Lucene 2.4.1 (I cannot upgrade!)
Can you help me to understand why I get such error ?

thanks
This is the complete code: http://pastie.org/1811677

Re: Lucene: Indexsearcher: java.lang.UnsupportedOperationException

Posted by Patrick Diviacco <pa...@gmail.com>.
java.lang.UnsupportedOperationException
at org.apache.lucene.search.Query.createWeight(Query.java:88)
at
org.apache.lucene.search.BooleanQuery$BooleanWeight.<init>(BooleanQuery.java:185)
at org.apache.lucene.search.BooleanQuery.createWeight(BooleanQuery.java:360)
at org.apache.lucene.search.Query.weight(Query.java:95)
at org.apache.lucene.search.Searcher.createWeight(Searcher.java:185)
at org.apache.lucene.search.Searcher.search(Searcher.java:136)
at NVoting.<init>(NVoting.java:159)
at Main.main(Main.java:8)





On 20 April 2011 05:25, Anshum <an...@gmail.com> wrote:

> Could you also print and send the entire stack-trace?
> Also, the query.toString()
>
> --
> Anshum Gupta
> http://ai-cafe.blogspot.com
>
>
> On Tue, Apr 19, 2011 at 7:40 PM, Patrick Diviacco <
> patrick.diviacco@gmail.com> wrote:
>
> > I get the following error message:
> java.lang.UnsupportedOperationException
> >
> > with Lucene search method: topDocs = searcher.search(booleanQuery, null,
> > 100);
> >
> > I'm using an old version of Lucene: Lucene 2.4.1 (I cannot upgrade!)
> > Can you help me to understand why I get such error ?
> >
> > thanks
> > This is the complete code: http://pastie.org/1811677
> >
>

Re: Lucene: Indexsearcher: java.lang.UnsupportedOperationException

Posted by Anshum <an...@gmail.com>.
Could you also print and send the entire stack-trace?
Also, the query.toString()

--
Anshum Gupta
http://ai-cafe.blogspot.com


On Tue, Apr 19, 2011 at 7:40 PM, Patrick Diviacco <
patrick.diviacco@gmail.com> wrote:

> I get the following error message: java.lang.UnsupportedOperationException
>
> with Lucene search method: topDocs = searcher.search(booleanQuery, null,
> 100);
>
> I'm using an old version of Lucene: Lucene 2.4.1 (I cannot upgrade!)
> Can you help me to understand why I get such error ?
>
> thanks
> This is the complete code: http://pastie.org/1811677
>