Hey there :wave: I'm trying typesense for the firs...
# community-help
a
Hey there 👋 I'm trying typesense for the first time and for the purpose of learning I threw together a very simple collection with this schema:
Copy code
{
	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:
Copy code
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-binary
k
Try sending 'max_candidates: 1000' as a search option.
🙏 1