Get limited search results

Hello,
I am trying to find out a way to show only the top 500 or 1000 results.
I can add a $limit stage after the $search. Is there a better way to do it in the $search stage. Also is there a performance impact on using $limit after search?

Thanks,
Supriya

Hi @Supriya_Bansal,

Please note that using $limit after $SEARCH should be fine as explained in the performance consideration, it is good to avoid $match or $sort after $search but $limit should be fine.

Thanks,
Darshan