[jsword-devel] PssageTally, retainAll and getTotal

DM Smith dmsmith at crosswire.org
Tue Sep 4 07:02:07 MST 2012


On Sep 4, 2012, at 8:23 AM, Chris Burrell <chris at burrell.me.uk> wrote:

> Hi
> 
> Here's my use case. I run several independent searches, and then want to get the results that match all of them together. I can't use the "~" notation, since some of my searches are against sources other than modules. 
> 
> So I'm using retainAll to find the intersection between these results. The "total" value of the resulting key, still has the total from the search that was executed. Would it make sense to change this so that retainAll affects the total field appropriately? i.e. reduces it to the cardinality of the resulting key?

The cardinality should be adjusted as the content of the result changes.

In Him,
	DM


More information about the jsword-devel mailing list