You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/06/22 13:41:44 UTC

[GitHub] [lucene] gsmiller commented on pull request #964: LUCENE-10620: Pass the Weight to Collectors.

gsmiller commented on PR #964:
URL: https://github.com/apache/lucene/pull/964#issuecomment-1163113856

   > I've been wondering if it was worth adding a new API only for TotalHitCountCollector but looking at how facets use this collector, I suspect that many users set up their collectors manually instead of using IndexSearcher#count and do not benefit from this optimization, so maybe it's worth the increased API surface.
   
   I'm not sure I'm completely following this bit. You're not suggesting that the static `FacetsCollector#search` methods could benefit from the counting optimizations right? Since the query needs to be evaluated to populate the `FacetsCollector` anyway? Is your point more that we may have users creating their own `TotalHitCountCollector` instances and passing them to `IndexSearcher#search` instead of relying on `IndexSearcher#count` when all they want is the count, following the pattern in `FacetsCollector#doSearch`? Sorry if I'm misunderstanding your point, but I got curious when I saw reference to "faceting" :).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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