You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by JimAld <ji...@db.com> on 2013/01/11 17:05:58 UTC

Re: looking for package org.apache.lucene.analysis.standard

Hi,

I see this error and also one more, I am using Maven to build and source the
libraries, below is the extract for lucene.

Errors:
package org.apache.lucene.analysis.standard does not exist
package org.apache.lucene.queryParser does not exist


Pom extract:
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-core</artifactId>
            <version>4.0.0</version>
            <scope>provided</scope>
        </dependency>



--
View this message in context: http://lucene.472066.n3.nabble.com/looking-for-package-org-apache-lucene-analysis-standard-tp4028789p4032550.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.

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


RE: looking for package org.apache.lucene.analysis.standard

Posted by JimAld <ji...@db.com>.
Hi,

Well I've managed to fix the issue, sort of, so thought I should summarise
here for any others who stumble across this issue.

The reason maven was not able to build the project is that an empty
constructor for StandardAnalyzer does not exist, even though both Eclipse
and jadclipse showed that it did exist when referencing the 4.0.0 library.
Using the constructor that took the Version as a param fixed this issue and
allowed Maven to build the project.

The Eclipse package explorer now shows no errors, however the Eclipse code
viewer is littered with them. I tried referencing the 3 Lucene jars (shown
above) directly in the classpath and this fixed the errors Eclipse showed
with regards to Lucene, however it introduced a load of new errors with the
rest of the project <- can't win! 

Anyhow, I can live without intelli-sense for this project, as long as maven
builds, that's the main thing.

Thanks to everyone for their replies to this post.



--
View this message in context: http://lucene.472066.n3.nabble.com/looking-for-package-org-apache-lucene-analysis-standard-tp4028789p4033195.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.

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


RE: looking for package org.apache.lucene.analysis.standard

Posted by Steve Rowe <sa...@gmail.com>.
Hi Jim,

Try getting rid of the <scope>provided</scope> lines.

Steve
On Jan 14, 2013 5:38 AM, "JimAld" <ji...@db.com> wrote:

> Thanks to everyone, I feel I'm getting somewhere, but not quite there yet.
> I
> currently have the below in my pom. When I change my import to:
> import org.apache.lucene.queryparser.classic.QueryParser;
> Eclipse says it can't find "org.apache.lucene.queryparser" however, the
> maven installer has no such issue.
>
> The maven installer, does however have an issue with this line:
> Analyzer analyzer = new StandardAnalyzer();
> It says:
> cannot find symbol
> symbol  : constructor StandardAnalyzer()
> location: class org.apache.lucene.analysis.standard.StandardAnalyzer
> Even though I have the import:
> import org.apache.lucene.analysis.standard.StandardAnalyzer;
> Which Eclipse has no issue with.
>
> I've cleaned my project and restarted Eclipse with no improvement to the
> differences shown by Eclipse and Maven. Any help much appreciated!
>
> Pom dependencies:
>         <dependency>
>             <groupId>org.apache.lucene</groupId>
>             <artifactId>lucene-core</artifactId>
>             <version>4.0.0</version>
>             <scope>provided</scope>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.lucene</groupId>
>             <artifactId>lucene-analyzers-common</artifactId>
>             <version>4.0.0</version>
>             <scope>provided</scope>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.lucene</groupId>
>             <artifactId>lucene-queryparser</artifactId>
>             <version>4.0.0</version>
>             <scope>provided</scope>
>         </dependency>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/looking-for-package-org-apache-lucene-analysis-standard-tp4028789p4033104.html
> Sent from the Lucene - Java Developer mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

RE: looking for package org.apache.lucene.analysis.standard

Posted by JimAld <ji...@db.com>.
Thanks to everyone, I feel I'm getting somewhere, but not quite there yet. I
currently have the below in my pom. When I change my import to: 
import org.apache.lucene.queryparser.classic.QueryParser;
Eclipse says it can't find "org.apache.lucene.queryparser" however, the
maven installer has no such issue. 

