You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Atul Vani (JIRA)" <ji...@apache.org> on 2010/09/18 13:29:34 UTC

[jira] Updated: (OFBIZ-3789) No results when searching with keywords in catalog

     [ https://issues.apache.org/jira/browse/OFBIZ-3789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Atul Vani updated OFBIZ-3789:
-----------------------------

    Attachment: UseGroupByForKeywordSortOnly.patch

Hello All,

I wonder this issue has been fixed completely. Try searching 'gift card' from
http://localhost:8087/ecommerce/control/advancedsearch
and using some other value for 'Sorted by' instead of 'Keyword Relevancy'.

The first time i observed this issue KeywordSort was not working for search keyword 'gift'
(the console log suggested that SELECT got no 'totalRelevancy' column but the GROUPBY has it in the query)
although the KeywordSort was working well for 'gift card'.

All other sorting methods from http://localhost:8087/ecommerce/control/advancedsearch
were working for 'gift' but not 'gift card'.

I think it was before r951553. when i created a quick fix for it. But I am not sure.
I have attached the patch I used.

Thanks & Regards
Atul Vani

> No results when searching with keywords in catalog
> --------------------------------------------------
>
>                 Key: OFBIZ-3789
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3789
>             Project: OFBiz
>          Issue Type: Bug
>          Components: product
>    Affects Versions: SVN trunk
>            Reporter: Erwan de FERRIERES
>            Assignee: Adam Heath
>             Fix For: SVN trunk
>
>         Attachments: UseGroupByForKeywordSortOnly.patch
>
>
> Steps to reproduce :
> go to : https://localhost:8443/catalog/control/keywordsearch
> then in the Keywords textbox, type GZ, then hit enter key.
> No results are shown.
> Log error in the console :
> 2010-05-28 16:03:07,780 (http-0.0.0.0-8443-1) [      ProductSearch.java:271:INFO ] Finished initial setup of keywords, doingBothAndOr=false, andKeywordFixedSet={%gz%}
>  keywordFixedOrSetAndList={}
> 2010-05-28 16:03:07,849 (http-0.0.0.0-8443-1) [      ProductSearch.java:654:ERROR] 
> ---- exception report ----------------------------------------------------------
> Error in product search
> Exception: org.ofbiz.entity.GenericDataSourceException
> Message: SQL Exception while executing the following:SELECT DISTINCT PK1.RELEVANCY_WEIGHT, PROD.PRODUCT_ID FROM (OFBIZ.PRODUCT PROD LEFT OUTER JOIN OFBIZ.PRODUCT_CALCULATED_INFO PRODCI ON PROD.PRODUCT_ID = PRODCI.PRODUCT_ID) INNER JOIN OFBIZ.PRODUCT_KEYWORD PK1 ON PROD.PRODUCT_ID = PK1.PRODUCT_ID WHERE (PK1.KEYWORD LIKE ?) ORDER BY TOTAL_RELEVANCY DESC (Column 'TOTAL_RELEVANCY' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE  statement then 'TOTAL_RELEVANCY' is not a column in the target table.)
> ---- cause ---------------------------------------------------------------------
> Exception: java.sql.SQLSyntaxErrorException
> Message: Column 'TOTAL_RELEVANCY' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE  statement then 'TOTAL_RELEVANCY' is not a column in the target table.
> ---- cause ---------------------------------------------------------------------
> Exception: org.apache.derby.impl.jdbc.EmbedSQLException
> Message: Column 'TOTAL_RELEVANCY' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE  statement then 'TOTAL_RELEVANCY' is not a column in the target table.
> ---- cause ---------------------------------------------------------------------
> Exception: org.apache.derby.iapi.error.StandardException
> Message: Column 'TOTAL_RELEVANCY' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE  statement then 'TOTAL_RELEVANCY' is not a column in the target table.
> ---- stack trace ---------------------------------------------------------------
> ERROR 42X04: Column 'TOTAL_RELEVANCY' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE  statement then 'TOTAL_RELEVANCY' is not a column in the target table.

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