gab gab
11/03/2021, 12:38 PMcraftsman.prod
uction_labels.*.*
in the schema.
``Kishore Nallan
11/03/2021, 12:42 PMgab gab
11/03/2021, 12:43 PMKishore Nallan
11/03/2021, 12:44 PMgab gab
11/03/2021, 12:59 PMgab gab
11/03/2021, 1:19 PMgab gab
11/03/2021, 1:31 PMKishore Nallan
11/03/2021, 1:33 PMgab gab
11/03/2021, 1:50 PMKishore Nallan
11/03/2021, 1:54 PMgab gab
11/03/2021, 2:10 PMgab gab
11/03/2021, 2:11 PMKishore Nallan
11/03/2021, 2:11 PMgab gab
11/03/2021, 2:13 PMKishore Nallan
11/03/2021, 2:13 PMKishore Nallan
11/03/2021, 2:26 PM'craftsman.production_labels.*.*': [ 'Natura-Veal' ],
Kishore Nallan
11/03/2021, 2:28 PM{
name: 'craftsman.production_labels.*.*',
type: 'string[]',
optional: true,
facet: true
},
This means that: "Accept any field name that begins with `craftsman.production_labels.". When Typesense sees an actual field matching that rule, it creates an entry in the schema with the actual field name and its type.
Since the document that is indexed repeats the
.*` stuff in the field name, you end up with a duplicate. Now, we should certainly account for this edge case and not accept a document that contains a field name that duplicates a regexp field definition.gab gab
11/04/2021, 7:30 AMgab gab
11/04/2021, 7:33 AMJms
06/28/2024, 12:28 PMconst fields = [
{
name: `title_en`,
type: 'string*',
facet: false
},
{
name: `title_fr`,
type: 'string*',
facet: false
}
]
I create the schema through the api and when I'm viewing the schema through the Typesense cloud dashboard it gives me back this.
[
{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "title_en",
"optional": true,
"sort": false,
"stem": false,
"type": "string*"
},
{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "title_en",
"optional": true,
"sort": false,
"stem": false,
"type": "string"
},
{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "title_fr",
"optional": true,
"sort": false,
"stem": false,
"type": "string*"
},
{
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "title_fr",
"optional": true,
"sort": false,
"stem": false,
"type": "string"
}
]
Notice the only difference between the duplicated entries is that one has a type of: string
and the other a type of string*
(again not sure if this is expected)
Also when I'm on the Typesense cloud search page, I see that every document contains 2 title_fr properties and 2 title_en properties.Kishore Nallan
06/28/2024, 12:34 PMKishore Nallan
06/28/2024, 12:35 PMstring*
which is the base schema and then the concrete type string
which is detected based on the first document indexed.
This is expected if you use string*
as a type in your schema.Jms
06/28/2024, 12:40 PM