Skip to content

Commit bdfe509

Browse files
committed
Node API updated.
1 parent 00633bb commit bdfe509

709 files changed

Lines changed: 3663 additions & 2426 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

_data/node_api.yml

Lines changed: 69 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2793,13 +2793,35 @@ objects:
27932793
Search API is implemented by nodes acting as search engines in the Moera network.
27942794
requests:
27952795
- url: /search/nodes
2796-
type: GET
2796+
type: POST
27972797
function: searchNodes
2798+
in:
2799+
struct: SearchNodeFilter
2800+
name: filter
2801+
out:
2802+
struct: SearchNodePageInfo
2803+
auth: optional
2804+
description: >
2805+
Search for Moera nodes matching the search <code>query</code>. Every space-delimited word in the query must
2806+
match case-insensitively a beginning of the node's name or a beginning of any non-letter-delimited word in
2807+
the node's full name. The order of words is not significant.
2808+
<br><br>
2809+
The search engine may decide to return fewer nodes than the given <code>limit</code>.
2810+
<br><br>
2811+
The returned nodes are sorted by their relevance. The exact definition of this term is left to the search
2812+
engine's implementation.
2813+
- url: /search/nodes/suggestions
2814+
type: GET
2815+
function: searchNodeSuggestions
27982816
query:
27992817
- type: String
28002818
name: query
28012819
optional: true
28022820
description: the search query
2821+
- type: String
2822+
name: sheriff
2823+
optional: true
2824+
description: filter out entries prohibited by the given sheriff
28032825
- type: int
28042826
name: limit
28052827
optional: true
@@ -2809,9 +2831,10 @@ objects:
28092831
array: true
28102832
auth: optional
28112833
description: >
2812-
Search for Moera nodes matching the search <code>query</code>. Every space-delimited word in the query must
2813-
match case-insensitively a beginning of the node's name or a beginning of any non-letter-delimited word in
2814-
the node's full name. The order of words is not significant.
2834+
Search for Moera nodes matching the search <code>query</code> and return a short list of "smart suggestions"
2835+
for the user. Every space-delimited word in the query must match case-insensitively a beginning of the node's
2836+
name or a beginning of any non-letter-delimited word in the node's full name. The order of words is
2837+
not significant.
28152838
<br><br>
28162839
The search engine may decide to return fewer nodes than the given <code>limit</code>.
28172840
<br><br>
@@ -6850,6 +6873,10 @@ structures:
68506873
- struct: Body
68516874
name: bodyPreview
68526875
description: preview of the entry's body, a string representation of a JSON structure
6876+
- enum: BodyFormat
6877+
name: bodyFormat
6878+
optional: true
6879+
description: format of the entry's body, may have any value meaningful for the client
68536880
- type: String
68546881
name: heading
68556882
description: heading of the entry
@@ -6976,6 +7003,31 @@ structures:
69767003
array: true
69777004
name: entries
69787005
description: the entries
7006+
- name: SearchNodeFilter
7007+
fields:
7008+
- type: String
7009+
name: query
7010+
description: the search query
7011+
- type: String
7012+
name: sheriffName
7013+
optional: true
7014+
description: filter out nodes prohibited by the given sheriff
7015+
- type: int
7016+
name: page
7017+
optional: true
7018+
description: page number, 0 by default
7019+
constraints:
7020+
- value:
7021+
min: 0
7022+
error: page.invalid
7023+
- type: int
7024+
name: limit
7025+
optional: true
7026+
description: page size (maximum number of entries returned), the default is set by the search engine
7027+
constraints:
7028+
- value:
7029+
min: 0
7030+
error: limit.invalid
69797031
- name: SearchNodeInfo
69807032
fields:
69817033
- type: String
@@ -6995,6 +7047,18 @@ structures:
69957047
- type: float
69967048
name: distance
69977049
description: social distance between the node and the client
7050+
- name: SearchNodePageInfo
7051+
fields:
7052+
- type: int
7053+
name: page
7054+
description: number of the page
7055+
- type: int
7056+
name: total
7057+
description: total number of nodes found (this number may be approximate)
7058+
- struct: SearchNodeInfo
7059+
array: true
7060+
name: nodes
7061+
description: the nodes
69987062
- name: SearchPostingUpdate
69997063
fields:
70007064
- type: String
@@ -7196,7 +7260,7 @@ structures:
71967260
description: number of the page
71977261
- type: int
71987262
name: total
7199-
description: total number of pages
7263+
description: total number of entries found
72007264
- struct: SearchEntryInfo
72017265
array: true
72027266
name: entries

