lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trejkaz <trej...@trypticon.org>
Subject Re: Can some terms from analysis be silently dropped when indexing? Because I'm pretty sure I'm seeing that happen.
Date Tue, 19 Aug 2014 21:59:06 GMT
On Tue, Aug 19, 2014 at 5:27 PM, Uwe Schindler <uwe@thetaphi.de> wrote:
> Hi,
>
> You forgot to close (or commit) IndexWriter before opening the reader.

Huh? The code I posted is closing it:

                try (IndexWriter writer = new IndexWriter(directory,
new IndexWriterConfig(Version.LUCENE_36, analyser))) {
                    Document document = new Document();
                    document.add(new Field("content", "blah blah
commercial blah blah \u79CB\u8449\u539F blah blah", Field.Store.NO,
Field.Index.ANALYZED));
                    writer.addDocument(document);
                }  <-- closed here

And anyway, if it weren't being closed, how would you explain the
terms ending up in the index?

TX

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


Mime
View raw message