Open GoogleCodeExporter opened 8 years ago
hi Michiel, this is a great addition - i've needed this for a long time. i
just tried it, and it seems to work just fine.
thank you!
Original comment by kumar.ch...@gmail.com
on 25 Oct 2010 at 10:05
Hey Michiel,
I tried out your patch and it works well. The only problem I see is that the
counts and available items within a single list-facet are not updated to
reflect the fact that the facet intersects versus unions. For my use-case, it's
useful to see the number of items that would result by selecting an additional
restriction in the list facet.
The counts are updated when the Exhibit.ListFacet.update is called. It's called
with the set of items that are available to the facet -- if this list-facet is
the only one with restrictions, it updates it with the all the available items.
If it is not the only one, then it is updated with the intersection of all
available items from the other facets. The logic for all this is in
Exhibit.Collection._updateFacets.
To fix the counts for the intersect case, on a ListFacet.update(), I just
called restrict() on the set of items given before calculating the counts if
the list-facet is in intersection mode. This makes the counts limited only to
values arising from items in the intersection of the currently chosen
restrictions.
The attached patch to andListfacet.js accomplishes this. It's a straight copy
of Exhibit.ListFacet.prototype._computeFacet from SVN r2153, except lines 3-7
of the method are the restrict() call I describe above. It works well for me.
Thanks,
RJ Ryan
Original comment by russelljryan
on 22 Dec 2010 at 10:36
Attachments:
Just a note to say I find this change (Michiel with Russell's additions) really
helpful for my particular project (a database of thousands of academic journal
articles, with various keywords acting as the facets.) Thanks to you both for
your contributions.
Original comment by pleon...@gmail.com
on 5 Feb 2011 at 8:21
Original comment by ryan...@csail.mit.edu
on 23 Jun 2011 at 9:47
Hi
Is it possible to show a working example of this - I think it might be what I
need but cant get it to work.
Many thanks in advance
James
Original comment by jtoner...@gmail.com
on 8 Jul 2015 at 11:08
Original issue reported on code.google.com by
m.d.na...@hetnet.nl
on 24 Oct 2010 at 9:56Attachments: