2 * Copyright 2010, Haiku.
3 * Distributed under the terms of the MIT License.
6 * Clemens Zeidler <haiku@clemens-zeidler.de>
8 #ifndef CLUCENE_DATA_BASE_H
9 #define CLUCENE_DATA_BASE_H
16 #include "TextDataBase.h"
21 using namespace lucene::index
;
22 using namespace lucene::analysis::standard
;
25 class CLuceneWriteDataBase
: public TextWriteDataBase
{
27 CLuceneWriteDataBase(const BPath
& databasePath
);
28 ~CLuceneWriteDataBase();
32 status_t
AddDocument(const entry_ref
& ref
);
33 status_t
RemoveDocument(const entry_ref
& ref
);
37 IndexWriter
* _OpenIndexWriter();
38 IndexReader
* _OpenIndexReader();
40 bool _RemoveDocuments(std::vector
<entry_ref
>& docs
);
41 bool _RemoveDocument(wchar_t* doc
,
44 bool _IndexDocument(const entry_ref
& ref
);
50 std::vector
<entry_ref
> fAddQueue
;
51 std::vector
<entry_ref
> fDeleteQueue
;
53 StandardAnalyzer fStandardAnalyzer
;
55 IndexWriter
* fIndexWriter
;