You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Mark Miller (JIRA)" <ji...@apache.org> on 2013/10/14 02:50:42 UTC
[jira] [Assigned] (SOLR-5290) Warming up using search logs.
[ https://issues.apache.org/jira/browse/SOLR-5290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Miller reassigned SOLR-5290:
---------------------------------
Assignee: Mark Miller
> Warming up using search logs.
> -----------------------------
>
> Key: SOLR-5290
> URL: https://issues.apache.org/jira/browse/SOLR-5290
> Project: Solr
> Issue Type: Wish
> Components: search
> Affects Versions: 4.4
> Reporter: Minoru Osuka
> Assignee: Mark Miller
> Priority: Minor
> Attachments: SOLR-5290.patch
>
>
> It is possible to warm up of cache automatically in newSearcher event, but it is impossible to warm up of cache automatically in firstSearcher event because there isn't old searcher.
> We describe queries in solrconfig.xml if we required to cache in firstSearcher event like this:
> {code:xml}
> <listener event="firstSearcher" class="solr.QuerySenderListener">
> <arr name="queries">
> <lst>
> <str name="q">static firstSearcher warming in solrconfig.xml</str>
> </lst>
> </arr>
> </listener>
> {code}
> This setting is very statically. I want to query dynamically in firstSearcher event when restart solr. So I paid my attention to the past search log. I think if there are past search logs, it is possible to warm up of cache automatically in firstSearcher event like an autowarming of the cache in newSearcher event.
> I had created QueryLogSenderListener which extended QuerySenderListener.
> Sample definition in solrconfig.xml:
> - directory : Specify the Solr log directory. (Required)
> - regex : Describe the regular expression of log. (Required)
> - encoding : Specify the Solr log encoding. (Default : UTF-8)
> - count : Specify the number of the log to process. (Default : 100)
> - paths : Specify the request handler name to process.
> - exclude_params : Specify the request parameter to except.
> {code:xml}
> <!-- Warming up using search logs.
> -->
> <listener event="firstSearcher" class="solr.QueryLogSenderListener">
> <arr name="queries">
> <lst>
> <str name="q">static firstSearcher warming in solrconfig.xml</str>
> </lst>
> </arr>
> <str name="directory">logs</str>
> <str name="encoding">UTF-8</str>
> <str name="regex"><![CDATA[^(?<level>[\w]+)\s+\-\s+(?<timestamp>[\d\-\s\.:]+);\s+(?<class>[\w\.\_\$]+);\s+\[(?<core>.+)\]\s+webapp=(?<webapp>.+)\s+path=(?<path>.+)\s+params=\{(?<params>.*)\}\s+hits=(?<hits>\d+)\s+status=(?<status>\d+)\s+QTime=(?<qtime>\d+).*]]></str>
> <arr name="paths">
> <str>/select</str>
> </arr>
> <int name="count">100</int>
> <arr name="exclude_params">
> <str>indent</str>
> <str>_</str>
> </arr>
> </listener>
> {code}
> I'd like to propose this feature.
--
This message was sent by Atlassian JIRA
(v6.1#6144)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org