Creating Scoped API Keys for Multi-Tenant Doc Search
TLDR David needed help creating scoped API keys for multi-tenant document search. Jason suggested using filter_by: docsearch:$NAME:=12345
and renaming a field to end with _tag
to resolve David's challenges. They also discussed documenting this solution.
Dec 02, 2021 (23 months ago)
David
01:05 AM<meta name="docsearch:$NAME" content="12345" />
but you can't seem to filter on these - only facet by. Use case is multi tenant doc search - am I better off creating a collection for each site?Jason
01:07 AMfilter_by: docsearch:$NAME:=12345
when generating the keyJason
01:08 AMDavid
01:21 AMServer said: Could not find a filter field named
servId in the schema.
but see it in hits when I search without the filter.{
...
id: '5',
item_priority: 5,
no_variables: true,
objectID: '17d9155cd183c02e8c0b9b59f57c1cb23820b556',
servId: '12345',
tags: [],
type: 'content',
...
}
Jason
01:32 AM_tag
and run the scraper again?Only those fields get picked up in the schema by the scraper: https://github.com/typesense/typesense-docsearch-scraper/blob/7a2f05831bc5569e6c19e311125cb0ce91c61b1f/scraper/src/typesense_helper.py#L47
David
01:37 AMJason
01:37 AMJason
01:38 AMDavid
04:31 PMTypesense
Indexed 2779 threads (79% resolved)
Similar Threads
Docsearch Scrapper Metadata Configuration and Filter Problem
Marcos faced issues with Docsearch scrapper not adding metadata attributes and filtering out documents without content. Jason helped fix the issue by updating the scraper and providing filtering instructions.
Troubleshooting Issues with DocSearch Hits and Scraper Configuration
Rubai encountered issues with search result priorities and ellipsis. Jason helped debug the issue and suggested using different versions of typesense-docsearch.js, updating initialization parameters, and running the scraper on a Linux-based environment. The issues related to hits structure and scraper configuration were resolved.
Troubleshooting Typesense Setup and Understanding Facets and Keywords
Demitri encountered errors when exploring Typesense for the first time. Jason guided them through troubleshooting and discussed facets, keyword settings, and widget configurations. Helin shared a Python demo app and its source code to help Demitri with their project.
Solving Typesense Docsearch Scraper Issues
Sandeep was having issues with Typesense's docsearch scraper and getting fewer results than with Algolia's scraper. Jason helped by sharing the query they use and advised checking the running version of the scraper. The issue was resolved when Sandeep ran the non-base regular docker image.
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.