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

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Helmut Jarausch-2
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Ian Lea
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
<[hidden email]> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Uwe Schindler
In reply to this post by Helmut Jarausch-2
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: [hidden email]

> -----Original Message-----
> From: Helmut Jarausch [mailto:[hidden email]]
> Sent: Friday, November 27, 2009 12:42 PM
> To: [hidden email]
> 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: [hidden email]
> For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Simon Willnauer
In reply to this post by Helmut Jarausch-2
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
<[hidden email]> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]