[Xapian-tickets] [Xapian] #670: double set_collapse_key with different values

Xapian nobody at xapian.org
Sat Oct 19 05:30:12 BST 2019


#670: double set_collapse_key with different values
-------------------------+-------------------------------
 Reporter:  Sadrak       |             Owner:  olly
     Type:  enhancement  |            Status:  new
 Priority:  low          |         Milestone:
Component:  Matcher      |           Version:  git master
 Severity:  normal       |        Resolution:
 Keywords:               |        Blocked By:
 Blocking:               |  Operating System:  All
-------------------------+-------------------------------
Changes (by olly):

 * priority:  normal => low
 * version:  1.2.20 => git master


Comment:

 I still think we could probably support this limited special case for
 multiple collapsing, though I'm not sure how widely useful it would be.  A
 few others have asked about multiple collapse keys but in the more general
 case, which I don't think is feasible to support.

 In API terms, this could perhaps be done by specifying a collapse on
 merchant with `collapse_max` set to 5 (using the existing API) plus some
 way to say "when selecting those 5 makes sure they have unique
 `product_title` within each merchant" - perhaps via:

 {{{
 enquire.set_collapse_key(SLOT_MERCHANT, 5, SLOT_PRODUCT_TITLE);
 }}}

 Then internally we'd need to fetch the value in slot `SLOT_PRODUCT_TITLE`
 for candidate documents and eliminate duplicates based on that too.

--
Ticket URL: <https://trac.xapian.org/ticket/670#comment:3>
Xapian <https://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list