lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Kurella (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-1680) Provide an API to specify custom Collectors
Date Wed, 02 Jun 2010 10:21:39 GMT

    [ https://issues.apache.org/jira/browse/SOLR-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874524#action_12874524
] 

Jan Kurella commented on SOLR-1680:
-----------------------------------

the "streamlining" could be done in simple approach?

It seems to be quite simple according to the linked ticket.
The codephrase
       if( timeAllowed > 0 ) {
         collector = new TimeLimitingCollector(collector, timeAllowed);
       }
       try {
         super.search(query, luceneFilter, collector);
       }
       catch( TimeLimitingCollector.TimeExceededException x ) {
         log.warn( "Query: " + query + "; " + x.getMessage() );
         qr.setPartialResults(true);
       }

is spread several times over the SolrIndexSearcher.

It should be enough to put this in a separate function and wrap the collector with any custom
collector here (in one place):
  private Collector doSearch(neededParams)
       if( timeAllowed > 0 ) {
         collector = new TimeLimitingCollector(collector, timeAllowed);
       }
       if( customCollector != null) {
         customCollector.setInnerCollector(collector);
         collector = customCollector
       }
       try {
         super.search(query, luceneFilter, collector);
       }
       catch( TimeLimitingCollector.TimeExceededException x ) {
         log.warn( "Query: " + query + "; " + x.getMessage() );
         qr.setPartialResults(true);
       }
  }

And custom collector needs to be retrieved by the whatever plugin concept.

??


> Provide an API to specify custom Collectors
> -------------------------------------------
>
>                 Key: SOLR-1680
>                 URL: https://issues.apache.org/jira/browse/SOLR-1680
>             Project: Solr
>          Issue Type: Sub-task
>          Components: search
>    Affects Versions: 1.3
>            Reporter: Martijn van Groningen
>             Fix For: Next
>
>         Attachments: field-collapse-core.patch, SOLR-1680.patch
>
>
> The issue is dedicated to incorporate fieldcollapse's changes to the Solr's core code.

> We want to make it possible for components to specify custom Collectors in SolrIndexSearcher
methods.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message