I want to limit the result data in flexible search query.
Let's say query should return only 10 records each time (like LIMIT)
How can I do this?
I want to limit the result data in flexible search query.
Let's say query should return only 10 records each time (like LIMIT)
How can I do this?
You already answered your query, you can use LIMIT cause same as we use in MySQL.
Try this
SELECT * FROM {Product} LIMIT 10
or
SELECT TOP 10 * FROM {Product}
For Oracle
SELECT * FROM {Product} WHERE rownum <= 10
Though API
final FlexibleSearchQuery query = new FlexibleSearchQuery("SELECT * FROM {Product}");
query.setCount(10);