2022-05-02 18:55:15 +03:00
|
|
|
# find api
|
|
|
|
|
2024-07-10 17:46:18 +03:00
|
|
|
``` unison
|
2022-05-02 18:55:15 +03:00
|
|
|
rachel.filesystem.x = 42
|
|
|
|
ross.httpClient.y = 43
|
|
|
|
joey.httpServer.z = 44
|
|
|
|
joey.yaml.zz = 45
|
|
|
|
```
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2022-05-02 18:55:15 +03:00
|
|
|
|
2023-12-22 14:55:24 +03:00
|
|
|
Loading changes detected in scratch.u.
|
|
|
|
|
2022-05-02 18:55:15 +03:00
|
|
|
I found and typechecked these definitions in scratch.u. If you
|
|
|
|
do an `add` or `update`, here's how your codebase would
|
|
|
|
change:
|
|
|
|
|
|
|
|
⍟ These new definitions are ok to `add`:
|
|
|
|
|
|
|
|
joey.httpServer.z : ##Nat
|
|
|
|
joey.yaml.zz : ##Nat
|
|
|
|
rachel.filesystem.x : ##Nat
|
|
|
|
ross.httpClient.y : ##Nat
|
|
|
|
|
|
|
|
```
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> add
|
2022-05-02 18:55:15 +03:00
|
|
|
|
|
|
|
⍟ I've added these definitions:
|
|
|
|
|
|
|
|
joey.httpServer.z : ##Nat
|
|
|
|
joey.yaml.zz : ##Nat
|
|
|
|
rachel.filesystem.x : ##Nat
|
|
|
|
ross.httpClient.y : ##Nat
|
|
|
|
|
|
|
|
```
|
2024-07-10 19:17:15 +03:00
|
|
|
``` api
|
2022-05-02 18:55:15 +03:00
|
|
|
-- Namespace segment prefix search
|
2024-06-26 22:42:58 +03:00
|
|
|
GET /api/projects/scratch/branches/main/find?query=http
|
2022-05-02 18:55:15 +03:00
|
|
|
[
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"result": {
|
|
|
|
"segments": [
|
|
|
|
{
|
2024-06-26 22:42:58 +03:00
|
|
|
"contents": "ross.",
|
2022-05-02 18:55:15 +03:00
|
|
|
"tag": "Gap"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"contents": "http",
|
|
|
|
"tag": "Match"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"contents": "Client.y",
|
|
|
|
"tag": "Gap"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2024-06-26 22:42:58 +03:00
|
|
|
"score": 156
|
2022-05-02 18:55:15 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"contents": {
|
|
|
|
"bestFoundTermName": "y",
|
|
|
|
"namedTerm": {
|
2022-09-12 19:47:23 +03:00
|
|
|
"termHash": "#emomp74i93h6ps0b5sukke0tci0ooba3f9jk21qm919a7act9u7asani84c0mqbdk4lcjrdvr9olpedp23p6df78r4trqlg0cciadc8",
|
2024-06-26 22:42:58 +03:00
|
|
|
"termName": "ross.httpClient.y",
|
2022-09-19 19:31:34 +03:00
|
|
|
"termTag": "Plain",
|
2022-05-02 18:55:15 +03:00
|
|
|
"termType": [
|
|
|
|
{
|
|
|
|
"annotation": {
|
|
|
|
"contents": "##Nat",
|
|
|
|
"tag": "HashQualifier"
|
|
|
|
},
|
|
|
|
"segment": "##Nat"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"tag": "FoundTermResult"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"result": {
|
|
|
|
"segments": [
|
|
|
|
{
|
2024-06-26 22:42:58 +03:00
|
|
|
"contents": "joey.",
|
2022-05-02 18:55:15 +03:00
|
|
|
"tag": "Gap"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"contents": "http",
|
|
|
|
"tag": "Match"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"contents": "Server.z",
|
|
|
|
"tag": "Gap"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2024-06-26 22:42:58 +03:00
|
|
|
"score": 156
|
2022-05-02 18:55:15 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"contents": {
|
|
|
|
"bestFoundTermName": "z",
|
|
|
|
"namedTerm": {
|
2022-09-12 19:47:23 +03:00
|
|
|
"termHash": "#a84tg4er4kfl9k2p250vp2o1dsp5kmn9a7q8g2bo723qbtbf9sagrl28fa4q0j5f2cv4alsjik6rf487ss646qt95gbm3dd13k7e1fo",
|
2024-06-26 22:42:58 +03:00
|
|
|
"termName": "joey.httpServer.z",
|
2022-09-19 19:31:34 +03:00
|
|
|
"termTag": "Plain",
|
2022-05-02 18:55:15 +03:00
|
|
|
"termType": [
|
|
|
|
{
|
|
|
|
"annotation": {
|
|
|
|
"contents": "##Nat",
|
|
|
|
"tag": "HashQualifier"
|
|
|
|
},
|
|
|
|
"segment": "##Nat"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"tag": "FoundTermResult"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
-- Namespace segment suffix search
|
2024-06-26 22:42:58 +03:00
|
|
|
GET /api/projects/scratch/branches/main/find?query=Server
|
2022-05-02 18:55:15 +03:00
|
|
|
[
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"result": {
|
|
|
|
"segments": [
|
|
|
|
{
|
2024-06-26 22:42:58 +03:00
|
|
|
"contents": "joey.http",
|
2022-05-02 18:55:15 +03:00
|
|
|
"tag": "Gap"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"contents": "Server",
|
|
|
|
"tag": "Match"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"contents": ".z",
|
|
|
|
"tag": "Gap"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2024-06-26 22:42:58 +03:00
|
|
|
"score": 223
|
2022-05-02 18:55:15 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"contents": {
|
|
|
|
"bestFoundTermName": "z",
|
|
|
|
"namedTerm": {
|
2022-09-12 19:47:23 +03:00
|
|
|
"termHash": "#a84tg4er4kfl9k2p250vp2o1dsp5kmn9a7q8g2bo723qbtbf9sagrl28fa4q0j5f2cv4alsjik6rf487ss646qt95gbm3dd13k7e1fo",
|
2024-06-26 22:42:58 +03:00
|
|
|
"termName": "joey.httpServer.z",
|
2022-09-19 19:31:34 +03:00
|
|
|
"termTag": "Plain",
|
2022-05-02 18:55:15 +03:00
|
|
|
"termType": [
|
|
|
|
{
|
|
|
|
"annotation": {
|
|
|
|
"contents": "##Nat",
|
|
|
|
"tag": "HashQualifier"
|
|
|
|
},
|
|
|
|
"segment": "##Nat"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"tag": "FoundTermResult"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
-- Substring search
|
2024-06-26 22:42:58 +03:00
|
|
|
GET /api/projects/scratch/branches/main/find?query=lesys
|
2022-05-02 18:55:15 +03:00
|
|
|
[
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"result": {
|
|
|
|
"segments": [
|
|
|
|
{
|
2024-06-26 22:42:58 +03:00
|
|
|
"contents": "rachel.fi",
|
2022-05-02 18:55:15 +03:00
|
|
|
"tag": "Gap"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"contents": "lesys",
|
|
|
|
"tag": "Match"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"contents": "tem.x",
|
|
|
|
"tag": "Gap"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2024-06-26 22:42:58 +03:00
|
|
|
"score": 175
|
2022-05-02 18:55:15 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"contents": {
|
|
|
|
"bestFoundTermName": "x",
|
|
|
|
"namedTerm": {
|
2022-09-12 19:47:23 +03:00
|
|
|
"termHash": "#qkhkl0n238s1eqibd1ecb8605sqj1m4hpoaag177cu572otqlaf1u28c8suuuqgljdtthsjtr07rv04np05o6oa27ml9105k7uas0t8",
|
2024-06-26 22:42:58 +03:00
|
|
|
"termName": "rachel.filesystem.x",
|
2022-09-19 19:31:34 +03:00
|
|
|
"termTag": "Plain",
|
2022-05-02 18:55:15 +03:00
|
|
|
"termType": [
|
|
|
|
{
|
|
|
|
"annotation": {
|
|
|
|
"contents": "##Nat",
|
|
|
|
"tag": "HashQualifier"
|
|
|
|
},
|
|
|
|
"segment": "##Nat"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"tag": "FoundTermResult"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
-- Cross-segment search
|
2024-06-26 22:42:58 +03:00
|
|
|
GET /api/projects/scratch/branches/main/find?query=joey.http
|
2022-05-02 18:55:15 +03:00
|
|
|
[
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"result": {
|
|
|
|
"segments": [
|
|
|
|
{
|
|
|
|
"contents": "joey.http",
|
|
|
|
"tag": "Match"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"contents": "Server.z",
|
|
|
|
"tag": "Gap"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2024-06-26 22:42:58 +03:00
|
|
|
"score": 300
|
2022-05-02 18:55:15 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"contents": {
|
|
|
|
"bestFoundTermName": "z",
|
|
|
|
"namedTerm": {
|
2022-09-12 19:47:23 +03:00
|
|
|
"termHash": "#a84tg4er4kfl9k2p250vp2o1dsp5kmn9a7q8g2bo723qbtbf9sagrl28fa4q0j5f2cv4alsjik6rf487ss646qt95gbm3dd13k7e1fo",
|
2024-06-26 22:42:58 +03:00
|
|
|
"termName": "joey.httpServer.z",
|
2022-09-19 19:31:34 +03:00
|
|
|
"termTag": "Plain",
|
2022-05-02 18:55:15 +03:00
|
|
|
"termType": [
|
|
|
|
{
|
|
|
|
"annotation": {
|
|
|
|
"contents": "##Nat",
|
|
|
|
"tag": "HashQualifier"
|
|
|
|
},
|
|
|
|
"segment": "##Nat"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"tag": "FoundTermResult"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
]
|
2024-07-10 22:15:33 +03:00
|
|
|
```
|
|
|
|
|