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

Xapian nobody at xapian.org
Fri Mar 13 15:41:52 GMT 2015


#670: double collapse with different values
--------------------------------+--------------------
        Reporter:  Sadrak       |      Owner:  olly
            Type:  enhancement  |     Status:  new
        Priority:  normal       |  Milestone:
       Component:  Matcher      |    Version:  1.2.20
        Severity:  normal       |   Keywords:
      Blocked By:               |   Blocking:
Operating System:  All          |
--------------------------------+--------------------
 I am importing product data from many merchants. Each merchant has
 sometimes the same product more than 1 times.

 So i build a value over `merchant_id CONCAT product_title` and another
 value for `merchant_id`.

 Now i want to collapse_key over `merchant_id CONCAT product_title` to get
 only the best product (if there are more than 1 with the same
 product_title) for this search from this merchant and after that i want to
 call collapse_key over `merchant_id` with count=5 to get the best 5
 products from this merchant.

 Currently i have implemented this via a matchdecider (simple check unique
 value) for the `merchant_id CONCAT product_title`, but this gives me the
 first product, not the best (with the same title from the merchant).

 So, perhaps there is a way to call set_collapse_key multiple times?

--
Ticket URL: <http://trac.xapian.org/ticket/670>
Xapian <http://xapian.org/>
Xapian



More information about the Xapian-tickets mailing list