You do not necessarily need two requests; instead, you can override  
or modify the request handler you are using (StandardRequestHandler,  
DisMaxREquestHandler) to return the information.  You'll have to  
process the Query to extract the terms (like HighlighingUtils does),  
then get the TermVector token offset data for each matching doc and  
look for the terms in the Query.  I haven't worked with Term Vectors  
(a Lucene API), so I'm not sure exactly how to go about this.

Thanks Mike, So in essence I need to write a new RequestHandler plugin which 
takes the query string, tokenises it then perform a some kind of action against 
the index to return results which I should then be able to get the termVectors 
from?

Would not the termVectors already be available from the normal search and we'd 
just be asking for the term vectors from that?

Any advice for a perl/python programmer who is trying to baddly hack this in 
Java?

Best Regards, Martin Owens

Reply via email to