@@ -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
0 commit comments