You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Joe Eckard (JIRA)" <ji...@apache.org> on 2007/12/11 22:49:43 UTC

[jira] Created: (OFBIZ-1514) Duplicates in Search Results

Duplicates in Search Results
----------------------------

                 Key: OFBIZ-1514
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1514
             Project: OFBiz
          Issue Type: Bug
          Components: product
    Affects Versions: SVN trunk
            Reporter: Joe Eckard
            Priority: Minor


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.

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?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1514) Duplicates in Search Results

Posted by "Joe Eckard (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Eckard updated OFBIZ-1514:
------------------------------

    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?

  was:
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.

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?


> Duplicates in Search Results
> ----------------------------
>
>                 Key: OFBIZ-1514
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1514
>             Project: OFBiz
>          Issue Type: Bug
>          Components: product
>    Affects Versions: SVN trunk
>            Reporter: Joe Eckard
>            Priority: Minor
>         Attachments: patch.txt
>
>
> 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?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1514) Duplicates in Search Results

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552288 ] 

Jacques Le Roux commented on OFBIZ-1514:
----------------------------------------

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...

> Duplicates in Search Results
> ----------------------------
>
>                 Key: OFBIZ-1514
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1514
>             Project: OFBiz
>          Issue Type: Bug
>          Components: product
>    Affects Versions: SVN trunk
>            Reporter: Joe Eckard
>            Priority: Minor
>         Attachments: keywords.xml, patch.txt
>
>
> 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?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1514) Duplicates in Search Results

Posted by "Joe Eckard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550726 ] 

Joe Eckard commented on OFBIZ-1514:
-----------------------------------

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".

> Duplicates in Search Results
> ----------------------------
>
>                 Key: OFBIZ-1514
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1514
>             Project: OFBiz
>          Issue Type: Bug
>          Components: product
>    Affects Versions: SVN trunk
>            Reporter: Joe Eckard
>            Priority: Minor
>
> 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.
> 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?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1514) Duplicates in Search Results

Posted by "Joe Eckard (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Eckard updated OFBIZ-1514:
------------------------------

    Attachment: patch.txt

> Duplicates in Search Results
> ----------------------------
>
>                 Key: OFBIZ-1514
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1514
>             Project: OFBiz
>          Issue Type: Bug
>          Components: product
>    Affects Versions: SVN trunk
>            Reporter: Joe Eckard
>            Priority: Minor
>         Attachments: patch.txt
>
>
> 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.
> 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?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1514) Duplicates in Search Results

Posted by "Joe Eckard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552252 ] 

Joe Eckard commented on OFBIZ-1514:
-----------------------------------

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.

> Duplicates in Search Results
> ----------------------------
>
>                 Key: OFBIZ-1514
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1514
>             Project: OFBiz
>          Issue Type: Bug
>          Components: product
>    Affects Versions: SVN trunk
>            Reporter: Joe Eckard
>            Priority: Minor
>         Attachments: patch.txt
>
>
> 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?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1514) Duplicates in Search Results

Posted by "Joe Eckard (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Eckard updated OFBIZ-1514:
------------------------------

    Attachment: keywords.xml

> Duplicates in Search Results
> ----------------------------
>
>                 Key: OFBIZ-1514
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1514
>             Project: OFBiz
>          Issue Type: Bug
>          Components: product
>    Affects Versions: SVN trunk
>            Reporter: Joe Eckard
>            Priority: Minor
>         Attachments: keywords.xml, patch.txt
>
>
> 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?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1514) Duplicates in Search Results

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552213 ] 

Jacques Le Roux commented on OFBIZ-1514:
----------------------------------------

Hi Joe,

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

> Duplicates in Search Results
> ----------------------------
>
>                 Key: OFBIZ-1514
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1514
>             Project: OFBiz
>          Issue Type: Bug
>          Components: product
>    Affects Versions: SVN trunk
>            Reporter: Joe Eckard
>            Priority: Minor
>         Attachments: patch.txt
>
>
> 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?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.