Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-User

transition 2.4 -> 3.0 (please help me to help myself)

 

 

Lucene java-user RSS feed   Index | Next | Previous | View Threaded


jarausch at igpm

Nov 27, 2009, 3:42 AM

Post #1 of 4 (596 views)
Permalink
transition 2.4 -> 3.0 (please help me to help myself)

Hi,

could anybody please point me to some documention with (more detailed)
information about the API change.

E.g. (in PyLucene)

Q=lucene.TermQuery(lucene.Term('@URI',BookNr))
FSDir= lucene.SimpleFSDirectory(lucene.File('/home/jarausch/Bib_Dev/DIR/'))
index_reader= lucene.IndexReader.open(FSDir)
Searcher= lucene.IndexSearcher(FSDir)
hits=Searcher.search(Q)
This now gives an
lucene.InvalidArgsError: (<type 'IndexSearcher'>, 'search', (<TermQuery: @URI:B6140>,))

How to change that?
I had a look at http://lucene.apache.org/java/3_0_0/api/all/index.html
but there seems to be no search(Query) method anymore.

Where can I find some info on what to change in my code.

Many thanks,
Helmut.

--
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


ian.lea at gmail

Nov 27, 2009, 3:50 AM

Post #2 of 4 (560 views)
Permalink
Re: transition 2.4 -> 3.0 (please help me to help myself) [In reply to]

There is indeed no search(Query) method in 3.0.

Your best bet is to compile your application against 2.9 and fix any
deprecation warnings - see the javadocs for alternatives. If it
compiles cleanly against 2.9 it should also compile against 3.0.


--
Ian.



On Fri, Nov 27, 2009 at 11:42 AM, Helmut Jarausch
<jarausch [at] igpm> wrote:
> Hi,
>
> could anybody please point me to some documention with (more detailed)
> information about the API change.
>
> E.g. (in PyLucene)
>
> Q=lucene.TermQuery(lucene.Term('@URI',BookNr))
> FSDir= lucene.SimpleFSDirectory(lucene.File('/home/jarausch/Bib_Dev/DIR/'))
> index_reader= lucene.IndexReader.open(FSDir)
> Searcher= lucene.IndexSearcher(FSDir)
> hits=Searcher.search(Q)
> This now gives an
> lucene.InvalidArgsError: (<type 'IndexSearcher'>, 'search', (<TermQuery: @URI:B6140>,))
>
> How to change that?
> I had a look at http://lucene.apache.org/java/3_0_0/api/all/index.html
> but there seems to be no search(Query) method anymore.
>
> Where can I find some info on what to change in my code.
>
> Many thanks,
> Helmut.
>
> --
> Helmut Jarausch
>
> Lehrstuhl fuer Numerische Mathematik
> RWTH - Aachen University
> D 52056 Aachen, Germany
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
> For additional commands, e-mail: java-user-help [at] lucene
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


uwe at thetaphi

Nov 27, 2009, 3:55 AM

Post #3 of 4 (558 views)
Permalink
RE: transition 2.4 -> 3.0 (please help me to help myself) [In reply to]

That's the way to go:

public TopDocs search(Query query,
int n)
throws IOException

Finds the top n hits for query.

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

> -----Original Message-----
> From: Helmut Jarausch [mailto:jarausch [at] igpm]
> Sent: Friday, November 27, 2009 12:42 PM
> To: java-user [at] lucene
> Subject: transition 2.4 -> 3.0 (please help me to help myself)
>
> Hi,
>
> could anybody please point me to some documention with (more detailed)
> information about the API change.
>
> E.g. (in PyLucene)
>
> Q=lucene.TermQuery(lucene.Term('@URI',BookNr))
> FSDir=
> lucene.SimpleFSDirectory(lucene.File('/home/jarausch/Bib_Dev/DIR/'))
> index_reader= lucene.IndexReader.open(FSDir)
> Searcher= lucene.IndexSearcher(FSDir)
> hits=Searcher.search(Q)
> This now gives an
> lucene.InvalidArgsError: (<type 'IndexSearcher'>, 'search', (<TermQuery:
> @URI:B6140>,))
>
> How to change that?
> I had a look at http://lucene.apache.org/java/3_0_0/api/all/index.html
> but there seems to be no search(Query) method anymore.
>
> Where can I find some info on what to change in my code.
>
> Many thanks,
> Helmut.
>
> --
> Helmut Jarausch
>
> Lehrstuhl fuer Numerische Mathematik
> RWTH - Aachen University
> D 52056 Aachen, Germany
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
> For additional commands, e-mail: java-user-help [at] lucene



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene


simon.willnauer at googlemail

Nov 27, 2009, 3:57 AM

Post #4 of 4 (562 views)
Permalink
Re: transition 2.4 -> 3.0 (please help me to help myself) [In reply to]

Additionally there is a whitepaper on
http://www.lucidimagination.com/How-We-Can-Help/whitepaper
What is new in Lucene 2.9

which gives you an overview over the new features - this is not on a
API level though.

simon

On Fri, Nov 27, 2009 at 12:42 PM, Helmut Jarausch
<jarausch [at] igpm> wrote:
> Hi,
>
> could anybody please point me to some documention with (more detailed)
> information about the API change.
>
> E.g. (in PyLucene)
>
> Q=lucene.TermQuery(lucene.Term('@URI',BookNr))
> FSDir= lucene.SimpleFSDirectory(lucene.File('/home/jarausch/Bib_Dev/DIR/'))
> index_reader= lucene.IndexReader.open(FSDir)
> Searcher= lucene.IndexSearcher(FSDir)
> hits=Searcher.search(Q)
> This now gives an
> lucene.InvalidArgsError: (<type 'IndexSearcher'>, 'search', (<TermQuery: @URI:B6140>,))
>
> How to change that?
> I had a look at http://lucene.apache.org/java/3_0_0/api/all/index.html
> but there seems to be no search(Query) method anymore.
>
> Where can I find some info on what to change in my code.
>
> Many thanks,
> Helmut.
>
> --
> Helmut Jarausch
>
> Lehrstuhl fuer Numerische Mathematik
> RWTH - Aachen University
> D 52056 Aachen, Germany
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
> For additional commands, e-mail: java-user-help [at] lucene
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe [at] lucene
For additional commands, e-mail: java-user-help [at] lucene

Lucene java-user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.