Add test search against index to LuceneCASIndexerTest.testIndexOneDocument test --------------------------------------------------------------------------------
Key: UIMA-1564 URL: https://issues.apache.org/jira/browse/UIMA-1564 Project: UIMA Issue Type: Improvement Components: Sandbox-Lucas Affects Versions: 2.3S Reporter: Jörn Kottmann Assignee: Rico Landefeld Priority: Minor 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.