Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Abandoned
-
2.3S
-
None
Description
The test should index one document and then do a test search against the freshly created index. After modifying the lucas.xml in a way its indexing the DocumentAnnotation I was unable to do a test search with the following code:
FSDirectory directory = (FSDirectory) luceneCASIndexer.getIndexWriter().getDirectory();
String path = directory.getFile().getPath();
// Make sure index gets written to disk ...
analysisEngine.destroy();
// Open index and do a test search against it.
IndexSearcher searcher = new IndexSearcher(path);
QueryParser parser = new QueryParser("text", new SimpleAnalyzer());
Query query = parser.parse("test document");
searcher.search(query, new HitCollector() {
@Override
public void collect(int doc, float score)
});
Can you please have a look Rico ?
In the end it would be nice if all three kinds of text sources are tested, covered text, feature values, referenced feature values.