cancel
Showing results for 
Search instead for 
Did you mean: 

Solr search indexed property

Former Member
0 Kudos

Hi, I'm trying to link all the products with all the associated workflow actions by creating solr indexed property called "workflowActionPk" and created a provider which returns all the field values when running the full index (product is part of three workflow actions):

 product pk:1978440_green
 de.hybris.platform.solrfacetsearch.provider.FieldValue@3070fa22[field=workflowActionPk_long_mv,value=8796126282841]
 de.hybris.platform.solrfacetsearch.provider.FieldValue@3de83717[field=workflowActionPk_long_mv,value=8796126315609]
 de.hybris.platform.solrfacetsearch.provider.FieldValue@20663e50[field=workflowActionPk_long_mv,value=8796126348377]  

Now I want to search based on this property to filter the products which are part of particular workflow. In order to achieve this, I'm implementing the AdvancedSearchInitializer and overriding the following method and added the following condition:

 public void addSearchDataConditions(final AdvancedSearchData searchData, final Optional<NavigationNode> navigationNode){
                    final FieldType workflowActions = new FieldType();
                     workflowActions.setDisabled(Boolean.FALSE);
                     workflowActions.setSelected(Boolean.TRUE);
                     workflowActions.setName("workflowActionPk");

                    searchData.addFilterQueryRawCondition(workflowActions, ValueComparisonOperator.CONTAINS, ((WorkflowActionTemplateModel) data).getPk().getLong());

the problem is it's not filtering the products. Any help would be greatly appreciated.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member679962
Active Participant
0 Kudos

Well, solr comes with some limitations and you should be aware of them. Some of them are:

You should consider all of them before making a decision to use solr.

Cheers,
Marcin

Former Member
0 Kudos

yes its calling and the filtering works in simple search mode but not in advance search mode. Also this solution dependent on cron job which is not feasible. So I'm thinking another solution to achieve the same thing.
Here's link to problem description: https://jira.hybris.com/browse/ESINNOS-31 I'm trying to implement same in backoffice.

former_member679962
Active Participant
0 Kudos

Hi Jaimin,

Is your initializer code called?

Cheers,
Marcin