0

I'm trying to improve an existing solr search which uses the StandardRequestHandler. I'd like to switch to a dismax-based handler, however I'll need to remove the fieldname from the "fieldname:value" query.

Is it possible to modify the q parameter value as it's passed to a request handler?

STW
  • 44,917
  • 17
  • 105
  • 161
  • Do you not have access to the client making the request to Solr? – Ansari Jun 20 '12 at 23:20
  • @Ansari I do, but I was hoping to be able to improve the search results without requiring a client release as well – STW Jun 21 '12 at 12:40

1 Answers1

3

I haven't looked into this deeply but I think you might want to create your own QueryParser, probably extending the one you're using now. The result you want to achieve does require some coding.

On the other hand, of course it would be better to modify the client side, that way you wouldn't need to hack Solr.

javanna
  • 59,145
  • 14
  • 144
  • 125
  • Thanks javanna, it looks like that is the best option to intercept and modify the `q` string. Specifically, it looks like the `QParserPlugin` abstract class has a `createParser()` method which recieves the `q` parameter as `qstr`. It can be modified here, or within the actual `QParser` which is returned. Thanks! – STW Jun 21 '12 at 20:18