Closed gadelkareem closed 6 years ago
Hi @gadelkareem Unfortunately there is no logging from this package. What is your use-case? Can't you see the query from solr logging? Solr logs a lot of useful stuffs already.
It is possible to set flag Debug to true on the "search" object. This will construct solr to return the search query. It's long time ago I used solr so I don't remember if it is raw or parsed query.
This package is really thin so it is not doing anything special. What you add into the query (as bellow) it will send to solr + format/wt json and basic auth.
query := solr.NewQuery() query.Q("*:*") s := si.Search(query)
You can more or less inspect this query and see. That was my thought
I thought there is a hook that I can use to log the raw query on the fly but your suggestion is fine too, thanks.
btw did you figure out what you could do? should we close this ticket?
Oh yeah I did the logging in the repository of the model and it was enough. I will close this.
Good Job! How to get debug info for the raw query sent to solr?