_data/py_node_api.yml

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3217,11 +3217,28 @@ objects:
32173217
The returned nodes are sorted by their relevance. The exact definition of this
32183218
term is left to the search engine''s implementation.
32193219
3220+
'
3221+
function: search_nodes(filter)
3222+
out:
3223+
struct: SearchNodePageInfo
3224+
params:
3225+
- name: filter
3226+
struct: SearchNodeFilter
3227+
- auth: optional
3228+
description: 'Search for Moera nodes matching the search <code>query</code> and
3229+
return a short list of "smart suggestions" for the user. Every space-delimited
3230+
word in the query must match case-insensitively a beginning of the node''s name
3231+
or a beginning of any non-letter-delimited word in the node''s full name. The
3232+
order of words is not significant. <br><br> The search engine may decide to
3233+
return fewer nodes than the given <code>limit</code>. <br><br> The returned
3234+
nodes are sorted by their relevance. The exact definition of this term is left
3235+
to the search engine''s implementation.
3236+
32203237
'
32213238
errors:
32223239
- code: limit.invalid
32233240
description: <code>limit</code> parameter has an invalid value
3224-
function: search_nodes(query=None, limit=None)
3241+
function: search_node_suggestions(query=None, sheriff=None, limit=None)
32253242
out:
32263243
array: true
32273244
struct: SearchNodeInfo
@@ -3230,6 +3247,10 @@ objects:
32303247
name: query
32313248
optional: true
32323249
type: str
3250+
- description: filter out entries prohibited by the given sheriff
3251+
name: sheriff
3252+
optional: true
3253+
type: str
32333254
- description: maximum number of nodes returned
32343255
name: limit
32353256
optional: true
@@ -7655,6 +7676,11 @@ structures:
76557676
- description: preview of the entry's body, a string representation of a JSON structure
76567677
name: body_preview
76577678
struct: Body
7679+
- description: format of the entry's body, may have any value meaningful for the
7680+
client
7681+
enum: BodyFormat
7682+
name: body_format
7683+
optional: true
76587684
- description: heading of the entry
76597685
name: heading
76607686
type: str
@@ -7791,6 +7817,32 @@ structures:
77917817
name: entries
77927818
struct: SearchEntryInfo
77937819
name: SearchHashtagSliceInfo
7820+
- fields:
7821+
- description: the search query
7822+
name: query
7823+
type: str
7824+
- description: filter out nodes prohibited by the given sheriff
7825+
name: sheriff_name
7826+
optional: true
7827+
type: str
7828+
- constraints:
7829+
- value:
7830+
error: page.invalid
7831+
min: 0
7832+
description: page number, 0 by default
7833+
name: page
7834+
optional: true
7835+
type: int
7836+
- constraints:
7837+
- value:
7838+
error: limit.invalid
7839+
min: 0
7840+
description: page size (maximum number of entries returned), the default is set
7841+
by the search engine
7842+
name: limit
7843+
optional: true
7844+
type: int
7845+
name: SearchNodeFilter
77947846
- fields:
77957847
- name: node_name
77967848
type: str
@@ -7810,6 +7862,18 @@ structures:
78107862
name: distance
78117863
type: float
78127864
name: SearchNodeInfo
7865+
- fields:
7866+
- description: number of the page
7867+
name: page
7868+
type: int
7869+
- description: total number of nodes found (this number may be approximate)
7870+
name: total
7871+
type: int
7872+
- array: true
7873+
description: the nodes
7874+
name: nodes
7875+
struct: SearchNodeInfo
7876+
name: SearchNodePageInfo
78137877
- fields:
78147878
- constraints:
78157879
- length:
@@ -8017,7 +8081,7 @@ structures:
80178081
- description: number of the page
80188082
name: page
80198083
type: int
8020-
- description: total number of pages
8084+
- description: total number of entries found
80218085
name: total
80228086
type: int
80238087
- array: true

