#community-help

Setting Default Query Parameter and Security Concerns

TLDR Akash wants to set a default query parameter. Jason provides guidance on its implementation and addresses Akash's security concerns.

Powered by Struct AI
10
14mo
Solved
Join the chat
Oct 13, 2022 (14 months ago)
Akash
Photo of md5-5a7e6fd9a070eac5034a6034f0dc38b1
Akash
11:14 AM
Jason We want to pass this query addition paramenter as default {'q': '190', 'query_by': 'parent_category', 'page': 1, 'sort_by': 'num_is_out_of_stack:asc,book_type:asc', 'filter_by': '&& book_type:[0, 2]', 'facet_by': 'author,publication,category,language,keywords,book_type,binding,book_condition,subject,class', 'max_facet_values': 30, 'num_typos': 2, 'typo_tokens_threshold': 10, 'per_page': 200}
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
02:13 PM
I didn’t get you fully. Are you saying that you want the default query to be 190 in the search box in react-instantsearch?
Akash
Photo of md5-5a7e6fd9a070eac5034a6034f0dc38b1
Akash
02:14 PM
No i just fetch data in page directly without search box
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
02:16 PM
Could you share a mock-up of the UI you’re trying to build
Akash
Photo of md5-5a7e6fd9a070eac5034a6034f0dc38b1
Akash
02:16 PM
Yes
Oct 15, 2022 (14 months ago)
Akash
Photo of md5-5a7e6fd9a070eac5034a6034f0dc38b1
Akash
12:37 PM
api key shown when react-instant search is hit
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
12:57 PM
You want to use the search only api key there, which is designed to be exposed publicly
Akash
Photo of md5-5a7e6fd9a070eac5034a6034f0dc38b1
Akash
01:30 PM
Is any security issues
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
01:49 PM
If your search bar is already public then, users already have access to the data that is available in the Typesense api
01:50
Jason
01:50 PM
If you want to limit access to the number of results that can be fetched, you can also create a scoped api key with the limit_hits and limit_multi_searches parameter

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3011 threads (79% resolved)

Join Our Community

Similar Threads

Query on Facet Values, `max_facet_values` , and `facet_query_num_typos`.

Jan asked about sorting facet values, managing `max_facet_values` and issues with `facet_query_num_typos`. Jason clarified the details on instantsearch widget handling of `max_facet_values` and identified a bug on the Typesense Server. Jason suggested a solution to the sorting issue.

2

23
1mo
Solved

Resolving Issues with 'React-InstantSearch'

robert was having trouble merging results from different collections using `react-instantsearch` and was facing issues with undefined highlight results. After much discussion, Jason provided a solution using `collectionSpecificSearchParameters` and `highlight_full_fields` to solve the problem.

3

28
17mo
Solved

Configuring InstantSearch.js Parameters and Comparing Search Results

John is having difficulty configuring InstantSearch.js parameters. Jason suggested how to utilize `facet_by` and `filter_by` widgets and advised checking network for search parameters. They also asked John to open an issue on the unexpected need for manual `_text_match` addition.

2

18
32mo

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.

1

56
21mo
Solved

Network Errors and Duplicate Requests in Typesense

Ethan and Rushil were experiencing more than 300 network errors and duplicate requests from Typesense. After rigorous troubleshooting, Jason identified the issue as an Instantsearch-induced multiple re-rendering and implemented a fix. Multiple requests reduced, but networking errors persisted, suggested to be due to client-side internet connectivity.

6

68
4mo
Solved