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/03/02 23:32:37 UTC

WhitespaceAnalyzer in Lucene nightly build ?

I've downloaded Lucene nightly build and I've seen
that WhitespaceAnalyzer.java is not anymore there.

Has this analyzer been removed from the library ? What should I use instead
?

thanks

Re: WhitespaceAnalyzer in Lucene nightly build ?

Posted by Ian Lea <ia...@gmail.com>.
Try passing an org.apache.lucene.util.Version parameter.  Looks like
this version needs it.

http://svn.apache.org/viewvc/lucene/dev/trunk/modules/analysis/common/src/java/org/apache/lucene/analysis/core/WhitespaceAnalyzer.java?view=markup

assuming that is the right link.

Using trunk versions is always likely to be harder work than using
releases.  Maybe you should download the source as reference, and
build the javadocs.


--
Ian.


On Fri, Mar 4, 2011 at 2:56 PM, Patrick Diviacco
<pa...@gmail.com> wrote:
> All right, I've downloaded the 2 jars and I've imported the following line,
> since WhitespaceAnalyzer is in the core folder.
>
> import org.apache.lucene.analysis.core.*;
>
> However I get the following error:
>
> CollectionIndexer.java:80: cannot find symbol
> symbol  : constructor WhitespaceAnalyzer()
> location: class org.apache.lucene.analysis.core.WhitespaceAnalyzer
> writer = new IndexWriter(FSDirectory.open(INDEX_DIR), new
> WhitespaceAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);
>
> thanks
>
>
>
>
> On 4 March 2011 15:42, Uwe Schindler <uw...@thetaphi.de> wrote:
>
>> As I said, the nightly maven jars are exactly the same like the nightly zip
>> file. So simply use analyzers-common.jar and lucene-core.jar in your class
>> path after you downloaded it from the URL I told you.
>>
>> -----
>> Uwe Schindler
>> H.-H.-Meier-Allee 63, D-28213 Bremen
>> http://www.thetaphi.de
>> eMail: uwe@thetaphi.de
>>
>> > -----Original Message-----
>> > From: Patrick Diviacco [mailto:patrick.diviacco@gmail.com]
>> > Sent: Friday, March 04, 2011 2:34 PM
>> > To: java-user@lucene.apache.org
>> > Subject: Re: WhitespaceAnalyzer in Lucene nightly build ?
>> >
>> > sorry, so what you are saying is that I don't have working analyzers in
>> the
>> > nightly build ? In other words, I cannot index with it ?
>> >
>> > Which version is the nightly Maven JARs ? I actually need to compute
>> > similarity per-field: the patch has been committed and it is currently
>> working
>> > with Lucene 4.0 This is the reason I'm using this version.
>> >
>> > On 2 March 2011 23:48, Uwe Schindler <uw...@thetaphi.de> wrote:
>> >
>> > > Hi,
>> > >
>> > > Lucene trunk aka 4.0 does not ship with any special analyzers in its
>> > > core JAR file anymore. In trunk you have to use the module
>> > > analyzers-common for this analyzer.
>> > >
>> > > The problem with this module is, that the nightly build don't generate
>> > > a ZIP file out of it (this needs to be fixed for all the new modules).
>> > > You have two possibilities:
>> > > - Export source from SVN and build yourself
>> > > - Use the nightly Maven JARs instead (they include the modules as
>> JARs):
>> > >
>> > > https://hudson.apache.org/hudson/job/Lucene-Solr-Maven-
>> > trunk/lastSucce
>> > > ssfulB uild/artifact/maven_artifacts/org/apache/lucene/
>> > >
>> > > Uwe
>> > >
>> > > -----
>> > > Uwe Schindler
>> > > H.-H.-Meier-Allee 63, D-28213 Bremen
>> > > http://www.thetaphi.de
>> > > eMail: uwe@thetaphi.de
>> > >
>> > >
>> > > > -----Original Message-----
>> > > > From: Patrick Diviacco [mailto:patrick.diviacco@gmail.com]
>> > > > Sent: Wednesday, March 02, 2011 11:33 PM
>> > > > To: java-user@lucene.apache.org
>> > > > Subject: WhitespaceAnalyzer in Lucene nightly build ?
>> > > >
>> > > > I've downloaded Lucene nightly build and I've seen that
>> > > > WhitespaceAnalyzer.java is not anymore there.
>> > > >
>> > > > Has this analyzer been removed from the library ? What should I use
>> > > instead
>> > > > ?
>> > > >
>> > > > thanks
>> > >
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> > > For additional commands, e-mail: java-user-help@lucene.apache.org
>> > >
>> > >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
>

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


