Skip to Content
author's profile photo Former Member
Former Member

Solr DefaultFacetSearchStrategy | Query parameter is passed as empty

Hi,

I'm using Hyrbis 5.7.0.3 b2b powertools accelerator and facing solr query issue when i turn off the legacy mode in solrquery config.

Problem: In LegacyMode, things are working but when i turn off the legacy mode in solrsearchconfig, Solr uses DefaultFacetSearchStrategy in order to generate solr query and get the search results. With this, everytime i search on the page, same results are shown. When i debug the query below query was printed in the logs:

q=%3A&sort=score+desc%2CinStockFlag_boolean+desc%2Cscore+desc☆t=0&rows=20&facet.field=Colour+of+product%2C+1766_en_string&facet.field=price_usd_string&facet.field=allPromotions_string_mv&facet.field=categoryPath_string_mv&facet.field=allCategories_string_mv&facet.field=availableInStores_string_mv&facet=true&facet.sort=count&facet.mincount=1&facet.limit=50&spellcheck=true&spellcheck.q=screw&spellcheck.dictionary=en&spellcheck.collate=true&fq=%28catalogId%3A%22csmProductCatalog%22+AND+catalogVersion%3A%22Online%22%29

If you look at the above query, "q" parameter is taking value as "*:*" instead of search term.

Does anyone has experienced this behaviour?

Add a comment
10|10000 characters needed characters exceeded

  • Former Member

    Also tried viewing the platform files, as per the converter class which generates the query, below populators are invoked in order to create a query

                 <ref bean="facetSearchQueryFilterQueriesPopulator" />
                 <ref bean="facetSearchQueryGroupingPopulator" />
                 <ref bean="facetSearchQuerySortsPopulator" />
                 <ref bean="facetSearchQueryPagingPopulator" />
                 <ref bean="facetSearchQueryFacetsPopulator" />
                 <ref bean="facetSearchQueryFieldsPopulator" />
                 <ref bean="facetSearchQuerySpellcheckPopulator" />
                 <ref bean="facetSearchQueryParamsPopulator" />
                 <ref bean="facetSearchQueryCatalogVersionsPopulator" />
    
    

    First ref in the list belongs to FacetSearchQueryBasicPopulator.class file which somehow is not opening up in decompiler and i believe its responsible for generating "q" parameter.

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on May 03, 2016 at 06:55 PM

    Why do you switch the legacyMode to false in such case - if it works for you? Have you seen the description of the mode difference: https://wiki.hybris.com/display/release5/Search+Process If you want to change mode for search in your application then you will need to check the Index type/properties configuration (fts* fields) because new search strategy doesn't use the populators for free text queries.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.