Issue #199 resolved

Change groupids keyword arg to be more flexible, allow "best result"

Matt Chaput
repo owner created an issue

Currently the {{{groupids}}} keyword argument to {{{Searcher.search}}} controls whether the faceting group contents are lists of docnums or a simple count.

It would be nice to change this to allow more than just those two options, by making a new keyword argument whose value is an object/function which provides the functionality of creating the group contents.

E.g.:

{{{

!python

r = s.search(q, groupedby=myfacet, groupedas=IDS) r = s.search(q, groupedby=myfacet, groupedas=UNORDERED_IDS) r = s.search(q, groupedby=myfacet, groupedas=COUNT) r = s.search(q, groupedby=myfacet, groupedas=BEST) }}}

Comments (1)

  1. Matt Chaput reporter

    Added FacetMap objects and the "maptype" argument to Searcher.search() and FacetType constructors, which allows much greater control over how facet groups are recorded. Cleaned up and updated documentation. Fixes issue #199.

    4470a8812c9e

  2. Log in to comment