Re: WhitespaceAnalyzer in Lucene nightly build ?

Posted by Patrick Diviacco <pa...@gmail.com>.
All right, I've downloaded the 2 jars and I've imported the following line,
since WhitespaceAnalyzer is in the core folder.

import org.apache.lucene.analysis.core.*;

However I get the following error:

CollectionIndexer.java:80: cannot find symbol
symbol  : constructor WhitespaceAnalyzer()
location: class org.apache.lucene.analysis.core.WhitespaceAnalyzer
writer = new IndexWriter(FSDirectory.open(INDEX_DIR), new
WhitespaceAnalyzer(), true, IndexWriter.MaxFieldLength.LIMITED);

thanks




On 4 March 2011 15:42, Uwe Schindler <uw...@thetaphi.de> wrote:

> As I said, the nightly maven jars are exactly the same like the nightly zip
> file. So simply use analyzers-common.jar and lucene-core.jar in your class
> path after you downloaded it from the URL I told you.
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
>
> > -----Original Message-----
> > From: Patrick Diviacco [mailto:patrick.diviacco@gmail.com]
> > Sent: Friday, March 04, 2011 2:34 PM
> > To: java-user@lucene.apache.org
> > Subject: Re: WhitespaceAnalyzer in Lucene nightly build ?
> >
> > sorry, so what you are saying is that I don't have working analyzers in
> the
> > nightly build ? In other words, I cannot index with it ?
> >
> > Which version is the nightly Maven JARs ? I actually need to compute
> > similarity per-field: the patch has been committed and it is currently
> working
> > with Lucene 4.0 This is the reason I'm using this version.
> >
> > On 2 March 2011 23:48, Uwe Schindler <uw...@thetaphi.de> wrote:
> >
> > > Hi,
> > >
> > > Lucene trunk aka 4.0 does not ship with any special analyzers in its
> > > core JAR file anymore. In trunk you have to use the module
> > > analyzers-common for this analyzer.
> > >
> > > The problem with this module is, that the nightly build don't generate
> > > a ZIP file out of it (this needs to be fixed for all the new modules).
> > > You have two possibilities:
> > > - Export source from SVN and build yourself
> > > - Use the nightly Maven JARs instead (they include the modules as
> JARs):
> > >
> > > https://hudson.apache.org/hudson/job/Lucene-Solr-Maven-
> > trunk/lastSucce
> > > ssfulB uild/artifact/maven_artifacts/org/apache/lucene/
> > >
> > > Uwe
> > >
> > > -----
> > > Uwe Schindler
> > > H.-H.-Meier-Allee 63, D-28213 Bremen
> > > http://www.thetaphi.de
> > > eMail: uwe@thetaphi.de
> > >
> > >
> > > > -----Original Message-----
> > > > From: Patrick Diviacco [mailto:patrick.diviacco@gmail.com]
> > > > Sent: Wednesday, March 02, 2011 11:33 PM
> > > > To: java-user@lucene.apache.org
> > > > Subject: WhitespaceAnalyzer in Lucene nightly build ?
> > > >
> > > > I've downloaded Lucene nightly build and I've seen that
> > > > WhitespaceAnalyzer.java is not anymore there.
> > > >
> > > > Has this analyzer been removed from the library ? What should I use
> > > instead
> > > > ?
> > > >
> > > > thanks
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > > For additional commands, e-mail: java-user-help@lucene.apache.org
> > >
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

RE: WhitespaceAnalyzer in Lucene nightly build ?

