Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: Trunk
    • Fix Version/s: None
    • Component/s: product
    • Labels:
      None
    • Sprint:
      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?

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

        Activity

        Hide
        Joe Eckard added a comment -

        To reproduce this from a clean checkout:

        Load demo data, create keywords for all products. In the catalog manager, do a keyword search for "gizmos" with a VIEW_SIZE parameter of 10. You should see "1-10 of 19". Then manually add the keyword "gizmotron" to Big Gizmo (GZ-8544). Do the same search again and you should see "1-10 of 20".

        Show
        Joe Eckard added a comment - To reproduce this from a clean checkout: Load demo data, create keywords for all products. In the catalog manager, do a keyword search for "gizmos" with a VIEW_SIZE parameter of 10. You should see "1-10 of 19". Then manually add the keyword "gizmotron" to Big Gizmo (GZ-8544). Do the same search again and you should see "1-10 of 20".
        Hide
        Jacques Le Roux added a comment -

        Hi Joe,

        I'm unable to reproduce on Postgres with trunk and release. Did you use a specific weight for gismotron ?

        Show
        Jacques Le Roux added a comment - Hi Joe, I'm unable to reproduce on Postgres with trunk and release. Did you use a specific weight for gismotron ?
        Hide
        Joe Eckard added a comment -

        I believe I used "1" - it just has to be different than the relevancy weight for the keyword "gizmo". Be sure to set your view size to 10 - this only occurs if the product is returned multiple times and on different pages, as each page of results is filtered for duplicates.

        I'm attaching a seed data file that adds "gizmotron" to all of the gizmos for easier testing - drop this in after a clean install and keyword generation.

        Show
        Joe Eckard added a comment - I believe I used "1" - it just has to be different than the relevancy weight for the keyword "gizmo". Be sure to set your view size to 10 - this only occurs if the product is returned multiple times and on different pages, as each page of results is filtered for duplicates. I'm attaching a seed data file that adds "gizmotron" to all of the gizmos for easier testing - drop this in after a clean install and keyword generation.
        Hide
        Jacques Le Roux added a comment -

        Ok Joe,

        Actually 1st time I just tried to change the VIEW_SIZE in the URL, as it did not work I gived up. Now that I have changed it in applications/product/webapp/catalog/find/keywordsearchbox.ftl near line 50, I agree that your patch solves this issues. We just have to hope now that someone using Oracle will read this...

        Show
        Jacques Le Roux added a comment - Ok Joe, Actually 1st time I just tried to change the VIEW_SIZE in the URL, as it did not work I gived up. Now that I have changed it in applications/product/webapp/catalog/find/keywordsearchbox.ftl near line 50, I agree that your patch solves this issues. We just have to hope now that someone using Oracle will read this...

          People

          • Assignee:
            Unassigned
            Reporter:
            Joe Eckard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development

                Agile