Increase Search Result Size and Filter Special Characters
TLDR Anton requested pagination beyond 250 hits per page and precise filtering for terms with special characters. Jason suggested multi-search as a workaround and planned to address special character filtering in an upcoming release. A Github issue was created to track this feature request.
3
Jun 01, 2021 (30 months ago)
Anton
02:00 PM1. When using search I would like to get results in pages bigger than 250 items. At the moment queries like this
/collections/companies/documents/search?q=&filterby=additionaldata_company_competences:=["Steuerberatung","test"]&include_fields=rootfield__document_uri,additionaldata_company_competences&page=1&per_page=1000
end up with error "Only upto 250 hits can be fetched per page.". Is there a way to get more?
2. I cant find a way to filter the collection by term containing special symbols ("","-"). The following query
collections/companies/documents/search?q=&filter_by=rootfield__document_uri:="di-r_3"&include_fields=rootfield__document_uri
returns items with rootfield__document_uri "dir3","dir_3","di-r_3". How to solve that issue?
Ricardo
03:02 PMRicardo
03:03 PMJason
05:21 PM1. We have a limit of 250 records per page for performance and anti-abuse reasons. I think what you'd find useful is to just fetch all records (
q=*
) matching a filter. We've been thinking about adding the ability to add filter_by
and include_fields
to the documents export endpoint, which won't have this pagination limit, since there's no sorting performance overhead involved.In the meantime, fetching multiple pages across multiple requests is the workaround. Like indexer mentioned above, you could actually issue requests for multiple pages in one http requests using the multi_search endpoint.
2. This is a result of us removing all special characters before indexing. So
dir_3
actually gets indexed as dir3
. We're planning to address this in an upcoming release (not v0.21.0, but the one after).Vikas
06:00 PM1
Jason
06:06 PMJun 02, 2021 (30 months ago)
Typesense
Indexed 2776 threads (79% resolved)
Similar Threads
Optimizing Uploads to Typesense and Dealing with Hits Limit
Masahiro asked how to upload documents to Typesense faster and about their search feature limit_hits. Jason suggested batching documents and debugged the search query. Issue was resolved.
Moving from Algolia to Typesense: Questions and Answers
Juan sought advice from Kishore Nallan about moving from Algolia to Typesense, handling MultiSearch, setting parameters, checking imported documents, and a specific syntax query.
Discussion on the Use of `TypesenseInstantSearchAdapter`
DavidLo sought advice to retrieve search results using `TypesenseInstantSearchAdapter`. Carl and Jason advised using `typesense-js` and features like `documents/export`, `documents/search`, `multisearch`, and pagination. The potential server-side solution and bundle size issues concerning the exposure of the search client were also discussed.