1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

Support Vector Similarity (#1785)

* ft.alter

* support paramas

* remove only and skip

* merge

* fix imports

* add Vector field

* update version

* push attributes

* typo

* test

* version check

* remove .only

* remove unued import

* add support for DIALECT

* clean code

Co-authored-by: Avital-Fine <avital.fine@redis.com>
Co-authored-by: leibale <leibale1998@gmail.com>
This commit is contained in:
Avital Fine
2022-03-31 13:13:06 +02:00
committed by GitHub
parent 33a3f3f6c6
commit 4683e969b8
16 changed files with 631 additions and 304 deletions

View File

@@ -15,32 +15,56 @@ describe('INFO', () => {
await client.ft.create('index', {
field: SchemaFieldTypes.TEXT
});
assert.deepEqual(
await client.ft.info('index'),
{
indexName: 'index',
indexOptions: [],
indexDefinition: {
defaultScore: '1',
keyType: 'HASH',
prefixes: ['']
},
attributes: [[
'identifier',
'field',
'attribute',
'field',
'type',
'TEXT',
'WEIGHT',
'1'
]],
indexDefinition: Object.create(null, {
default_score: {
value: '1',
configurable: true,
enumerable: true
},
key_type: {
value: 'HASH',
configurable: true,
enumerable: true
},
prefixes: {
value: [''],
configurable: true,
enumerable: true
}
}),
attributes: [Object.create(null, {
identifier: {
value: 'field',
configurable: true,
enumerable: true
},
attribute: {
value: 'field',
configurable: true,
enumerable: true
},
type: {
value: 'TEXT',
configurable: true,
enumerable: true
},
WEIGHT: {
value: '1',
configurable: true,
enumerable: true
}
})],
numDocs: '0',
maxDocId: '0',
numTerms: '0',
numRecords: '0',
invertedSzMb: '0',
vectorIndexSzMb: '0',
totalInvertedIndexBlocks: '0',
offsetVectorsSzMb: '0',
docTableSizeMb: '0',
@@ -67,7 +91,8 @@ describe('INFO', () => {
globalTotal: 0,
indexCapacity: 128,
idnexTotal: 0
}
},
stopWords: undefined
}
);
}, GLOBAL.SERVERS.OPEN);