List Info

Thread: Commented: (SOLR-267) log handler + query + hits




Commented: (SOLR-267) log handler + query + hits
country flaguser name
United States
2007-06-22 02:07:27
    [ https://issues.apache.org/jira/browse/SO
LR-267?page=com.atlassian.jira.plugin.system.issuetabpanels:
comment-tabpanel#action_12507148 ] 

Hoss Man commented on SOLR-267:
-------------------------------

I'm really not a fan of this approach to logging the number
of hits via SolrCore.execute ... this is request handler
specific information, it should be logged by the request
handler.

if people really want this type of stuff to be logged by
SolrCore execute so that there's only one log message with
the timing info and status and such, then let's come up with
a way for the RequestHandler to explicitly specify in the
SolrQueryResponse the key-val pairs it wants logged (either
via new methods on SOlrQueryResponse, or via apecific name
at the top level of the response) and modify the
out-of-the-box request handlers to take advantage of this

instead of...

+    String resultLog = " -";
+    if (rsp.getValues().size()>1 &&
rsp.getValues().getVal(1) instanceof DocList) {
+       int hits = ((DocList)
rsp.getValues().getVal(1)).size();
+        resultLog = " hits=" + hits;
+    }

...something like...

      StringBuffer resultLog = new StringBuffer("
-");
      Map<String,Object> logables =
rsp.getValues().get("loginfo");
      for (String k : logables.keySet()) {
          resultLog.append(" " + k + "="
+ logables.get(k));
      }


> log handler + query + hits
> --------------------------
>
>                 Key: SOLR-267
>                 URL: https:
//issues.apache.org/jira/browse/SOLR-267
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>    Affects Versions: 1.3
>            Reporter: Will Johnson
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: LogQueryHitCounts.patch,
LogQueryHitCounts.patch, LogQueryHitCounts.patch,
LogQueryHitCounts.patch
>
>
> adds a logger to log handler, query string and hit
counts for each query

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue
online.


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )