I'm not much of a highligher expert, but this *seems* like it was probably intentional ... you are tlaking abouthte use case where you have a stored field, and no term positions correct? ... so in order to highlight, the highlighter needs to analyzed the stored text to find the word positions?
The "index" analyzer is the one that is intended to be used on the text stored in documents, while the "query" analyzer is the one intended to be used on (shorter) query strings ... so when highlighting you use the "query" analyzer to built up the query object and the terms to search for, and the "index" analyzer to parse the stored field ... those two analyzers have to be compatible/complimentary for this to work, butthey have to be compatible/complimentary in the exact same way forhte queries to match at all. also: this way you getthe exact same behavior even if you switch from storing the field to using TermPositions. ...but like i said: this is just my assumption, i don't know that much aboutthe highlighter. : I am using Solr 1.2.0 with a custom compound word analyzer, which inserts the : decompositions into the token stream. Because I assume that when the user : queries for a compound word, he is interested only in whole-word matches, I : have it enabled only in my index analyzer chain. : : However, due to a bug in the analyzer (entirely my fault), I came to realize : that when highlighting is enabled, the highlighter uses the index analyzer : chain to find the matches, instead of the query analyzer chain. : : I find this curious, and I was wondering whether this is intentional, and if : so, what is the rationale for this? : : Best regards : - Christian : -Hoss