05-20-2021 10:11 AM - edited 02-04-2024 1:44 AM
How to override the value of the boolean solrIndexedType in solr hybris?
I have one solrIndexedType let say "isTest" boolean datatype. While indexing the value should be indexed as "test" instead of true/false.
Kindly let me know if we have any approach.
Thanks
Hi,
Change type of the indexed property from boolean to string then use (custom and existing ) fieldValueProvider to populate the value for the field.
providers like springELValueProvider,modelAttributesValueResolver .
INSERT_UPDATE SolrIndexedProperty ; solrIndexedType(identifier)[unique=true] ; name[unique=true] ; type(code) ; sortableType(code) ; currency[default=false] ; localized[default=false] ; multiValue[default=false] ; useForSpellchecking[default=false] ; useForAutocomplete[default=false] ; fieldValueProvider ; valueProviderParameter ; ftsPhraseQuery[default=false] ; ftsPhraseQueryBoost ; ftsQuery[default=false] ; ftsQueryBoost ; ftsFuzzyQuery[default=false] ; ftsFuzzyQueryBoost ; ftsWildcardQuery[default=false] ; ftsWildcardQueryType(code)[default=POSTFIX] ; ftsWildcardQueryBoost ; ftsWildcardQueryMinTermLength
; $solrIndexedType ; isTest ; string ; ; ; ; ; true ; true ; springELValueProvider ; isTest ; ; ; true ; 90 ; ; ; true ; POSTFIX ; 45 ; 3
And run full indexing.
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.