cancel
Showing results for 
Search instead for 
Did you mean: 

Optional attributes in indexes in items.xml

0 Kudos

Hello,

as far as we now, indexes in hybris are defined this way (example index "MyFavouriteIdx", which is indexing fields "myFavouriteField1" and "myFavouriteField2"):

         <itemtype code="MyFavouriteItem" extends="MyFavouriteItemsParent">
             <attributes>
                 <attribute qualifier="myFavouriteField1" type="java.lang.Boolean">
                     ...                    
                 </attribute>
             <attribute qualifier="myFavouriteField2" type="java.lang.Boolean">
                     ...                    
                 </attribute>
             </attributes>
             <indexes>
                 <index name="MyFavouriteIdx">
                     <key attribute="myFavouriteField1" />
                     <key attribute="myFavouriteField2" />
                 </index>
             </indexes>
         </itemtype>

Is there a way to define a field in an index (for example "myFavouriteField2") as optional?

Many thanks in advance!

Sven

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sven,

indexKeyType documentation (see here) doesn't mention anything like this. I'm afraid it can't be done via items.xml (I'm not sure what exactly you want to achieve - you might look into remove of indexType)

Best Regards,