2 Replies Latest reply: Jul 16, 2012 7:03 AM by DevReddy RSS

    Pre-computed Sort order not maintained when sorting on other properties

    DevReddy
      Hi ,

      We are using MDEX version 6.2.1
      I have set a digdx flag like below, in general to maintain an order, if no sort option is selected by user, product will be displayed in alphabetical order of display_Name.
      <arg>--sort</arg>
      <arg>display_Name|asc</arg>

      We have two other properties enabled for sort, namely Vintage and Price (user can select these from screen and sort the results), but i am not setting any digdx flags for these two but setting them to enequery uing setNavActiveSortKeys(ERecSortKeyList)
      1. By default search results are coming in alphabetical order of display_Name - working fine as expected
      2. When a user sort on Vintage - results are sorted by Vintage as expected, However two or more records having same vintage value(ties on Vintage) are not coming in the alphabetical order of display_Name

      Surprised at this behaviour, because when i used digdx flag its clearly setting records by alphabetic order on display_Name on index, but why this order is not maintained when results are tied on vintage, completely clueless

      Can someone help me out, am I missing something here or any BUGs you guys encountere?

      Thanks
      Dev

      Edited by: 928681 on May 31, 2012 9:45 PM

      Edited by: 928681 on May 31, 2012 9:51 PM
        • 1. Re: Pre-computed Sort order not maintained when sorting on other properties
          929342
          Hi Dev,

          When the query is made to sort explicitly on "Vintage", it will not automatically cascade to use the "display_Name" as the tie-breaker for sorting records with the same "Vintage" value. You may observe that the setNavActiveSortKeys method takes in a ERecSortKeyList. This ERecSortKeyList allows you to put together a list of properties and dimensions for sorting. If you want to sort by Vintage first, followed by display_Name, then "add" the "Vintage" ERecSortKey first, followed by a corresponding ERecSortKey for "display_Name". This will update the sort order to meet your requirements.

          More information on this method found in the API documents here: http://docs.oracle.com/cd/E28910_01/PresentationAPI.622/apidoc/javadoc/navigation/com/endeca/navigation/ERecSortKeyList.html

          Regards,

          Craig
          • 2. Re: Pre-computed Sort order not maintained when sorting on other properties
            DevReddy
            Thanks Craig,

            It works fine, additionally I coded to include displyName as the tie-breaker

            - DEV