-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrediskeys.py
More file actions
62 lines (45 loc) · 1.43 KB
/
rediskeys.py
File metadata and controls
62 lines (45 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# document id counter
NEXT_DOC_ID='doc:next:id'
# set of all document ids
ALL_DOCS='doc:list'
# full document path and filename
DOC_FILENAME='doc:%s:filename'
# char length of the document
DOC_LENGTH='doc:%s:length'
# document title
DOC_TITLE='doc:%s:title'
# doc date
DOC_DATE='doc:%s:date'
DOC_NAME_BY_ID='doc:name:by:id:%s'
DOC_ID_BY_NAME='doc:id:by:name:%s'
DOC_RELATED_COUNT='doc:%s:relcnt:%s'
# sorted set with related object id and score
# for each document
DOC_RELATED='doc:%s:related:%s'
# key pattern for redis
PRE_SUBJECTS='triple:%s:subjects'
PRE_OBJECTS='triple:%s:objects'
# hash to retrive the id of pre -> obj
OBJ_ID='triple:%s:obj:%s:id'
# value of the pre -> obj
OBJECT_VALUE='triple:%s:obj:%s:value'
# id counter for objects
NEXT_OBJ_ID='triple:next:%s:object:id'
# counter: layout
LAYOUT_NEXT_EDGE_ID='layout:next:edge:id'
LAYOUT_NEXT_VERTICE_ID='layout:next:vertice:id'
# set: all current edge and vertice ids
LAYOUT_EDGES='layout:edges'
LAYOUT_VERTICES='layout:vertices'
LAYOUT_WIDTH='layout:width'
LAYOUT_HEIGHT='layout:height'
# string: postion
LAYOUT_EDGE_POS_X1='layout:edge:%s:pos:x1'
LAYOUT_EDGE_POS_X2='layout:edge:%s:pos:x2'
LAYOUT_EDGE_POS_Y1='layout:edge:%s:pos:y1'
LAYOUT_EDGE_POS_Y2='layout:edge:%s:pos:y2'
LAYOUT_VERTICE_POS_X='layout:vertice:%s:pos:x'
LAYOUT_VERTICE_POS_Y='layout:vertice:%s:pos:y'
# meta data
LAYOUT_VERTICE_LABEL='layout:vertice:%s:label'
LAYOUT_VERTICE_OBJ_ID='layout:vertice:%s:obj_id'