Posted by Uwe Schindler <uw...@thetaphi.de>.
As I said, the nightly maven jars are exactly the same like the nightly zip
file. So simply use analyzers-common.jar and lucene-core.jar in your class
path after you downloaded it from the URL I told you.

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

> -----Original Message-----
> From: Patrick Diviacco [mailto:patrick.diviacco@gmail.com]
> Sent: Friday, March 04, 2011 2:34 PM
> To: java-user@lucene.apache.org
> Subject: Re: WhitespaceAnalyzer in Lucene nightly build ?
> 
> sorry, so what you are saying is that I don't have working analyzers in
the
> nightly build ? In other words, I cannot index with it ?
> 
> Which version is the nightly Maven JARs ? I actually need to compute
> similarity per-field: the patch has been committed and it is currently
working
> with Lucene 4.0 This is the reason I'm using this version.
> 
> On 2 March 2011 23:48, Uwe Schindler <uw...@thetaphi.de> wrote:
> 
> > Hi,
> >
> > Lucene trunk aka 4.0 does not ship with any special analyzers in its
> > core JAR file anymore. In trunk you have to use the module
> > analyzers-common for this analyzer.
> >
> > The problem with this module is, that the nightly build don't generate
> > a ZIP file out of it (this needs to be fixed for all the new modules).
> > You have two possibilities:
> > - Export source from SVN and build yourself
> > - Use the nightly Maven JARs instead (they include the modules as JARs):
> >
> > https://hudson.apache.org/hudson/job/Lucene-Solr-Maven-
> trunk/lastSucce
> > ssfulB uild/artifact/maven_artifacts/org/apache/lucene/
> >
> > Uwe
> >
> > -----
> > Uwe Schindler
> > H.-H.-Meier-Allee 63, D-28213 Bremen
> > http://www.thetaphi.de
> > eMail: uwe@thetaphi.de
> >
> >
> > > -----Original Message-----
> > > From: Patrick Diviacco [mailto:patrick.diviacco@gmail.com]
> > > Sent: Wednesday, March 02, 2011 11:33 PM
> > > To: java-user@lucene.apache.org
> > > Subject: WhitespaceAnalyzer in Lucene nightly build ?
> > >
> > > I've downloaded Lucene nightly build and I've seen that
> > > WhitespaceAnalyzer.java is not anymore there.
> > >
> > > Has this analyzer been removed from the library ? What should I use
> > instead
> > > ?
> > >
> > > thanks
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >


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


RE: WhitespaceAnalyzer in Lucene nightly build ?

Posted by Steven A Rowe <sa...@syr.edu>.
Hi Patrick,

The Jenkins (formerly Hudson) nightly Ant builds do not produce the jar containing WhitespaceAnalyzer.  This is not intentional - I just created an issue to track fixing the problem: <https://issues.apache.org/jira/browse/LUCENE-2950>.

The nightly Maven JARs Uwe pointed you to are from "trunk", which will eventually be released as version 4.0.  The name of the Jenkins build is "Lucene-Solr-Maven-trunk" (visible as part of the link and at the top left of the page you get to if you follow the link).  This name means: both Lucene and Solr are built; Maven artifacts are produced; and the branch being built is "trunk".

Steve

