I'm using Lucene.Net's MultiFieldQueryParser to search multiple fields in my documents. I want to find out which field the text was found. For example, my search might look like this:
var parser = new MultiFieldQueryParser(new string[] {"question","answer"}, analyzer);
var query = parser.Parse(searchphrase);
for(int idx=0; idx<hits.Length() ++idx)
{
var doc = hits.Doc(i);
// was this hit found in "answer" or "question"??
}
I want to determine whether searchphrase was found in the answer or question field