Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-1514

Duplicates in Search Results

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • Trunk, Upcoming Branch
    • None
    • product
    • None
    • Bug Crush Event - 21/2/2015

    Description

      If a product has multiple keywords with identical roots and different relevancy weights and the product is within a set of search results that span multiple pages, then it will be duplicated in the results display. This is because ProductSearch is doing a "distinct" on productId, relevancyWeight(s) instead of grouping by the productId. (And the attempt at duplicate removal only happens on a page-by-page basis.)

      I'm attaching a small proof-of-concept patch to make grouping by productId the default - it appears to work well with various combinations of search criteria (multiple keywords, features, feature cats, categories, etc.) but I haven't done a tremendous amount of testing. (Only using PostgreSQL and Derby)

      From the comments in the ProductSearch code it looks like it was done this way once, but it may have caused problems with Oracle. Does anyone know what that problem was, or can anyone check this patch against oracle?

      Attachments

        1. patch.txt
          2 kB
          Joseph Eckard
        2. keywords.xml
          2 kB
          Joseph Eckard

        Activity

          People

            Unassigned Unassigned
            eckardjf Joseph Eckard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: