cancel
Showing results for 
Search instead for 
Did you mean: 

How to override the value of the boolean indexedProperty in solr hybris

0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member632827
Participant

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,

0 Kudos

It works.
Thank you gunagarjuna.

former_member632827
Participant
0 Kudos

dbabulal You can accept the answer, that helps to others.