Frequently Asked Questions - SearchStax

The SearchStax® Frequently Asked Questions page includes the following approved question and answer about our Apache Solr Cloud services.

Can we log queries?

Situations arise where users need to view the incoming queries to their solr servers. The method depends on whether you have a cluster or a single node.

Dedicated Cluster

Due to technical considerations, query logs are most naturally obtained from the Solr cluster's load balancer. SearchStax makes the load balancer logs available through the SearchStax dashboard.

SearchStax Load Balancer Logs

These are access logs that record the incoming queries, like this one:

{"httpRequest":{"remoteIp":"76.9.66.238","requestMethod":"GET","requestSize":"118","requestUrl":"https://ss611802-us-west2-gcp.searchstax.com/solr/filmcollection/select?q=director_name:%22Steven%20Spielberg%22&wt=json&indent=true&fl=movie_title","responseSize":"956","serverIp":"10.76.0.2","status":200,"userAgent":"curl/7.58.0"},"insertId":"1sxeg25ff8ohxo","jsonPayload":{"@type":"type.googleapis.com/google.cloud.loadbalancing.type.LoadBalancerLogEntry","enforcedSecurityPolicy":{"configuredAction":"ACCEPT","name":"ss611802-armor","outcome":"ACCEPT","priority":2147483647},"statusDetails":"response_sent_by_backend"},"logName":"projects/searchstax-production/logs/requests","receiveTimestamp":"2019-01-09T15:00:29.930210771Z","resource":{"labels":{"backend_service_name":"","forwarding_rule_name":"ss611802-https-forwarding","project_id":"searchstax-production","target_proxy_name":"ss611802-https-proxy","url_map_name":"ss611802-loadbalancer","zone":"global"},"type":"http_load_balancer"},"severity":"INFO","spanId":"e549479c9a69ea78","timestamp":"2019-01-09T15:00:29.513737511Z","trace":"projects/searchstax-production/traces/b8e7795aa135c44964cd1a8343a2f34c"}

SearchStax updates these logs once per hour.

Dedicated Node

Single-node deployments do not have load balancers, so the procedure is more complicated.

From the SearchStax Cloud Manager, click on the name of the deployment. Then click the Solr Endpoint URL to open the Solr Dashboard.

Click Logging and then Level. Scroll down to /org/apache/hadoop/solr/request/. Set the logging level to DEBUG.

SearchStax Log Debug

This setting will remain active until (1) you manually reset it or (2) you restart Solr.

Query notations appear in the Solr.log file:

2019-01-11 16:49:42.508 DEBUG (qtp415138788-13) [c:filmcollection s:shard1 r:core_node2 x:filmcollection_shard1_replica_n1] o.a.s.c.S.Request [filmcollection_shard1_replica_n1]  webapp=/solr path=/select params={q=director_name:"Steven+Spielberg"&indent=true&fl=movie_title&wt=json}

SearchStax Analytics

SearchStax Analytics Usage Metrics

Bear in mind that the SearchStax Analytics Top Searches feature summarizes your incoming queries in a table that is designed for business users.

Screenshot

We love to answer questions!

Please contact the SearchStax Support Desk immediately if you have any question about Solr Cloud deployments.

Return to Frequently Asked Questions.