The maven installer, does however have an issue with this line:
Analyzer analyzer = new StandardAnalyzer();
It says: 
cannot find symbol
symbol  : constructor StandardAnalyzer()
location: class org.apache.lucene.analysis.standard.StandardAnalyzer
Even though I have the import:
import org.apache.lucene.analysis.standard.StandardAnalyzer;
Which Eclipse has no issue with. 

I've cleaned my project and restarted Eclipse with no improvement to the
differences shown by Eclipse and Maven. Any help much appreciated!

Pom dependencies:
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-core</artifactId>
            <version>4.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-analyzers-common</artifactId>
            <version>4.0.0</version>
            <scope>provided</scope>
        </dependency>        
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-queryparser</artifactId>
            <version>4.0.0</version>
            <scope>provided</scope>
        </dependency>



--
View this message in context: http://lucene.472066.n3.nabble.com/looking-for-package-org-apache-lucene-analysis-standard-tp4028789p4033104.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.

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


RE: looking for package org.apache.lucene.analysis.standard

Posted by Uwe Schindler <uw...@thetaphi.de>.
It is in this artifact. But Lucene 4.0 also moved some classes into other packages. Please read the MIGRATE.html guide: http://lucene.apache.org/core/4_0_0/MIGRATE.html - If you scroll down, you see the new class names (o.a.l.queryParser.QueryParser -> o.a.l.queryparser.classic.QueryParser)

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

> -----Original Message-----
> From: JimAld [mailto:jim.alderman@db.com]
> Sent: Friday, January 11, 2013 6:14 PM
> To: dev@lucene.apache.org
> Subject: Re: looking for package org.apache.lucene.analysis.standard
> 
> Thanks guys for the very quick responses, but the QueryParser class doesn’t
> appear to be in the jar:
> 
> http://search.maven.org/#browse%7C-1713056141
> 
> Is this correct?
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/looking-
> for-package-org-apache-lucene-analysis-standard-tp4028789p4032573.html
> Sent from the Lucene - Java Developer mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional
> commands, e-mail: dev-help@lucene.apache.org


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


Re: looking for package org.apache.lucene.analysis.standard

Posted by JimAld <ji...@db.com>.
Thanks guys for the very quick responses, but the QueryParser class doesn’t
appear to be in the jar:

http://search.maven.org/#browse%7C-1713056141

Is this correct?



--
View this message in context: http://lucene.472066.n3.nabble.com/looking-for-package-org-apache-lucene-analysis-standard-tp4028789p4032573.html
Sent from the Lucene - Java Developer mailing list archive at Nabble.com.

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


Re: looking for package org.apache.lucene.analysis.standard

Posted by Adrien Grand <jp...@gmail.com>.
Hi Jim,

You need to add lucene-analyzers-common[1] and lucene-queryparser[2]
to your POM definition.

 [1] http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22lucene-analyzers-common%22
 [2] http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22lucene-queryparser%22

-- 
Adrien

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


RE: looking for package org.apache.lucene.analysis.standard

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

with Lucene 4.0 the structure of artifacts changed and the core was reduced to only absolutely necessary components. The query parser is no longer part of lucene-core.jar. You have to add lucene-queryparser.jar, too.

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


> -----Original Message-----
> From: JimAld [mailto:jim.alderman@db.com]
> Sent: Friday, January 11, 2013 5:06 PM
> To: dev@lucene.apache.org
> Subject: Re: looking for package org.apache.lucene.analysis.standard
> 
> Hi,
> 
> I see this error and also one more, I am using Maven to build and source the
> libraries, below is the extract for lucene.
> 
> Errors:
> package org.apache.lucene.analysis.standard does not exist package
> org.apache.lucene.queryParser does not exist
> 
> 
> Pom extract:
>         <dependency>
>             <groupId>org.apache.lucene</groupId>
>             <artifactId>lucene-core</artifactId>
>             <version>4.0.0</version>
>             <scope>provided</scope>
>         </dependency>
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/looking-
> for-package-org-apache-lucene-analysis-standard-tp4028789p4032550.html
> Sent from the Lucene - Java Developer mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional
> commands, e-mail: dev-help@lucene.apache.org


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