3

Below query returns 250 records

FIND {*test*} IN ALL FIELDS RETURNING Knowledge__kav(Id, Title WHERE PublishStatus='online' AND Language= 'en_US')

Below query returns 2000 records

FIND {*test*} IN ALL FIELDS RETURNING Knowledge__kav(Id, Title WHERE PublishStatus='online' AND Language= 'en_US' ORDER BY CreatedDate Desc)

Why does 'Order By' determine how many records to return? Is there any document which says to include Order By or something in a sosl query to retrieve more than 250 records?

2
  • 1
    I see similar behavior in my org. I see this answer salesforce.stackexchange.com/questions/77110/… but isn't super specific or clear Oct 2, 2019 at 21:35
  • @KrisGoncalves Exactly, I cannot find any documentation on this limitation. I am perplexed with the behavior of this sosl query. Strange thing is that this is an intermittent issue for some users, sometimes users are seeing 2000 records for the first query and sometimes 250 for the same query.
    – Sriram Lns
    Oct 2, 2019 at 21:45

1 Answer 1

1

I have tweaked the query a little bit and it started giving me 2000 records instead of the 250 and you don't have to include "Order By" in the query.

FIND {*test*} IN ALL FIELDS RETURNING Knowledge__kav(Id, Title WHERE PublishStatus='online' AND Language= 'en_US' AND IsLatestVersion = true)

I still couldn't find any documentation yet on this behavior.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .