Hi all,
I'm trying to develop a custom DocumentTransformer in SOLR but I'm not able
to retrieve the Query object when the request is executed with group=true.
Let me explain more in detail:
the purpose of this Transformer is to apply highlight on a field, extract
some information from the highlighted field and set those information in
the result.
To use Highlighter I need the Query. I can obtain it using
context.getQuery() in the implementation of transform() method and this is
working BUTunfortunately, when the request contains some grouping
parameters (group=true&group.field=...), getQuery() returns a null pointer.
I ended up in re-parsing the query with
QParser.getParser(context.getRequest().getParams().get("q"),...)
but I wonder if there is a better way.
I'm pretty new in SOLR developing so maybe I'm missing something obvious...
Thank you in advance.

Reply via email to