Dhia
05/19/2025, 7:35 AM{q:'*',filter_by:'on_sale:true && sale.type:EnglishAuction',include_fields: 'price,on_sale,sale.price,sale.type,sale.primary', per_page:20}
{"facet_counts" => [],
"found" => 1640,
"hits" =>
[{"document" => {"on_sale" => true, "price" => 90, "sale" => {"price" => 90, "primary" => true, "type" => "EnglishAuction"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "price" => 90, "sale" => {"price" => 90, "primary" => true, "type" => "EnglishAuction"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "price" => 260, "sale" => {"price" => 260, "primary" => true, "type" => "EnglishAuction"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "price" => 400, "sale" => {"price" => 400, "primary" => true, "type" => "EnglishAuction"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "price" => 100, "sale" => {"price" => 100, "primary" => true, "type" => "EnglishAuction"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "price" => 220, "sale" => {"price" => 220, "primary" => true, "type" => "EnglishAuction"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "price" => 520, "sale" => {"price" => 520, "primary" => true, "type" => "EnglishAuction"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "price" => 90, "sale" => {"price" => 90, "primary" => true, "type" => "EnglishAuction"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "price" => 550, "sale" => {"price" => 550, "primary" => true, "type" => "EnglishAuction"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "price" => 90, "sale" => {"price" => 90, "primary" => true, "type" => "EnglishAuction"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "price" => 320, "sale" => {"price" => 320, "primary" => true, "type" => "EnglishAuction"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "price" => 90, "sale" => {"price" => 90, "primary" => true, "type" => "EnglishAuction"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "price" => 320, "sale" => {"price" => 320, "primary" => false, "type" => "SingleSaleOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "price" => 4180, "sale" => {"price" => 4180, "primary" => false, "type" => "SingleSaleOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "price" => 540, "sale" => {"price" => 540, "primary" => false, "type" => "SingleSaleOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "price" => 330, "sale" => {"price" => 330, "primary" => false, "type" => "SingleSaleOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "price" => 590, "sale" => {"price" => 590, "primary" => false, "type" => "SingleSaleOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "price" => 410, "sale" => {"price" => 410, "primary" => false, "type" => "SingleSaleOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "price" => 90, "sale" => {"price" => 90, "primary" => true, "type" => "EnglishAuction"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "price" => 90, "sale" => {"price" => 90, "primary" => true, "type" => "EnglishAuction"}}, "highlight" => {}, "highlights" => []}],
"out_of" => 15712569,
"page" => 1,
"request_params" => {"collection_name" => "blockchain_cards-1", "first_q" => "*", "per_page" => 20, "q" => "*"},
"search_cutoff" => false,
"search_time_ms" => 9}
• Order is not respected query, data seems somewhat orderd and i noticed that desc
order is way more consistent than asc
order {q:'*',filter_by:'on_sale:true && sale.type:PrimaryOffer && sale.price:>1000' ,sort_by:'sale.price:asc',include_fields: 'on_sale,sale.price,sale.type,sale.primary', per_page:20}
{"facet_counts" => [],
"found" => 3581,
"hits" =>
[{"document" => {"on_sale" => true, "sale" => {"price" => 2290, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "sale" => {"price" => 5300, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "sale" => {"price" => 1220, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "sale" => {"price" => 1220, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "sale" => {"price" => 1220, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "sale" => {"price" => 5300, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "sale" => {"price" => 5300, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "sale" => {"price" => 1220, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "sale" => {"price" => 5300, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "sale" => {"price" => 1220, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "sale" => {"price" => 1220, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "sale" => {"price" => 5300, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "sale" => {"price" => 5300, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "sale" => {"price" => 5300, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "sale" => {"price" => 1220, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "sale" => {"price" => 6200, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "sale" => {"price" => 1220, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "sale" => {"price" => 6200, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "sale" => {"price" => 6200, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []},
{"document" => {"on_sale" => true, "sale" => {"price" => 6200, "primary" => true, "type" => "PrimaryOffer"}}, "highlight" => {}, "highlights" => []}],
"out_of" => 15712568,
"page" => 1,
"request_params" => {"collection_name" => "blockchain_cards-1", "first_q" => "*", "per_page" => 20, "q" => "*"},
"search_cutoff" => false,
"search_time_ms" => 13}
and here the relavant part of the schema (the schema has 139 fields i filtred the one that are involved)
{"created_at" => 1747317842,
"default_sorting_field" => "",
"enable_nested_fields" => true,
"fields" =>
[
{"facet" => true, "index" => true, "infix" => false, "locale" => "", "name" => "on_sale", "optional" => true, "sort" => true, "stem" => false, "stem_dictionary" => "", "store" => true, "type" => "bool"},
{"facet" => false, "index" => true, "infix" => false, "locale" => "", "name" => "sale", "optional" => true, "sort" => false, "stem" => false, "stem_dictionary" => "", "store" => true, "type" => "object"},
{"facet" => false, "index" => true, "infix" => false, "locale" => "", "name" => "sale.end_date", "optional" => true, "sort" => true, "stem" => false, "stem_dictionary" => "", "store" => true, "type" => "int64"},
{"facet" => true, "index" => true, "infix" => false, "locale" => "", "name" => "sale.id", "optional" => true, "sort" => false, "stem" => false, "stem_dictionary" => "", "store" => true, "type" => "string"},
{"facet" => true, "index" => true, "infix" => false, "locale" => "", "name" => "sale.price", "optional" => true, "range_index" => true, "sort" => true, "stem" => false, "stem_dictionary" => "", "store" => true, "type" => "int64"},
{"facet" => true, "index" => true, "infix" => false, "locale" => "", "name" => "sale.primary", "optional" => true, "sort" => false, "stem" => false, "stem_dictionary" => "", "store" => true, "type" => "bool"}, {"facet" => true, "index" => true, "infix" => false, "locale" => "", "name" => "sale.price_range", "optional" => true, "sort" => false, "stem" => false, "stem_dictionary" => "", "store" => true, "type" => "string"},
{"facet" => true, "index" => true, "infix" => false, "locale" => "", "name" => "sale.type", "optional" => true, "sort" => false, "stem" => false, "stem_dictionary" => "", "store" => true, "type" => "string"},
{"facet" => false, "index" => true, "infix" => false, "locale" => "", "name" => "sale.type_ranked", "optional" => true, "sort" => true, "stem" => false, "stem_dictionary" => "", "store" => true, "type" => "int64"}
]
"name" => "blockchain_cards-1",
"num_documents" => 15712567,
"symbols_to_index" => [],
"token_separators" => []}
Thanks!Dhia
05/19/2025, 8:35 AMKishore Nallan
05/19/2025, 9:22 AMon_sale:true && sale.type:EnglishAuction
Is not a valid filter by clause because sale.type:EnglishAuction
has no value on the RHS to match on.Dhia
05/19/2025, 9:24 AMKishore Nallan
05/19/2025, 9:24 AMsale.type:EnglishAuction: X
the X
is missing.Kishore Nallan
05/19/2025, 9:25 AMon_sale:true && sale.type:PrimaryOffer && sale.price:>1000
It must be sale.type:PrimaryOffer: X
Dhia
05/19/2025, 9:28 AM{"facet" => true, "index" => true, "infix" => false, "locale" => "", "name" => "sale.type", "optional" => true, "sort" => false, "stem" => false, "stem_dictionary" => "", "store" => true, "type" => "string"}
if i want to filter all sales that have in sale.type
equal to EnglishAuction
what should i put in the filter thanKishore Nallan
05/19/2025, 9:31 AMKishore Nallan
05/19/2025, 9:31 AMDhia
05/19/2025, 9:32 AMKishore Nallan
05/19/2025, 9:33 AMsale
an array of object?Kishore Nallan
05/19/2025, 9:35 AMKishore Nallan
05/19/2025, 9:35 AMDhia
05/19/2025, 9:36 AMKishore Nallan
05/19/2025, 9:39 AMDhia
05/19/2025, 9:39 AMDhia
05/19/2025, 10:04 AMDhia
05/19/2025, 3:14 PMcurl <http://typesense>-${i}:8108/multi_search -X POST -H 'Content-Type: application/json' -d '{"searches": [{"collection": "blockchain_cards","q":"*","filter_by":"on_sale:true && sale.type:EnglishAuction","include_fields": "price,on_sale,sale.price,sale.type,sale.primary,id", "per_page":30}]}'| jq '.results[0]|.found'
(where i range from 0 tp4 included and for is the node upgraded)
searching on the 5
1506 --> 29-rc20
1506 --> 29-rc20
1506 --> 29-rc20
null --> REBOOTING
895 --> LATEST MASTER
But still result are inconsistent
curl -H "x-typesense-api-key: $TYPESENSE_PROD_KEY" <http://typesense-4:8108/multi_search> -X POST -H 'Content-Type: application/json' -d '{"searches": [{"collection": "blockchain_cards","q":"*","filter_by":"on_sale:true && sale.type:EnglishAuction","include_fields": "price,on_sale,sale.price,sale.type,sale.primary,id", "per_page":30}]}'| jq '.results[0]|.hits[]| .document.sale.type'
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"SingleSaleOffer"
"EnglishAuction"
"PrimaryOffer"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
Kishore Nallan
05/19/2025, 3:17 PMKishore Nallan
05/19/2025, 3:18 PMDhia
05/19/2025, 3:18 PMDhia
05/19/2025, 3:19 PMDhia
05/19/2025, 3:19 PMcurl -H "x-typesense-api-key: $TYPESENSE_PROD_KEY" <http://typesense-4:8108/multi_search> -X POST -H 'Content-Type: application/json' -d '{"searches": [{"collection": "blockchain_cards","q":"*","filter_by":"sale.type:EnglishAuction","include_fields": "price,on_sale,sale.price,sale.type,sale.primary,id", "per_page":30}]}'| jq '.results[0]|.hits[]| .document.sale.type'
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"SingleSaleOffer"
null
null
"EnglishAuction"
"PrimaryOffer"
"EnglishAuction"
"EnglishAuction"
null
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
null
"EnglishAuction"
null
"EnglishAuction"
null
"EnglishAuction"
null
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
"EnglishAuction"
null
Kishore Nallan
05/19/2025, 3:21 PMDhia
05/19/2025, 3:22 PMDhia
05/19/2025, 3:23 PMDhia
05/19/2025, 3:27 PMDhia
05/19/2025, 3:27 PMDhia
05/19/2025, 3:28 PMcurl -H "x-typesense-api-key: $TYPESENSE_PROD_KEY" <http://typesense-4:8108/multi_search> -X POST -H 'Content-Type: application/json' -d '{"searches": [{"collection": "blockchain_cards","q":"*","filter_by":"sale.primary:true","include_fields": "price,on_sale,sale.price,sale.type,sale.primary,id", "per_page":50}]}'| jq '.results[0]|.hits[]| .document.sale.primary'
true
true
true
true
true
true
true
true
true
true
true
true
true
true
true
true
true
true
true
true
true
true
true
true
true
true
true
true
true
null
true
true
true
null
true
null
null
null
null
true
true
true
null
true
true
true
true
true
true
true
Kishore Nallan
05/19/2025, 3:30 PMDhia
05/20/2025, 11:24 AMDhia
05/20/2025, 11:24 AMKishore Nallan
05/20/2025, 11:30 AMDhia
05/20/2025, 11:30 AM[id,sale.type]
but i was not able to reproduce the inconsistencyDhia
05/20/2025, 11:31 AM[id,on_sale,sale.type]
my idea is to reduce the dataset to a minimal scopeDhia
05/20/2025, 11:31 AMKishore Nallan
05/20/2025, 11:32 AMDhia
05/20/2025, 11:32 AMDhia
05/20/2025, 11:32 AMKishore Nallan
05/20/2025, 11:32 AMKishore Nallan
05/20/2025, 11:33 AMDhia
05/20/2025, 11:33 AMDhia
05/20/2025, 11:34 AMKishore Nallan
05/20/2025, 11:34 AMDhia
05/20/2025, 11:35 AMKishore Nallan
05/20/2025, 11:56 AMDhia
05/20/2025, 12:51 PMKishore Nallan
05/20/2025, 12:54 PMDhia
05/20/2025, 1:03 PM# drop the collection if it exists
DELETE <http://localhost:8200/collections/minimal_test_collection>
X-TYPESENSE-API-KEY: {{api_key}}
### create the collection
POST <http://localhost:8200/collections>
content-type: application/json
x-typesense-api-key: {{api_key}}
{"name": "minimal_test_collection", "enable_nested_fields": true, "fields": [{"name": "id", "type": "string"}, {"name": "sale.type", "type": "string", "optional": true}]}
#### add 1 document
POST <http://localhost:8200/collections/minimal_test_collection/documents/import?action=emplace>
content-type: application/json
x-typesense-api-key: {{api_key}}
{"id": "test_slug", "sale": {"type": "EnglishAuction"}}
### update sale to null
POST <http://localhost:8200/collections/minimal_test_collection/documents/import?action=emplace>
content-type: application/json
x-typesense-api-key: {{api_key}}
{"id": "test_slug", "sale": null}
###
POST <http://localhost:8200/collections/minimal_test_collection/documents/import?action=emplace>
content-type: application/json
x-typesense-api-key: {{api_key}}
{"id": "test_slug", "sale": {"type": "SingleSaleOffer"}}
###
GET <http://localhost:8200/collections/minimal_test_collection/documents/test_slug>
X-TYPESENSE-API-KEY: {{api_key}}
###
POST <http://localhost:8200/multi_search>
content-type: application/json
x-typesense-api-key: {{api_key}}
{
"searches": [
{
"collection": "minimal_test_collection",
"q": "*",
"filter_by": "sale.type:EnglishAuction",
"include_fields": "sale.type,id",
"per_page": 200
}
]
}
Dhia
05/20/2025, 1:05 PM{
"id": "test_slug",
"sale": {
"type": "EnglishAuction"
}
}
than
{
"id": "test_slug",
"sale": null
}
the search on sale.type:EnglishAuction will return the documentDhia
05/20/2025, 1:05 PMKishore Nallan
05/20/2025, 1:08 PMnull
-- can you try with action=upsert
?Kishore Nallan
05/20/2025, 1:10 PM"sale": null
is treated as just "sale": {}
-- i.e. object being unchanged. Upsert might treat it as deletion.Dhia
05/20/2025, 1:11 PMDhia
05/20/2025, 1:12 PMKishore Nallan
05/20/2025, 1:12 PMupdate
and emplace
will have this quirk of treating null
as {}
Dhia
05/20/2025, 1:13 PMDhia
05/20/2025, 1:14 PMKishore Nallan
05/20/2025, 1:16 PMDhia
05/20/2025, 1:16 PMDhia
05/20/2025, 1:17 PMKishore Nallan
05/20/2025, 1:17 PMKishore Nallan
05/20/2025, 1:18 PMnull
behave like deletion on emplace will be the fix.Dhia
05/20/2025, 1:18 PMKishore Nallan
05/21/2025, 5:31 PM29.0.rc25
build we just published.Dhia
05/22/2025, 9:04 AMDhia
05/22/2025, 9:04 AMDhia
05/22/2025, 3:35 PMDhia
05/22/2025, 3:36 PMDhia
05/22/2025, 3:45 PMDhia
05/22/2025, 3:46 PMcurl -H "x-typesense-api-key: $TYPESENSE_PROD_KEY" <http://typesense-4:8108/multi_search> -X POST -H 'Content-Type: application/json' -d '{"searches": [{"collection": "blockchain_cards","q":"*","filter_by":"sale.type:EnglishAuction","include_fields": "sale.type,id", "per_page":200}]}'| jq -c '.results[0]|[.found,(.hits[]| .document.sale.type)]'
[1089,"EnglishAuction","EnglishAuction","EnglishAuction","EnglishAuction","EnglishAuction","EnglishAuction","EnglishAuction","EnglishAuction",null,"EnglishAuction","EnglishAuction","EnglishAuction",null,"EnglishAuction","EnglishAuction","EnglishAuction","EnglishAuction","EnglishAuction",null,"EnglishAuction","EnglishAuction","EnglishAuction",null,"EnglishAuction",null,"EnglishAuction",null,null,null,"EnglishAuction","EnglishAuction",null,null,null,null,"EnglishAuction","EnglishAuction",null,null,"EnglishAuction","EnglishAuction","EnglishAuction","EnglishAuction",null,"EnglishAuction","SingleSaleOffer","EnglishAuction","EnglishAuction",null,"EnglishAuction",null,"EnglishAuction","EnglishAuction",null,null,"EnglishAuction","EnglishAuction","EnglishAuction",null,"EnglishAuction","EnglishAuction",null,"EnglishAuction",null,null,null,null,"EnglishAuction",null,null,null,null,"EnglishAuction","EnglishAuction",null,null,"EnglishAuction",null,null,"EnglishAuction","EnglishAuction","EnglishAuction","EnglishAuction",null,"EnglishAuction",null,null,"EnglishAuction","EnglishAuction","EnglishAuction",null,null,"EnglishAuction",null,"EnglishAuction",null,"EnglishAuction",null,null,null,null,null,"SingleSaleOffer",null,null,null,"EnglishAuction","EnglishAuction",null,"EnglishAuction",null,null,null,"EnglishAuction",null,"EnglishAuction","EnglishAuction",null,null,"EnglishAuction",null,null,null,"SingleSaleOffer",null,null,"EnglishAuction","EnglishAuction",null,null,"EnglishAuction",null,null,null,"EnglishAuction",null,null,null,null,null,"EnglishAuction",null,null,null,null,"EnglishAuction",null,null,null,null,null,null,null,null,null,null,null,"SingleSaleOffer",null,null,null,"EnglishAuction","EnglishAuction",null,"EnglishAuction",null,null,"EnglishAuction","EnglishAuction","EnglishAuction","EnglishAuction","EnglishAuction","EnglishAuction","EnglishAuction","EnglishAuction","SingleSaleOffer","EnglishAuction","EnglishAuction",null,null,"EnglishAuction","EnglishAuction",null,null,null,"EnglishAuction","EnglishAuction",null,null,"EnglishAuction","EnglishAuction",null,null,"EnglishAuction","EnglishAuction",null,"EnglishAuction","EnglishAuction","EnglishAuction","EnglishAuction"]
Dhia
05/22/2025, 3:51 PMKishore Nallan
05/22/2025, 3:56 PMDhia
05/22/2025, 4:02 PMKishore Nallan
05/22/2025, 4:03 PMDhia
05/22/2025, 4:03 PMKishore Nallan
05/22/2025, 4:03 PMin both cases rc24 send wrong answer and rc25 sends the correct oneThen what do you mean by "correct one" here?
Dhia
05/22/2025, 4:04 PMKishore Nallan
05/22/2025, 4:04 PM{ }
expecting that to delete the data?Dhia
05/22/2025, 4:05 PMKishore Nallan
05/22/2025, 4:06 PMDhia
05/22/2025, 4:06 PMKishore Nallan
05/22/2025, 4:08 PMKishore Nallan
05/22/2025, 4:09 PM{sale: {type: null}}
in the update?Dhia
05/22/2025, 4:09 PMKishore Nallan
05/22/2025, 4:10 PMDhia
05/22/2025, 4:10 PMMaybe setting {sale: {type: null}} in the update?the code should not allow this either we have a full sale or not. the object is only created when there is a sale and type is the "class" of object
Dhia
05/22/2025, 4:10 PMDhia
05/22/2025, 4:11 PMKishore Nallan
05/22/2025, 4:15 PMDhia
05/22/2025, 4:16 PMDhia
05/22/2025, 4:17 PMKishore Nallan
05/22/2025, 4:17 PMDhia
05/22/2025, 4:17 PMKishore Nallan
05/22/2025, 4:18 PMDhia
05/23/2025, 7:33 AM### drop the collection if it exists
DELETE <http://localhost:8108/collections/minimal_test_collection>
X-TYPESENSE-API-KEY: {{local_api_key}}
### create the collection
POST <http://localhost:8108/collections>
content-type: application/json
x-typesense-api-key: {{local_api_key}}
{"name": "minimal_test_collection", "enable_nested_fields": true, "fields": [{"name": "id", "type": "string"},{"name":"sale", "type": "object", "optional": true}, {"name": "sale.type", "type": "string", "optional": true, "facet": false}]}
#### add 1 document
POST <http://localhost:8108/collections/minimal_test_collection/documents/import?action=emplace>
content-type: application/json
x-typesense-api-key: {{local_api_key}}
{"id": "test_slug", "sale": {"type": "EnglishAuction"}}
### update sale to null
POST <http://localhost:8108/collections/minimal_test_collection/documents/import?action=emplace>
content-type: application/json
x-typesense-api-key: {{local_api_key}}
{"id": "test_slug", "sale": null}
###
POST <http://localhost:8108/collections/minimal_test_collection/documents/import?action=emplace>
content-type: application/json
x-typesense-api-key: {{local_api_key}}
{"id": "test_slug", "sale": {"type": "SingleSaleOffer"}}
###
GET <http://localhost:8108/collections/minimal_test_collection/documents/test_slug>
X-TYPESENSE-API-KEY: {{local_api_key}}
###
POST <http://localhost:8108/multi_search>
content-type: application/json
x-typesense-api-key: {{local_api_key}}
{
"searches": [
{
"collection": "minimal_test_collection",
"q": "*",
"filter_by": "sale.type:EnglishAuction",
"include_fields": "sale.type,id",
"per_page": 200
}
]
}
Dhia
05/23/2025, 7:35 AM{
"name": "minimal_test_collection",
"enable_nested_fields": true,
"fields": [
{
"name": "id",
"type": "string"
},
{
"name": "sale",
"type": "object",
"optional": true
},
{
"name": "sale.type",
"type": "string",
"optional": true,
"facet": false
}
]
}
but with this definition no bug (the sale object is not defined)
{
"name": "minimal_test_collection",
"enable_nested_fields": true,
"fields": [
{
"name": "id",
"type": "string"
},
{
"name": "sale.type",
"type": "string",
"optional": true,
"facet": false
}
]
}
Kishore Nallan
05/23/2025, 8:12 AMKishore Nallan
05/23/2025, 8:16 AMDhia
05/23/2025, 9:27 AMKishore Nallan
05/23/2025, 11:18 AMKishore Nallan
05/25/2025, 12:50 PM29.0.rc26
Dhia
05/26/2025, 6:46 PMDhia
06/02/2025, 7:53 AMKishore Nallan
06/02/2025, 7:54 AM