Discussing Indexing and Filter Applications
TLDR Tugay and Kishore Nallan debated over latest RC build progress with several queries about field definitions and effect of filters on performance. A bug concerning multiple document matches was discovered and fixed.

Mar 10, 2021 (30 months ago)
Tugay
06:47 AMTugay
06:48 AMKishore Nallan
06:49 AMTugay
06:50 AM
Kishore Nallan
08:52 AMTugay
09:07 AMTugay
10:09 AMfacet: true
but index: false
for a field?For example:
{ "name": "brandId", "type": "string", "facet": true, "index": false, "optional": true }
or
{ "name": ".*_fct", "type": "string", "facet": true, "index": false}
Kishore Nallan
10:13 AMindex: false
it essentially amounts to the field being ignored totally. So facet indexing will not happen if index
is set to false
.Tugay
10:17 AMindex: false
usage thanks.Kishore Nallan
10:21 AMTugay
10:26 AMKishore Nallan
10:26 AMTugay
10:26 AMTugay
10:28 AMTugay
10:29 AMKishore Nallan
10:33 AMtypo_tokens_threshold)
so the search has to become really exhaustive and that takes longer. The intersections of matching IDs of each of those filters will also take time with so many filters. 2. I don't quite follow this question, but there is a
found
field returned in search response. Tugay
10:37 AMfound
field returned in search response.For example we have an
int[]
field if we apply filter 1<= x <=4
and if field value is [1,2,3,4,5]
then search result returns found: 4
Tugay
10:40 AMKishore Nallan
11:04 AMfound
is expected to work. I just tried it on an array field on a single document and it is not showing that behavior:curl "" -X POST -H "Content-Type: application/json" \
-H "X-TYPESENSE-API-KEY: ${TYPESENSE_API_KEY}" -d '{
"company_name": "Stark Industries",
"num_employees": 5215,
"category_fct": "defence", "values": [1,2,3,4,5],
"description_text": "Some text that will not be indexed."
}'
{"category_fct":"defence","company_name":"Stark Industries","description_text":"Some text that will not be indexed.","id":"1","num_employees":5215,"values":[1,2,3,4,5]}
curl ":>2&x-typesense-api-key=abcd&prefix=false"
{"facet_counts":[],"found":1,"hits":[{"document":{"category_fct":"defence","company_name":"Stark Industries","description_text":"Some text that will not be indexed.","id":"1","num_employees":5215,"values":[1,2,3,4,5]},"highlights":[{"field":"company_name","matched_tokens":["Stark"],"snippet":"<mark>Stark</mark> Industries"}],"text_match":130816}],"out_of":2,"page":1,"request_params":{"collection_name":"companies","per_page":10,"q":"stark"},"search_time_ms":1}
Tugay
11:05 AMTugay
11:23 AMTugay
11:24 AMKishore Nallan
11:34 AMKishore Nallan
11:50 AM
Kishore Nallan
12:36 PMtypesense/typesense:0.20.0.rc18
Tugay
01:08 PMTypesense
Indexed 2764 threads (79% resolved)
Similar Threads
Fixing Multiple Document Retrieval in Typesense
Phil needed an efficient way to retrieve multiple documents by id. Kishore Nallan proposed a solution available in a pre-release build. After some bug fixing regarding id matching by Jason and Kishore Nallan, Phil successfully tested the solution.



Phrase Search Relevancy and Weights Fix
Jan reported an issue with phrase search relevancy using Typesense Instantsearch Adapter. The problem occurred when searching phrases with double quotes. The team identified the issue to be related to weights and implemented a fix, improving the search results.


Cold Start Problem with Dynamic Collections
Adrian reported cold start issues with dynamic collections. Jason suggested using wildcard `*` for query_by parameters, upgrading to `0.25.0.rc34`, and clarified conventions. Adrian's issues were resolved but they reported a limitation that will potentially be addressed.

Querying and Indexing Multiple Elements Issues
Krish queried fields with multiple elements, which Kishore Nallan suggested checking `drop_tokens_threshold`. Krish wished to force OR mode for token, but Kishore Nallan admitted the feature was missing. Krish was able to resolve the issue with url encoding.
Typesense Filter Bug Involving Similar Facets
SamHendley reported a bug in Typesense where filtering by facet returns wrong documents, providing a reproduction case. Jason and Kishore Nallan recognized the issue, tracked it on GitHub, and implemented a fix in a new Docker build.
