2 Replies Latest reply on Mar 31, 2017 12:17 PM by Daciano

    Sort randomize records Spotlight

    Daciano

      Hello, we are implementing a spotlight, we use RecordSpotlight cartridge.

       

      The client needs that when selecting a filter dimension (in SpotlightSelectionEditor) the return of the records is in random order, so that the user always sees different products in the spotlight.

       

      Does anyone know of any Endeca native functionality?

      If not, wich suggestion to implement random ordering in return of records?

       

       

      Product Oracle Commerce Guided Search / Oracle Commerce Experience Manager

      Version 11.2

        • 1. Re: Sort randomize records Spotlight
          Grando

          Hi,

           

          One suggestion: create a new property to be indexed with products/skus that contains a random integer value (using property-accessor attribute at product-sku-output-config.xml) and make this property "is-dimension=true". So, when you want to sort records randomic, you can use this property.

           

          Another way, more complex, is to customize RecordSpotlightHandler component class to re-order records selection before return to browse page.

           

          Make senses for you?

           

          Hope it helps.

          Bye.

          1 person found this helpful
          • 2. Re: Sort randomize records Spotlight
            Daciano

            Thanks Grando, I used the second alternative.

             

            I extended the RecordSpotlightHandler handler.

            Getting all records returned and applieding the Collections.shuffle function that makes a randomisation of the records.