Issues with Scoped Search Keys on App
TLDR Sai was having trouble with generating scoped search keys for users on their app. Kishore Nallan helped identify the problem; the userAcl field was not indexable, thus, it needed to be set as indexable.
1
Sep 14, 2022 (15 months ago)
Sai
12:55 PMThis new scoped search keys have embedded filters like below
client.keys().generateScopedSearchKey(searchApiKey, {
filter_by: `userAcl:=${userId}`,
exclude_fields: ['userAcl'],
})
Sai
12:56 PMSai
12:56 PMKishore Nallan
01:12 PMSai
01:19 PMSai
01:19 PMSai
01:20 PMKishore Nallan
01:20 PM{"filter_by":"userAcl:=QRqYPQfpvkb5YefmbxV7URug1h42","exclude_fields":["userAcl"]}
Exclude fields must be a comma separated string.
Kishore Nallan
01:21 PMSai
01:28 PMSai
01:30 PMSai
01:33 PM{
"created_at": 1663158468,
"default_sorting_field": "",
"fields": [
{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "name",
"optional": false,
"sort": false,
"type": "string"
},
{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "description",
"optional": false,
"sort": false,
"type": "string"
},
{
"facet": false,
"index": false,
"infix": false,
"locale": "",
"name": "userAcl",
"optional": true,
"sort": false,
"type": "string[]"
}
],
"name": "playlists",
"num_documents": 21,
"symbols_to_index": [],
"token_separators": []
}
Kishore Nallan
01:40 PMKishore Nallan
01:40 PMSai
01:42 PMThanks
1
Typesense
Indexed 3011 threads (79% resolved)
Similar Threads
Trouble in Implementing Deeply Nested Search
Anirudh is struggling to implement a two-level nested search. Jason asked for some specific examples to study the issue. Anirudh provided some material, realizing that adding top fields helped but might over-index. Jason then suggested reporting this issue on GitHub.
Resolving Issues with Scoped API Keys in Typesense with Golang
Suvarna had problems with generating and using scoped API keys in Typesense with Golang. Several bugs misleading the user were found and fixed by Kishore Nallan.
Issue with API Key Expiry and Generation in Node.js
Sai is having trouble with API keys expiring and triggering a forbidden key error in Node.js. Despite trying to generate a new key after expiry, Sai gets the same error. Jason explains that the problem may be due to the expiration of parent API keys.
Correct API Key Generation and Usage on Cloud
Tom faced 401 errors while creating keys via the Cloud API. Kishore Nallan clarified the correct syntax and mechanics, and identified a header mislabeling on Tom's part that caused the issue. They also discussed using scoped API keys.
Issues with Generating Scope API Keys in Python
Danny had issues generating a valid scope API key in a Python GraphQL server. Jason suggested encoding changes and confirmed that the key length varies. Issue unresolved with Python, although JS library worked.