Adrian Ani
03/01/2023, 2:54 AM{
name: 'accounts',
fields: [
{
name: 'username',
type: 'string',
facet: false,
},
{
name: 'email',
type: 'string',
facet: false,
},
],
}
And dumped a bunch of random data in there with that structure, if I use this code to search:
const accounts = await typesenseClient
.collections<Omit<Account, 'password'>>('accounts')
.documents()
.search(
{
q: 'Ma',
query_by: 'username',
page: 1,
per_page: 20,
include_fields: 'username',
},
{
cacheSearchResultsForSeconds: 0,
}
);
It will return ONLY 10 hits, even though I know for a fact there should be more documents with the username starting with Ma
(same thing happens for different searches, it doesn't go over 10) - if the q
param is set to *
it will show all the 1K+ docs available in that collection.
What am I missing? I've followed the setup guide from here https://typesense.org/docs/guide/install-typesense.html#linux-binaryKishore Nallan
03/01/2023, 3:03 AM