0

I wanted to log Solr queries users are submitting. I could generate request logs from the solution provided in this using Jetty.

Now, that I have the request logs (sample pasted below). Can anyone explain what does this mean q=%2A%3A%2A ?

0.0.0.0 - [14/Jan/2014:15:29:52 +0000] "GET /solr-nutch/hbasecollection/select?facet=true&facet.mincount=1&facet.field=source&facet.field=type&hl=true&hl.fl=title%2Ccontent&hl.simple.pre=%3Cstrong%3E&hl.simple.post=%3C%2Fstrong%3E&hl.fragsize=300&fl=%2A%2Cscore&version=1.2&wt=json&json.nl=map&q=%2A%3A%2A&start=0&rows=20 HTTP/1.1" 200 114440

Community
  • 1
  • 1
sunskin
  • 1,620
  • 3
  • 25
  • 49

1 Answers1

1

This value is Percent encoded. You may use URL Decoder to get the actual query. In your case, it's *:*.

mindas
  • 26,463
  • 15
  • 97
  • 154
  • Can you think of a best way to parse those logs to just spit out the terms in "q="? – sunskin Jan 15 '14 at 14:45
  • You can try extending default logging of Jetty server and automatically decode all percent data, but technically you will be incorrect as the logger logs real HTTP traffic - this is what is being actually sent over the wire. How to do this? - I'm no Jetty expert, but http://wiki.eclipse.org/Jetty/Feature/Jetty_Logging seems like a good start. Anyway, this should probably be raised as a separate question. – mindas Jan 15 '14 at 14:50
  • sure. That's what I thought. Thank you! – sunskin Jan 15 '14 at 14:55