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

Hoss Man commented on SOLR-2548:
--------------------------------

bq. This bit in SimpleFacets.getFacetFieldCounts bothers me:
...
bq. It seems like if the user doesn't specify anything for FACET_THREADS, they 
wind up spawning as many threads as there are facet fields specified

I haven't reviewed the patch, but based on the snippet you posted i suspect you 
are reading that bit correctly.

If FACET_THREADS isn't specified, or if it's specified and equals the default 
value of 0, then the directExecutor is used and _no_ threads should be spawned 
at all -- the value of maxThreads shouldn't matter at that point, instead the 
existing request thread should processes all of them sequentially.

I'm guessing you should change the patch back.

Side comments...

1) Something sketchy probably does happen if a user passes in a negative value 
-- it looks like that's the case when facetExecutor will be used with an 
unlimited number of threads ... that may actually have been intentional -- that 
if you say facet.threads=-1 every facet.field should get it's own thread, no 
matter how many there are, but if that is intentional i'd love to see a comment 
there making that obvious. (and a test showing that it works).

2) can you please fix that Integer.parseInt(..."0")) to just use 
params.getInt(...,0) ... that way the correct error message will be returned if 
it's not an int (and it's easier to read)


                
> Multithreaded faceting
> ----------------------
>
>                 Key: SOLR-2548
>                 URL: https://issues.apache.org/jira/browse/SOLR-2548
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>    Affects Versions: 3.1
>            Reporter: Janne Majaranta
>            Assignee: Erick Erickson
>            Priority: Minor
>              Labels: facet
>         Attachments: SOLR-2548_4.2.1.patch, SOLR-2548_for_31x.patch, 
> SOLR-2548.patch, SOLR-2548.patch
>
>
> Add multithreading support for faceting.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to