_data/ts_node_api.yml

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3214,11 +3214,28 @@ objects:
32143214
The returned nodes are sorted by their relevance. The exact definition of this
32153215
term is left to the search engine''s implementation.
32163216
3217+
'
3218+
function: searchNodes(filter)
3219+
out:
3220+
struct: SearchNodePageInfo
3221+
params:
3222+
- name: filter
3223+
struct: SearchNodeFilter
3224+
- auth: optional
3225+
description: 'Search for Moera nodes matching the search <code>query</code> and
3226+
return a short list of "smart suggestions" for the user. Every space-delimited
3227+
word in the query must match case-insensitively a beginning of the node''s name
3228+
or a beginning of any non-letter-delimited word in the node''s full name. The
3229+
order of words is not significant. <br><br> The search engine may decide to
3230+
return fewer nodes than the given <code>limit</code>. <br><br> The returned
3231+
nodes are sorted by their relevance. The exact definition of this term is left
3232+
to the search engine''s implementation.
3233+
32173234
'
32183235
errors:
32193236
- code: limit.invalid
32203237
description: <code>limit</code> parameter has an invalid value
3221-
function: searchNodes(query=null, limit=null)
3238+
function: searchNodeSuggestions(query=null, sheriff=null, limit=null)
32223239
out:
32233240
array: true
32243241
struct: SearchNodeInfo
@@ -3227,6 +3244,10 @@ objects:
32273244
name: query
32283245
optional: true
32293246
type: string
3247+
- description: filter out entries prohibited by the given sheriff
3248+
name: sheriff
3249+
optional: true
3250+
type: string
32303251
- description: maximum number of nodes returned
32313252
name: limit
32323253
optional: true
@@ -7652,6 +7673,11 @@ structures:
76527673
- description: preview of the entry's body, a string representation of a JSON structure
76537674
name: bodyPreview
76547675
struct: Body
7676+
- description: format of the entry's body, may have any value meaningful for the
7677+
client
7678+
enum: BodyFormat
7679+
name: bodyFormat
7680+
optional: true
76557681
- description: heading of the entry
76567682
name: heading
76577683
type: string
@@ -7788,6 +7814,32 @@ structures:
77887814
name: entries
77897815
struct: SearchEntryInfo
77907816
name: SearchHashtagSliceInfo
7817+
- fields:
7818+
- description: the search query
7819+
name: query
7820+
type: string
7821+
- description: filter out nodes prohibited by the given sheriff
7822+
name: sheriffName
7823+
optional: true
7824+
type: string
7825+
- constraints:
7826+
- value:
7827+
error: page.invalid
7828+
min: 0
7829+
description: page number, 0 by default
7830+
name: page
7831+
optional: true
7832+
type: number
7833+
- constraints:
7834+
- value:
7835+
error: limit.invalid
7836+
min: 0
7837+
description: page size (maximum number of entries returned), the default is set
7838+
by the search engine
7839+
name: limit
7840+
optional: true
7841+
type: number
7842+
name: SearchNodeFilter
77917843
- fields:
77927844
- name: nodeName
77937845
type: string
@@ -7807,6 +7859,18 @@ structures:
78077859
name: distance
78087860
type: number
78097861
name: SearchNodeInfo
7862+
- fields:
7863+
- description: number of the page
7864+
name: page
7865+
type: number
7866+
- description: total number of nodes found (this number may be approximate)
7867+
name: total
7868+
type: number
7869+
- array: true
7870+
description: the nodes
7871+
name: nodes
7872+
struct: SearchNodeInfo
7873+
name: SearchNodePageInfo
78107874
- fields:
78117875
- constraints:
78127876
- length:
@@ -8014,7 +8078,7 @@ structures:
80148078
- description: number of the page
80158079
name: page
80168080
type: number
8017-
- description: total number of pages
8081+
- description: total number of entries found
80188082
name: total
80198083
type: number
80208084
- array: true

development/java-moeralib/javadoc/allclasses-index.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Tue May 13 03:25:59 IDT 2025 -->
5-
<title>All Classes and Interfaces (moeralib 0.16.6 API)</title>
4+
<!-- Generated by javadoc (17) on Thu May 22 02:02:25 IDT 2025 -->
5+
<title>All Classes and Interfaces (moeralib 0.16.8 API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
8-
<meta name="dc.created" content="2025-05-13">
8+
<meta name="dc.created" content="2025-05-22">
99
<meta name="description" content="class index">
1010
<meta name="generator" content="javadoc/AllClassesIndexWriter">
1111
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
@@ -779,7 +779,11 @@ <h1 title="All Classes and Interfaces" class="title">All Classes and Interfaces<
779779
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">&nbsp;</div>
780780
<div class="col-first odd-row-color all-classes-table all-classes-table-tab2"><a href="org/moera/lib/node/types/SearchHashtagSliceInfo.html" title="class in org.moera.lib.node.types">SearchHashtagSliceInfo</a></div>
781781
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2">&nbsp;</div>
782-
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="org/moera/lib/node/types/SearchNodeInfo.html" title="class in org.moera.lib.node.types">SearchNodeInfo</a></div>
782+
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="org/moera/lib/node/types/SearchNodeFilter.html" title="class in org.moera.lib.node.types">SearchNodeFilter</a></div>
783+
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">&nbsp;</div>
784+
<div class="col-first odd-row-color all-classes-table all-classes-table-tab2"><a href="org/moera/lib/node/types/SearchNodeInfo.html" title="class in org.moera.lib.node.types">SearchNodeInfo</a></div>
785+
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2">&nbsp;</div>
786+
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="org/moera/lib/node/types/SearchNodePageInfo.html" title="class in org.moera.lib.node.types">SearchNodePageInfo</a></div>
783787
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">&nbsp;</div>
784788
<div class="col-first odd-row-color all-classes-table all-classes-table-tab2"><a href="org/moera/lib/node/types/SearchPostingUpdate.html" title="class in org.moera.lib.node.types">SearchPostingUpdate</a></div>
785789
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2">&nbsp;</div>

development/java-moeralib/javadoc/allpackages-index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<!DOCTYPE HTML>
22
<html lang>
33
<head>
4-
<!-- Generated by javadoc (17) on Tue May 13 03:25:59 IDT 2025 -->
5-
<title>All Packages (moeralib 0.16.6 API)</title>
4+
<!-- Generated by javadoc (17) on Thu May 22 02:02:25 IDT 2025 -->
5+
<title>All Packages (moeralib 0.16.8 API)</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
8-
<meta name="dc.created" content="2025-05-13">
8+
<meta name="dc.created" content="2025-05-22">
99
<meta name="description" content="package index">
1010
<meta name="generator" content="javadoc/AllPackagesIndexWriter">
1111
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

0 commit comments

Comments
 (0)