PHRAS-483_SHA-UID_master

add index (not analysed) & search on fields "sha256" and "uuid"
e.g. : uuid:"4d006e01-bc38-4aac-9a5b-2c90ffe3a8a2"
e.g. : sha256:a7f3ec01c4c5efcadc639d494d432006f13b28b9a576afaee4d3b7508c4be074
This commit is contained in:
Jean-Yves Gaulier
2018-04-26 17:35:01 +02:00
parent 8a8577c59e
commit 3f785e7ba3
5 changed files with 26 additions and 2 deletions

View File

@@ -34,6 +34,8 @@ class NodeTypes
const TOKEN_RAW_STRING = 'raw_quoted';
const TOKEN_DATABASE = 'database';
const TOKEN_COLLECTION = 'collection';
const TOKEN_SHA256 = 'sha256';
const TOKEN_UUID = 'uuid';
const TOKEN_MEDIA_TYPE = 'type';
const TOKEN_RECORD_ID = 'id';
const TOKEN_CREATED_ON = 'created_on';

View File

@@ -346,6 +346,10 @@ class QueryVisitor implements Visit
return AST\KeyValue\NativeKey::database();
case NodeTypes::TOKEN_COLLECTION:
return AST\KeyValue\NativeKey::collection();
case NodeTypes::TOKEN_SHA256:
return AST\KeyValue\NativeKey::sha256();
case NodeTypes::TOKEN_UUID:
return AST\KeyValue\NativeKey::uuid();
case NodeTypes::TOKEN_MEDIA_TYPE:
return AST\KeyValue\NativeKey::mediaType();
case NodeTypes::TOKEN_RECORD_ID: