Initial commit

This commit is contained in:
Gustavo Cordova Avila
2022-11-09 14:37:15 -08:00
commit e1423a70d5
11 changed files with 445 additions and 0 deletions

66
static/usage.txt Normal file
View File

@@ -0,0 +1,66 @@
Usage:
======
${app} ping
${app} push <collection> <bucket> <object> "data|@filename|-"
${app} pop <collection> <bucket> <object> "search data to pop"
${app} query <collection> <bucket> "search terms" [limit] [offset]
${app} suggest <collection> <bucket> "word" [limit]
${app} flush <collection> [ bucket [object] ]
Commands:
=========
ping - Verify server is connected, returns "PONG"
count - Return the count of indexed data, requires:
+ collection
+ bucket; optional
+ object; optional
push - Ingest search data into the server, requires:
+ collection
+ bucket
+ object
+ "quoted text on the command line"
-or-
"@filename.ext" where to read the text
-or-
"-" to read from stdin
pop - Pop data from the search indexes, requires:
+ collection
+ bucket
+ object
+ "quoted text on the command line"
query - Query the indexes for information, requires:
+ collection
+ bucket
+ "search terms"
+ limit, optional; default: 10
+ offset, optional; default: 0
Outputs the object IDs that match the given search terms
suggest - Request suggestions for a given word, requires:
+ collection
+ bucket
+ "word"
+ limit, optional; default: 10
Outputs the suggestions to stdout
flush - Flush all index data for the given collection, bucket or object
+ collection
+ bucket; optional
+ object; optional
Environment variables:
======================
These variables point to the Sonic service the application
will be connecting to:
+ SONIC_HOST: Hostname or ip address of the service
+ SONIC_PORT: Port that the service is listening on
+ SONIC_SECRET: Password required to connect to sonic