Tugay Karaçay
03/10/2021, 6:47 AMTugay Karaçay
03/10/2021, 6:48 AMKishore Nallan
03/10/2021, 6:49 AMTugay Karaçay
03/10/2021, 6:50 AMKishore Nallan
03/10/2021, 8:52 AMTugay Karaçay
03/10/2021, 9:07 AMTugay Karaçay
03/10/2021, 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
03/10/2021, 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 Karaçay
03/10/2021, 10:17 AMindex: false
usage thanks.Kishore Nallan
03/10/2021, 10:21 AMTugay Karaçay
03/10/2021, 10:26 AMKishore Nallan
03/10/2021, 10:26 AMTugay Karaçay
03/10/2021, 10:26 AMTugay Karaçay
03/10/2021, 10:28 AMTugay Karaçay
03/10/2021, 10:29 AMKishore Nallan
03/10/2021, 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 Karaçay
03/10/2021, 10:37 AMI don’t quite follow this question, but there is aFor example we have anfield returned in search response.found
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 Karaçay
03/10/2021, 10:40 AMKishore Nallan
03/10/2021, 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 "<http://localhost:8108/collections/companies/documents>" -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 "<http://localhost:8108/collections/companies/documents/search?q=stark&query_by=company_name&filter_by=values>:>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 Karaçay
03/10/2021, 11:05 AMTugay Karaçay
03/10/2021, 11:23 AMTugay Karaçay
03/10/2021, 11:24 AMKishore Nallan
03/10/2021, 11:34 AMKishore Nallan
03/10/2021, 11:50 AMKishore Nallan
03/10/2021, 12:36 PMtypesense/typesense:0.20.0.rc18
Tugay Karaçay
03/10/2021, 1:08 PM