Hi, I reply to myself :-) The solution is to use this utility class : org.apache.solr.search.QueryParsing. Then you can do:
Query luceneQuery = QueryParsing.parseQuery(req.getParams().get("q"), req.getSchema()); Then with luceneQuery you can use the extractTerms method. Marc. On Fri, Jun 3, 2011 at 9:15 AM, Marc SCHNEIDER <marc.schneide...@gmail.com>wrote: > Hi all, > > I wrote my own SearchHandler and therefore overrided the handleRequestBody > method. > This method takes two input parameters : SolrQueryRequest and > SolrQueryResponse objects. > The thing I'd like to do is to get the query fields that are used in my > request. > Of course I can use req.getParams().get("q") but it returns the complete > query (which can be very complicated). I'd like to have a simple map with > field:value. > Is there a way to get it? Or do I have to write my own parser for the "q" > parameter? > > Thanks in advance, > Marc. >