i am trying to do highlighting on multifields using a booleanquery with multiple clauses in lucene.net (version 3.0.3 or 4.8.0-beta00014).
Sample document inside an index would be like: {Document<stored,indexed,termVector<pID:bgz3301011900> stored,indexed,tokenized<lastname:morgan> stored,indexed,tokenized<firstname:katarina> stored,indexed,tokenized<gender:f> stored,indexed,tokenized<age:21> stored,indexed,tokenized<text: there are many kinds of apples and more>>}
BooleanQuery is like: {+(lastname:mor*) +(text:apple text:apple~2)}
When doing the highlighting it will result in highlighting morgan in the lastname field, but also it will highlight more in the text field (since it is a wildcard search). I had a few ideas on how to do seperate highlighting for each clause that will work only on it's own field, but all resulted in a slower code, so I was wondering don't lucene has something which will do that automatically, or am I missing something here.
Thanks for the help.