lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Muir <rcm...@gmail.com>
Subject Re: write.lock is not removed
Date Mon, 23 Feb 2015 13:13:46 GMT
It should not be deleted. Just don't mess with it.

On Mon, Feb 23, 2015 at 7:57 AM, Just Spam <schlibospam@gmail.com> wrote:
> Hello,
>
> i am trying to index a file (Lucene 4.10.3) – in my opinion in the correct
> way – will say:
>
> get the IndexWriter, Index the Doc and add them, prepare commit, commit and
> finally{ close}.
>
>
>
>
>
> My writer is generated like so:
>
>
>
> private IndexWriter getDataIndexWriter() throws CorruptIndexException,
> LockObtainFailedException, IOException {
>
>                                if (dataWriter == null) {
>
>                                                File f = new
> File(„C:/temp/index“);
>
>                                                if (!f.exists()) {
>
>                                                                f.mkdirs();
>
>                                                }
>
>                                                Directory indexDir =
> MMapDirectory.open(f);
>
>                                                KeywordAnalyzer analyzer =
> AnalyzerFactory.getDataAnalyzer();
>
>                                                IndexWriterConfig config =
> new IndexWriterConfig(AnalyzerFactory.LUCENE_VERSION, analyzer);
>
>                                                dataWriter = new
> IndexWriter(indexDir, config);
>
>                                 }
>
>                                return dataWriter;
>
>                 }
>
>
>
> Finally i check if static!=null and close the static (dataWriter).
>
>
>
> My problem is, the write.lock file just wont be deleted and i cant figure
> out why.
>
> Is there any way i can debug this further?
>
> Is there any possible way to see if processes are still accessing the file?
>
> Am i entirely missing something?
>
>
> Kind Regards and thank you in advance
>
>
>
> Matthias

---------------------------------------------------------------------
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