On Tue, 21 Jul 2009 14:25:52 +0200, Anders Melchiorsen wrote: > On Fri, 17 Jul 2009 16:04:24 +0200, Anders Melchiorsen wrote:
>> However, in the normal highlighter, I am using usePhraseHighlighter and >> highlightMultiTerm and it seems that there is no way to turn these on in >> FieldAnalysisRequestHandler ? > > In case these options are not available with the > FieldAnalysisRequestHandler, > would it be simple to implement them with a plugin? The highlightMultiTerm > is absolutely needed, as we use a lot of prefix searches. I tried following the FieldAnalysisRequestHandler code, but I could not find a place to plug in wildcard searching. Is it supposed to be simple (like enabling a single option somewhere), or will it need a bunch of new code? In related news, the highlighter is not exactly working correctly, because I use the PatternTokenizer for the indexed fields, and HTMLStripWhiteSpaceTokenizer obviously gives slightly different results on the presentation field. So, I tried creating my own plugin: public class HTMLStripPatternTokenizerFactory extends PatternTokenizerFactory { public TokenStream create(Reader input) { return super.create(new org.apache.solr.analysis.HTMLStripReader(input)); } } It seems to work, but is that the proper way to mix the HTML stripper and the Pattern tokenizer? Obviously, I would prefer not having to maintain a plugin, even if it is a tiny one. - Anders