Get Index Request Log
You can use this method, to get your request log, in a SOLR JSON format.
You can add almost every solr-supported parameter to your GET request, as GET parameters, as explained in the example below, where we get the first 10 request log entries for my_solr_core between dates: Jan. 01 2017 to May 01 2017, sorted by date descending.
This only works if you have Analytics enabled for your account type.
-
GET https://opensolr.com/solr_manager/api/request_log
-
Parameters:
-
email - your opensolr registration email address
-
api_key - your opensolr api_key
-
core_name - the name of the index
-
most other solr-supported query parameter, such as: q, start, rows, sort, fq, facet, facet.field[] etc
-
Click here to learn more about the supported Solr Query Parameters
-
Note that the multiple solr-supported parameters, will be passed with a double square bracket [], to indicate an array of multiple values for the same parameter, such in the case of fq, qf, etc.
-
For example, if you want to enable facetting, you'll have to pass on the parameters like: &facet=true&facet.field[]=ip&facet.field[]=country
-
To exclude empty countries: &fq[]=-country:""
-
To exclude empty and wildcard queries: &fq[]=-q:""&fq[]=-q:"*:*"
-
To get data in another format, you simply pass in a different wt parameter, as such: &wt=csv which gets data in csv format. You can get more information here.
-
Example request:
https://opensolr.com/solr_manager/api/request_log?email=&api_key=Please log in&core_name=opensolr&start=0&sort=date%20desc&rows=10&fq[]=date:[2017-01-01T00:00:00Z%20TO%202017-05-31T00:00:00Z]&facet=true&facet.field[]=country&facet.field[]=q