Searches the log of every request your Opensolr Index received, with the Solr parameters you already know. Each request is one document.
https://opensolr.com/solr_manager/api/request_logemail and api_key of your account, as GET or POST parameters: Authentication.01 · Parameters
core_nameRequiredThe name of your index. A cluster master includes its replicas.
qOptionalA Solr query on the log. Default *:*, every request.
fq[]OptionalFilters, as many as you need, for example fq[]=date:[NOW-1DAY TO NOW].
sortOptionalFor example date desc.
startOptionalOffset, for paging.
rowsOptionalRequests per page. Default 100, at most 1000.
flOptionalThe fields to return.
facet, facet.field[]Optionalfacet=true and one or more fields to count, such as ip, path, q, http_status.
02 · Fields of a request
dateWhen it came in.
qThe search text, when there was one.
pathThe request handler, such as /select or /update.
ipThe address it came from.
http_statusThe HTTP status of the answer.
qtime, hits, sizeMilliseconds Solr took, results found, size of the answer.
core_nameThe index, useful on a cluster.
03 · Examples
Use curl -g so the square brackets go through as they are.
# Requests that did not answer 200, last 7 days, newest first curl -gs "https://opensolr.com/solr_manager/api/request_log?email=YOUR_EMAIL&api_key=YOUR_API_KEY&core_name=my_index&sort=date%20desc&fq[]=date:[NOW-7DAY%20TO%20NOW]&fq[]=-http_status:200" # The 10 most searched texts and the busiest addresses of the last day, no documents curl -gs "https://opensolr.com/solr_manager/api/request_log?email=YOUR_EMAIL&api_key=YOUR_API_KEY&core_name=my_index&rows=0&fq[]=date:[NOW-1DAY%20TO%20NOW]&facet=true&facet.field[]=q&facet.field[]=ip&facet.limit=10" # Searches slower than one second curl -gs "https://opensolr.com/solr_manager/api/request_log?email=YOUR_EMAIL&api_key=YOUR_API_KEY&core_name=my_index&sort=qtime%20desc&fq[]=qtime:[1000%20TO%20*]"
04 · Answer
The answer of Solr, always JSON: response.numFound, response.docs and, with facets, facet_counts.facet_fields. Page through more than 1000 requests with start.
05 · Errors
ERROR_INVALID_CORE_NAMEHTTP 200No index name.
ERROR_NOT_CORE_OWNERHTTP 200The index is not yours.
ERROR_AUTHENTICATION_FAILEDHTTP 403The email and API key do not match.
ERROR_RATE_LIMIT_PER_MINUTEHTTP 429Too many calls. Wait for the Retry-After seconds: Rate limits.
06 · Related
The latest lines of the logs, without a query: tail_access_log, tail_apache_log.
Every error code and HTTP status of the API: API errors. Calls per minute and per hour: Rate limits.