Unable to compile with Lucene_41
balajig17 opened this issue · 0 comments
balajig17 commented
I was trying to get lucene-lda to work with lucene-core-4.10.5 jar.
It throws compilation errors on building it with lucene-core-4.10.5-SNAPSHOT.jar .
lucene-core-3.5.0.jar and lucene-analyzers-3.5.0.jar were replaced with the following jars in build.xml.
- lucene-analyzers-phonetic-4.10.5-SNAPSHOT.jar
- lucene-analyzers-kuromoji-4.10.5-SNAPSHOT.jar
- lucene-analyzers-common-4.10.5-SNAPSHOT.jar
- lucene-core-4.10.5-SNAPSHOT.jar
jar:
[javac] Compiling 9 source files to /Users/Balaji/Development/LDA/lucene-lda/build/classes
[javac] /Users/Balaji/Development/LDA/lucene-lda/src/ca/queensu/cs/sail/lucenelda/LDASimilarity.java:29: error: cannot find symbol
[javac] import org.apache.lucene.search.DefaultSimilarity;
[javac] ^
[javac] symbol: class DefaultSimilarity
[javac] location: package org.apache.lucene.search
[javac] /Users/Balaji/Development/LDA/lucene-lda/src/ca/queensu/cs/sail/lucenelda/LDASimilarity.java:31: error: cannot find symbol
[javac] public class LDASimilarity extends DefaultSimilarity {
[javac] ^
[javac] symbol: class DefaultSimilarity
[javac] /Users/Balaji/Development/LDA/lucene-lda/src/ca/queensu/cs/sail/lucenelda/SimpleIndexer.java:10: warning: [deprecation] Index in Field has been deprecated
[javac] import org.apache.lucene.document.Field.Index;
[javac] ^
[javac] /Users/Balaji/Development/LDA/lucene-lda/src/ca/queensu/cs/sail/lucenelda/SimpleIndexer.java:12: error: cannot find symbol
[javac] import org.apache.lucene.document.NumericField;
[javac] ^
[javac] symbol: class NumericField
[javac] location: package org.apache.lucene.document
[javac] /Users/Balaji/Development/LDA/lucene-lda/src/ca/queensu/cs/sail/lucenelda/VSMQueryAllInDirectory.java:30: error: package org.apache.lucene.queryParser does not exist
[javac] import org.apache.lucene.queryParser.MultiFieldQueryParser;
[javac] ^
[javac] /Users/Balaji/Development/LDA/lucene-lda/src/ca/queensu/cs/sail/lucenelda/VSMQueryAllInDirectory.java:31: error: package org.apache.lucene.queryParser does not exist
[javac] import org.apache.lucene.queryParser.QueryParser;
[javac] ^
[javac] /Users/Balaji/Development/LDA/lucene-lda/src/ca/queensu/cs/sail/lucenelda/VSMQueryAllInDirectory.java:56: error: cannot find symbol
[javac] private static QueryParser parser = null;
[javac] ^
[javac] symbol: class QueryParser
[javac] location: class VSMQueryAllInDirectory
[javac] /Users/Balaji/Development/LDA/lucene-lda/src/ca/queensu/cs/sail/lucenelda/VSMSimilarity.java:27: error: cannot find symbol
[javac] import org.apache.lucene.search.DefaultSimilarity;
[javac] ^
[javac] symbol: class DefaultSimilarity
[javac] location: package org.apache.lucene.search
[javac] /Users/Balaji/Development/LDA/lucene-lda/src/ca/queensu/cs/sail/lucenelda/VSMSimilarity.java:29: error: cannot find symbol
[javac] public class VSMSimilarity extends DefaultSimilarity {
[javac] ^
[javac] symbol: class DefaultSimilarity
[javac] /Users/Balaji/Development/LDA/lucene-lda/src/ca/queensu/cs/sail/lucenelda/IndexDirectory.java:97: warning: [rawtypes] found raw type: Iterator
[javac] for (java.util.Iterator errs = config.getErrorMessageIterator(); errs
[javac] ^
[javac] missing type arguments for generic class Iterator<E>
[javac] where E is a type-variable:
[javac] E extends Object declared in interface Iterator
[javac] /Users/Balaji/Development/LDA/lucene-lda/src/ca/queensu/cs/sail/lucenelda/IndexDirectoryRunLDA.java:83: warning: [rawtypes] found raw type: Iterator
[javac] for (java.util.Iterator errs = config.getErrorMessageIterator(); errs.hasNext();) {
[javac] ^
[javac] missing type arguments for generic class Iterator<E>
[javac] where E is a type-variable:
[javac] E extends Object declared in interface Iterator
[javac] /Users/Balaji/Development/LDA/lucene-lda/src/ca/queensu/cs/sail/lucenelda/LDAQueryAllInDirectory.java:121: warning: [rawtypes] found raw type: Iterator
[javac] for (java.util.Iterator errs = config.getErrorMessageIterator(); errs
[javac] ^
[javac] missing type arguments for generic class Iterator<E>
[javac] where E is a type-variable:
[javac] E extends Object declared in interface Iterator
[javac] /Users/Balaji/Development/LDA/lucene-lda/src/ca/queensu/cs/sail/lucenelda/LDAQueryAllInDirectory.java:166: error: no suitable method found for open(Directory,boolean)
[javac] reader = IndexReader.open(dir, true);
[javac] ^
[javac] method IndexReader.open(Directory,int) is not applicable
[javac] (argument mismatch; boolean cannot be converted to int)
[javac] method IndexReader.open(IndexWriter,boolean) is not applicable
[javac] (argument mismatch; Directory cannot be converted to IndexWriter)
[javac] method IndexReader.open(IndexCommit,int) is not applicable
[javac] (argument mismatch; Directory cannot be converted to IndexCommit)
BUILD FAILED
/Users/Balaji/Development/LDA/lucene-lda/build.xml:45: Compile failed; see the compiler error output for details.
Total time: 1 second
Is there some other change that needs to be made that I'm missing?