cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

display sorted Keyword redirects data in back office

svintha
Explorer
0 Likes
614

Hi , The requirement was to show the Keyword redirects information as sorted data . In fact as we saw in the OOTB it is rendered in solrfacetsearchbackoffice-backoffice-config.xml configuration and

 <editorArea:tab name="hmc.tab.configuration.solrconfig.redirects">
                 <editorArea:section name="hmc.tab.configuration.solrconfig.redirects.general">
                     <editorArea:attribute xmlns="http://www.hybris.com/cockpitng/component/editorArea" qualifier="languageKeywordRedirectMapping">
                         <editorArea:editor-parameter>
                             <editorArea:name>listConfigContext</editorArea:name>
                             <editorArea:value>referenceListView</editorArea:value>
                         </editorArea:editor-parameter>
                     </editorArea:attribute>
                 </editorArea:section>
             </editorArea:tab>

And the type system is as follows,

 <collectiontype elementtype="SolrFacetSearchKeywordRedirect" code="SolrFacetSearchKeywordRedirectCollection"
             autocreate="true" type="list" />
             
             <maptype code="SolrKeywordRedirectLangMapping" argumenttype="Language" returntype="SolrFacetSearchKeywordRedirectCollection" />
             
             <itemtype code="SolrFacetSearchConfig" jaloclass="de.hybris.platform.solrfacetsearch.jalo.config.SolrFacetSearchConfig"
             extends="GenericItem" autocreate="true" generate="true">
             
             <attribute type="SolrKeywordRedirectLangMapping" qualifier="languageKeywordRedirectMapping">
                     <modifiers read="true" write="true" />
                     <persistence type="jalo" />
                 </attribute>
                 
                 </itemtype>


Now as per the requirement I wanted to show this information as a sorted way in back office facet search. since it is a map type in combination with key as the Language model and the value as the list of models of SolrFacetSearchKeywordRedirect

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member625836
Active Contributor
0 Likes

Hi ,

Relation you are referring to is of type list. It means that it already is ordered. So either you order it before storing to database or change the type and introduce some ordering mechanism on display level (i.e. by introducing new editor).

Cheers, Jacek

svintha
Explorer
0 Likes

Hi ultimately , we have a map which contains key as Language and value as a list of SolrFacetSearchKeywordRedirect and they are not sorted in order. As we show in the display level we are using the editorArea Can we sort it and show in UI level by any chance from the back-office configuration.

former_member625836
Active Contributor
0 Likes

Hi ,

The only approach other then custom implementation I can think of, is trying to change simple-search configuration for SolrFacetSearchKeywordRedirect with sort-field set. Underneath editor performs a search, so it may work.

Cheers, Jacek