[ https://issues.apache.org/jira/browse/SOLR-5290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13793858#comment-13793858 ]
Mark Miller commented on SOLR-5290: ----------------------------------- Great stuff Minoru! > 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-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org