Skip to Content
0
Jul 03, 2018 at 10:06 AM

Optional attributes in indexes in items.xml

110 Views

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