Skip to content

Commit

Permalink
proposed new search lexicons
Browse files Browse the repository at this point in the history
  • Loading branch information
bnewbold committed Sep 13, 2023
1 parent 0533fab commit db826ff
Show file tree
Hide file tree
Showing 5 changed files with 150 additions and 5 deletions.
9 changes: 6 additions & 3 deletions lexicons/app/bsky/actor/searchActors.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@
"defs": {
"main": {
"type": "query",
"description": "Find actors matching search criteria.",
"description": "Find actors (profiles) matching search criteria.",
"parameters": {
"type": "params",
"properties": {
"term": { "type": "string" },
"term": {
"type":"string",
"description": "search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 50
"default": 25
},
"cursor": { "type": "string" }
}
Expand Down
7 changes: 5 additions & 2 deletions lexicons/app/bsky/actor/searchActorsTypeahead.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@
"parameters": {
"type": "params",
"properties": {
"term": { "type": "string" },
"term": {
"type": "string",
"description": "search query prefix; not a full query string"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 50
"default": 10
}
}
},
Expand Down
43 changes: 43 additions & 0 deletions lexicons/app/bsky/feed/searchPosts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"lexicon": 1,
"id": "app.bsky.feed.searchPosts",
"defs": {
"main": {
"type": "query",
"description": "Find posts matching search criteria",
"parameters": {
"type": "params",
"required": ["q"],
"properties": {
"q": { "type": "string", "description": "search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended" },
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 25
},
"cursor": { "type": "string", "description": "optional pagination mechanism; may not necessarily allow scrolling through entire result set" }
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["posts"],
"properties": {
"cursor": { "type": "string" },
"hits_total": { "type": "integer", "description": "count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits" },
"posts": {
"type": "array",
"items": {
"type": "ref",
"ref": "app.bsky.feed.defs#postView"
}
}
}
}
},
"errors": [{ "name": "BadQueryString" }]
}
}
}
53 changes: 53 additions & 0 deletions lexicons/app/bsky/unspecced/searchActorsSkeleton.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"lexicon": 1,
"id": "app.bsky.unspecced.searchActorsSkeleton",
"defs": {
"main": {
"type": "query",
"description": "Backend Actors (profile) search, returning only skeleton",
"parameters": {
"type": "params",
"required": ["q"],
"properties": {
"q": {
"type": "string",
"description": "search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended. For typeahead search, only simple term match is supported, not full syntax"
},
"typeahead": {
"type": "boolean",
"description": "if true, acts as fast/simple 'typeahead' query"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 25
},
"cursor": {
"type": "string",
"description": "optional pagination mechanism; may not necessarily allow scrolling through entire result set"
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["actors"],
"properties": {
"cursor": { "type": "string" },
"hits_total": { "type": "integer", "description": "count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits" },
"posts": {
"type": "array",
"items": {
"type": "string",
"format": "did"
}
}
}
}
},
"errors": [{ "name": "BadQueryString" }]
}
}
}
43 changes: 43 additions & 0 deletions lexicons/app/bsky/unspecced/searchPostsSkeleton.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"lexicon": 1,
"id": "app.bsky.unspecced.searchPostsSkeleton",
"defs": {
"main": {
"type": "query",
"description": "Backend Posts search, returning only skeleton",
"parameters": {
"type": "params",
"required": ["q"],
"properties": {
"q": { "type": "string", "description": "search query string; syntax, phrase, boolean, and faceting is unspecified, but Lucene query syntax is recommended" },
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 25
},
"cursor": { "type": "string", "description": "optional pagination mechanism; may not necessarily allow scrolling through entire result set" }
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["posts"],
"properties": {
"cursor": { "type": "string" },
"hits_total": { "type": "integer", "description": "count of search hits. optional, may be rounded/truncated, and may not be possible to paginate through all hits" },
"posts": {
"type": "array",
"items": {
"type": "string",
"format": "at-uri"
}
}
}
}
},
"errors": [{ "name": "BadQueryString" }]
}
}
}

0 comments on commit db826ff

Please sign in to comment.