You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Martijn van Groningen (JIRA)" <ji...@apache.org> on 2017/01/05 08:44:58 UTC

[jira] [Commented] (LUCENE-7617) Improve GroupingSearch API and extensibility

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

Martijn van Groningen commented on LUCENE-7617:
-----------------------------------------------

+1 to this change. This should make using these collectors easier.

There are a couple of places where I saw if statements without curly brackets. Maybe add these curly brackets. I find it easier to read.

bq. clean up the generics on the two-pass collectors - maybe look into removing them entirely?

As far as I can see the bases classes use these generics, so that subclasses don't have to do manual casts. Which parts you like to cleanup?

bq. think about moving the document block method into the join module instead, alongside all the other block-indexing code

I would prefer if the `BlockGroupingCollector` stayed in the grouping module. The block indexing is a feature provided by core and the way I see it modules can have features that use that. Also the the join and grouping modules provide each a different functionality. Although from a higher level the functionality is a bit overlapping, in a sense that some use cases could be implemented with both the join or the grouping module.

bq. rename the various Collector base classes so that they don't have 'Abstract' in them anymore

agreed, a lot 'Abstract' in the names :)

> Improve GroupingSearch API and extensibility
> --------------------------------------------
>
>                 Key: LUCENE-7617
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7617
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Alan Woodward
>            Assignee: Alan Woodward
>            Priority: Minor
>         Attachments: LUCENE-7617.patch
>
>
> While looking at how to make grouping work with the new XValuesSource API in core, I thought I'd try and clean up GroupingSearch a bit.  We have three different ways of grouping at the moment: by doc block, using a single-pass collector; by field; and by ValueSource.  The latter two both use essentially the same two-pass mechanism, with different Collector implementations.
> I can see a number of possible improvements here:
> * abstract the two-pass collector creation into a factory API, which should allow us to add the XValuesSource implementations as well
> * clean up the generics on the two-pass collectors - maybe look into removing them entirely?  I'm not sure they add anything really, and we don't have them on the equivalent plan search APIs
> * think about moving the document block method into the join module instead, alongside all the other block-indexing code
> * rename the various Collector base classes so that they don't have 'Abstract' in them anymore



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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