SearchBox/SearchBox-CLI/EmbeddedFiles/Help.txt

35 lines
1.9 KiB
Plaintext

SearchBox
---------
A standalone full-text search engine. Operates on plain text sources.
Usage:
./SearchBox.exe {mode} [options]
Modes:
query Query a pre-existing inverted search index
context Generate a context string similar to a search result on the internet
index Generate a raw index of the source document.
add Add a named document to a search index.
remove Remove a named document from a search index.
update Update a named document in a search index.
Options:
--batch Enters a mode where the operations to process are specified the source (by default stdin; change with --source as usual) - one per line in the format "{filename}|{name}|{tags}" {add}
--format Sets the format of the output. Possible values: text (defaul json, html (context generation only) {query, index, context}
--index Specifies the location of the search index to use {add, remo update}
--name, -n Sets the name of the source document {add, remove, title}
--new-source Specifies the path to the new version of the source document update {update}
--limit Limits the number of results returned, -1 = no limit {query}
--offset Skips the specified number of results from the beginning of results list {query}
--old-source Specifies the path to the old version of the source document update {update}
--query Specifies the query string - set to "-" to use the first line of stdin instead {query, context}
--source, -s Specifies the path to the source document {index, add,context}
--tags Sets the tags to associate with the document. {add, update}
Examples:
Add a file to an index:
./SearchBox.exe add --name "Complex Knots: How do and undo them" <books/complex_knots.txt
Add multiple files to an index in batch mode:
time find sources/ -type f -print0 | xargs -0 -n1 -I{} sh -c 'echo {}\|$(basename -s .md "{}")\|' | ./lib/SearchBox/SearchBox-CLI.exe add --batch --index data/posts.sindex