lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yakob <>
Subject Re: understanding lucene
Date Sun, 08 Aug 2010 09:11:07 GMT
ok I had tried to run some sample lucene application I found on the
internet such this one from

and this is the source code, I put it in pastebin so it will be easier to edit.

but still when I tried to run it using --deprecated option I ran into
some errors that made me difficult to solve it. the errors is this.

C:\Users\Raden\Documents\lucene\lucenedd>javac -Xlint:deprecation InMemoryExampl warning: [deprecation] in has been deprecated
                               ^ warning: [deprecation] IndexWriter(
ore.Directory,org.apache.lucene.analysis.Analyzer,boolean) in org.apache.lucene.
index.IndexWriter has been deprecated
                new IndexWriter(idx, new StandardAnalyzer(), true);
                ^ cannot find symbol
symbol  : method unIndexed(java.lang.String,java.lang.String)
location: class org.apache.lucene.document.Field
        doc.add(Field.UnIndexed("title", title));
                     ^ cannot find symbol
symbol  : method text(java.lang.String,
location: class org.apache.lucene.document.Field
        doc.add(Field.Text("content", new StringReader(content)));
                     ^ parse(java.lang.String) in org.apache.lucene.queryPars
er.QueryParser cannot be applied to (java.lang.String,java.lang.String,org.apach
        Query query = QueryParser.parse(
                                 ^ warning: [deprecation] i
n has been deprecated
        Hits hits =;
        ^ warning: [deprecation] search(
.Query) in has been deprecated
        Hits hits =;
3 errors
4 warnings

I use deprecated option because there is some java class that's
already deprecated. but still there is some errors.

I was just wondering if I can get any tips of how to fix this errors
or else maybe I can get a link to other working lucene sample program.
because it's a bit hard for me to learn lucene if I don't have any
working program based on lucene.

any help would be greatly appreciated.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message