Safe Haskell | None |
---|---|
Language | Haskell98 |
"High-level" commands that are accepted by the (JSON) API.
These commands are translated with toBasicCommand
to BasicCommand
s which can be interpreted.
- data Command
- = Search { }
- | Completion {
- icPrefixCR :: Query
- icMaxCR :: Int
- | Select { }
- | Insert {
- icDoc :: ApiDocument
- | Update {
- icDoc :: ApiDocument
- | Delete { }
- | DeleteByQuery { }
- | InsertContext { }
- | DeleteContext { }
- | LoadIx { }
- | StoreIx { }
- | Status { }
- | Sequence { }
- | NOOP
- data StatusCmd
- data CmdResult
- = ResOK
- | ResSearch { }
- | ResCompletion { }
- | ResSuggestion { }
- | ResGeneric { }
- data CmdError = ResError {}
- newtype CmdRes a = CmdRes {
- unCmdRes :: a
- toBasicCommand :: Command -> BasicCommand
Documentation
The "high-level" commands accepted by the Interpreter
/ JSON API.
These are translated to BasicCommand
s.
Search | Search query with pagination. |
Completion | Auto-completion query with a limit. |
| |
Select | Raw query without any ranking, scoring and ordering |
Insert | Insert a document. |
| |
Update | Update a documents' description. |
| |
Delete | Delete a documents by |
DeleteByQuery | Delete all documents of the query result. |
InsertContext | Insert a context and the associated schema. |
DeleteContext | Delete a context. |
LoadIx | Deserialize the index. |
StoreIx | Serialize the index. |
Status | Query general information about the server/index. |
Sequence | Sequence commands. |
NOOP | No operation. Can be used in control flow and as an alive test. |
Available status commands.
StatusGC | Garbage collection statistics. |
StatusDocTable | Document table JSON dump. |
StatusIndex | Index JSON dump. |
StatusContext Context | Index context dump |
The result of an interpreted command.
ResOK | The command was processed successfully. |
ResSearch | The search results. |
ResCompletion | The auto-completion results. |
ResSuggestion | The simplified completion result |
ResGeneric | A generic JSON result. |
An error during processing of the command. This includes a error code and a message.
auxiliary type for parsing JSON CmdResult's of various kinds
usefull in hunt applications, not used within the hunt server