I'm running into a strange issue when I create a s...
# community-help
s
I'm running into a strange issue when I create a schema with auto nested fields. My code is set to index batches of 1000 documents at a time using the batch_size field
Copy code
client.collections[collName].documents.import_(records, {'action': 'upsert', 'batch_size': 1000})
If I run the script for a minute and stop it after 50,000 documents i see 50,000 records using the retrieve function. When I add
enable_nested_fields: True
to the schema, create a new index and process the same 50,000 records I see a fraction of those listed in the retrieve call ;
'num_documents': 3385
Does my schema look correct?
Copy code
my_schema = {
    "name": collName,
    "enable_nested_fields": True,
    "fields": [
        {
            'name'  :  'title',
            'type'  :  'string',
            'optional': True
        },
        {
            'name'  :  'description',
            'type'  :  'string',
            'optional': True
        },
        {
            'name'  :  'product_type',
            'type'  :  'string',
            'facet' :  True,
            'optional': True
        },
        {
            'name'  :  'vendor',
            'type'  :  'string',
            'facet' :  True,
            'optional': True
        },
        {
            'name'  :  'sid',
            'type'  :  'int64',
            'optional': True
        },
        {
            'name'  :  'tags',
            'type'  :  'string[]',
            'facet' :  True,
            'optional': True
        },
        {
            'name'  :  'url',
            'type'  :  'string',
            'index':   False,
            'optional': True
        },
        {
            'name'  :  'handle',
            'type'  :  'string',
            'index': False,
            'optional': True
        },
        {
            'name'  :  'last-updated',
            'type'  :  'int32',
            'optional': True
        },
        {
            'name'  :  'missing',
            'type'  :  'bool',
            'optional': True
        },
        {
            "name" : "categories",
            "type" : "string[]",
            "optional": True
        },
        {"name": ".*", "type": "auto" }
    ]
}
client.collections.create(my_schema)