You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Marian Steinbach <ma...@sendung.de> on 2010/11/26 18:13:45 UTC

Logging queries and hit count

Hi!

Is it possible to create a lean log file for queries and the number of
hits these queries returned?

We are running Solr under Tomcat.

Thanks!

Marian

Re: Logging queries and hit count

Posted by Jan Høydahl / Cominvent <ja...@cominvent.com>.
You can also configure your logging framework to output the relevant logs to a separate file:

log4j.logger.org.apache.solr.core.SolrCore=INFO, A1

This way you'll avoid too much noise from other componets, but you'll get all update and admin requests as well, so you'll have to filter on core name.

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

On 26. nov. 2010, at 21.11, Ahmet Arslan wrote:

>> Is it possible to create a lean log file for queries and
>> the number of
>> hits these queries returned?
>> 
>> We are running Solr under Tomcat.
> 
> I believe that many people do it at client side. But tomcat already logs that info. If you set tomcat's log level to INFO you can extract hits, QTime and query itself.
> 
> INFO: [] webapp=/test path=/select/ params={indent=on&start=0&q=solr&rows=10&version=2.2} hits=0 status=0 QTime=0
> 
> 
> 


Re: Logging queries and hit count

Posted by Ahmet Arslan <io...@yahoo.com>.
> Is it possible to create a lean log file for queries and
> the number of
> hits these queries returned?
> 
> We are running Solr under Tomcat.

I believe that many people do it at client side. But tomcat already logs that info. If you set tomcat's log level to INFO you can extract hits, QTime and query itself.

INFO: [] webapp=/test path=/select/ params={indent=on&start=0&q=solr&rows=10&version=2.2} hits=0 status=0 QTime=0