> -----Original Message-----
> From: Patrick Diviacco [mailto:patrick.diviacco@gmail.com]
> Sent: Friday, March 04, 2011 8:34 AM
> To: java-user@lucene.apache.org
> Subject: Re: WhitespaceAnalyzer in Lucene nightly build ?
> 
> sorry, so what you are saying is that I don't have working analyzers in
> the nightly build ? In other words, I cannot index with it ?
> 
> Which version is the nightly Maven JARs ? I actually need to compute
> similarity per-field: the patch has been committed and it is currently
> working with Lucene 4.0
> This is the reason I'm using this version.
> 
> On 2 March 2011 23:48, Uwe Schindler <uw...@thetaphi.de> wrote:
> 
> > Hi,
> >
> > Lucene trunk aka 4.0 does not ship with any special analyzers in its
> > core JAR file anymore. In trunk you have to use the module
> > analyzers-common for this analyzer.
> >
> > The problem with this module is, that the nightly build don't generate a
> > ZIP file out of it (this needs to be fixed for all the new modules). You
> > have two possibilities:
> > - Export source from SVN and build yourself
> > - Use the nightly Maven JARs instead (they include the modules as JARs):
> >
> > https://hudson.apache.org/hudson/job/Lucene-Solr-Maven-trunk/lastSuccessfulBuild/artifact/maven_artifacts/org/apache/lucene/
> >
> > Uwe
> >
> > -----
> > Uwe Schindler
> > H.-H.-Meier-Allee 63, D-28213 Bremen
> > http://www.thetaphi.de
> > eMail: uwe@thetaphi.de
> >
> >
> > > -----Original Message-----
> > > From: Patrick Diviacco [mailto:patrick.diviacco@gmail.com]
> > > Sent: Wednesday, March 02, 2011 11:33 PM
> > > To: java-user@lucene.apache.org
> > > Subject: WhitespaceAnalyzer in Lucene nightly build ?
> > >
> > > I've downloaded Lucene nightly build and I've seen that
> > > WhitespaceAnalyzer.java is not anymore there.
> > >
> > > Has this analyzer been removed from the library ? What should I use
> > > instead ?
> > >
> > > thanks

Re: WhitespaceAnalyzer in Lucene nightly build ?

Posted by Patrick Diviacco <pa...@gmail.com>.
sorry, so what you are saying is that I don't have working analyzers in the
nightly build ? In other words, I cannot index with it ?

Which version is the nightly Maven JARs ? I actually need to compute
similarity per-field: the patch has been committed and it is currently
working with Lucene 4.0
This is the reason I'm using this version.

On 2 March 2011 23:48, Uwe Schindler <uw...@thetaphi.de> wrote:

> Hi,
>
> Lucene trunk aka 4.0 does not ship with any special analyzers in its core
> JAR file anymore. In trunk you have to use the module analyzers-common for
> this analyzer.
>
> The problem with this module is, that the nightly build don't generate a
> ZIP
> file out of it (this needs to be fixed for all the new modules). You have
> two possibilities:
> - Export source from SVN and build yourself
> - Use the nightly Maven JARs instead (they include the modules as JARs):
>
> https://hudson.apache.org/hudson/job/Lucene-Solr-Maven-trunk/lastSuccessfulB
> uild/artifact/maven_artifacts/org/apache/lucene/
>
> Uwe
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: uwe@thetaphi.de
>
>
> > -----Original Message-----
> > From: Patrick Diviacco [mailto:patrick.diviacco@gmail.com]
> > Sent: Wednesday, March 02, 2011 11:33 PM
> > To: java-user@lucene.apache.org
> > Subject: WhitespaceAnalyzer in Lucene nightly build ?
> >
> > I've downloaded Lucene nightly build and I've seen that
> > WhitespaceAnalyzer.java is not anymore there.
> >
> > Has this analyzer been removed from the library ? What should I use
> instead
> > ?
> >
> > thanks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

RE: WhitespaceAnalyzer in Lucene nightly build ?

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

Lucene trunk aka 4.0 does not ship with any special analyzers in its core
JAR file anymore. In trunk you have to use the module analyzers-common for
this analyzer.

The problem with this module is, that the nightly build don't generate a ZIP
file out of it (this needs to be fixed for all the new modules). You have
two possibilities:
- Export source from SVN and build yourself
- Use the nightly Maven JARs instead (they include the modules as JARs):
https://hudson.apache.org/hudson/job/Lucene-Solr-Maven-trunk/lastSuccessfulB
uild/artifact/maven_artifacts/org/apache/lucene/

Uwe

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


> -----Original Message-----
> From: Patrick Diviacco [mailto:patrick.diviacco@gmail.com]
> Sent: Wednesday, March 02, 2011 11:33 PM
> To: java-user@lucene.apache.org
> Subject: WhitespaceAnalyzer in Lucene nightly build ?
> 
> I've downloaded Lucene nightly build and I've seen that
> WhitespaceAnalyzer.java is not anymore there.
> 
> Has this analyzer been removed from the library ? What should I use
instead
> ?
> 
> thanks


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