Hi all, Sorry, I'm totally new to Lucene so this might sound obvious to you. I'm trying to use the UnifiedHiglighter with MemoryIndex. I can't make it work so far. At first, I did not set the storeOffsets/Payloads options in the MemoryIndex so I figured that might be the cause of my issue but even with that, I'm out of luck. Is that meant to work? The MemoryIndex javadoc mentions the use with a highlighter but is not very specific.
My code looks like: Analyzer analyzer = new FrenchAnalyzer(); MemoryIndex index = new MemoryIndex(true, true); IndexableField titleField = new TextField("content", content, Field.Store.YES); index.addField(titleField, analyzer) QueryParser parser = new QueryParser("content", analyzer); Query query = parser.parse("ma recherche"); IndexSearcher searcher = index.createSearcher(); index.freeze(); TopDocs docs = searcher.search(query, 1); UnifiedHighlighter uhighlighter = new UnifiedHighlighter(searcher, analyzer); String[] results = uhighlighter.highlight("content", query, docs); String result = results[0]; System.out.println("score=" + docs.scoreDocs[0].score); System.out.println("highlight with unified=" + result); The result is always "null". Thanks! -- Christophe --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org