-
Notifications
You must be signed in to change notification settings - Fork 0
/
scheme.d2
63 lines (49 loc) · 1.18 KB
/
scheme.d2
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
62
63
# Definitions
Database Structure {
Indexes Table {
shape:sql_table
Word:string {constraint: primary_key}
Pages:int set
}
Pages Table {
shape:sql_table
Id: int {constraint: primary_key}
Url: url
Rank: int
}
Indexes Table.Pages -> Pages Table.Id
}
db: {
label:Database PostgreSQL
shape:stored_data
}
User {
shape: person
}
Search Core {
Query Interpretation {
Security Check
Keywords Recognition
}
Indexing {
Shard 1 {
Indexing Process
}
Shard 2 {
Indexing Process
}
Shard 1 -> Result Merge
Shard 2 -> Result Merge
}
Query Interpretation -> Indexing
}
# Diagram
User -> Search Core.Query Interpretation
Search Core.Indexing.Shard 1.Indexing Process -> db: site set request
Search Core.Indexing.Shard 2.Indexing Process -> db: site set request
Search Core.Indexing.Result Merge -> User
Crawler {
Parse For Words -> Rank Page
}
Crawler.Rank Page -> db:Save URL
Crawler.Rank Page -> db:Add Words