Forums / Setup & design / Efficient way to select random nodes

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Efficient way to select random nodes

Author Message

Christian Johansen

Wednesday 21 June 2006 5:40:45 am

Has anyone got an efficient way to fetch random nodes? The way I'm doing it now is to fetch nodes and pipe it through to the shuffle operator. It works, sure, but often I end fetching ALOT more nodes than I actually need. Is there a simple way to select only the desired amount of nodes randomly from the database directly? Do I have to create som custom filter for this?

Łukasz Serwatka

Wednesday 21 June 2006 6:59:22 am

Hei,

This topic might be useful:
http://ez.no/community/forum/setup_design/how_to_fetch_random_content_3_8/re_how_to_fetch_random_content_3_8

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog