#community-help

Retrieving Data & Disabling Autocomplete Plugin without Queries

TLDR Prime inquired about retrieving data from a collection without a query and disabling an autocomplete plugin when query is empty. Jason advised using certain parameters.

Powered by Struct AI
Nov 04, 2023 (3 weeks ago)
Prime
Photo of md5-696e44f65b98e5b1e2bbbc3d8d7d403d
Prime
01:53 PM
Is there any way, to get results from a collection without using the query? I mean I have a collection named books, and I want to get the newest 5 books from there, the created_date being the date of the publishing to the website of the book, in a timestamp format. How can I do this search without using a query?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
02:29 PM
You could set q=* and only use sort by and per page parameters
Prime
Photo of md5-696e44f65b98e5b1e2bbbc3d8d7d403d
Prime
02:55 PM
Jason one more question, is there any way in autocomplete to disable an autocomplete plugin if the query is empty?