This guide covers the full-text search query syntax supported by ergs. All queries use SQLite's FTS5 syntax, which provides powerful search capabilities across your indexed data.
golang
rust
"gas station"
golang project
python web framework
fuel price data
Ergs stores data in several searchable columns:
text- The main searchable contentsource- The datasource instance name (e.g., "github-work", "firefox-home")datasource- The datasource type (e.g., "github", "firefox", "gasstations")metadata- Structured metadata as JSONhostname- The hostname where the data was collected (e.g., "workstation", "server01")
datasource:github
datasource:gasstations
datasource:firefox
source:github-work
text:golang
metadata:important
hostname:workstation
"datasource":github
"text":"hello world"
"source":"github-work"
"hostname":"workstation"
golang AND rust
datasource:github AND text:project
python AND (web OR api)
python OR golang
datasource:github OR datasource:codeberg
(rust OR golang) AND project
golang NOT deprecated
datasource:github NOT archived
project NOT (test OR demo)
Use + to require specific terms to be present:
one + two + three
golang + project + active
Use - to exclude terms:
golang - deprecated
project - archived - demo
ā These don't work as expected:
datasource:github + golang
"datasource":github + one + two
text:one + text:two
ā Use these alternatives instead:
datasource:github AND golang
datasource:github golang
datasource:github AND (one + two)
text:one AND text:two
"gas station"
"golang web framework"
"open source project"
text:"hello world"
datasource:"gasstations"
source:"github-work"
Find terms within a certain distance of each other:
golang NEAR rust
price NEAR fuel
golang NEAR/5 project
fuel NEAR/3 price
prog*
fuel*
git*
text:prog*
datasource:git*
(golang OR rust) AND project
datasource:(github OR codeberg)
text:(fuel OR gas) AND price
(datasource:github OR datasource:codeberg) AND (golang OR rust)
text:(price OR cost) AND datasource:gasstations
(source:github-work OR source:github-personal) AND active
datasource:github
datasource:github AND golang
datasource:github AND text:project
datasource:gasstations
datasource:gasstations AND text:diesel
datasource:gasstations AND (fuel OR gas OR diesel)
datasource:firefox
datasource:firefox AND github
text:documentation AND datasource:firefox
hostname:workstation
hostname:server01
hostname:laptop AND datasource:github
(datasource:github OR datasource:codeberg) AND rust
golang NOT datasource:firefox
project AND (datasource:github OR datasource:codeberg)
hostname:workstation OR hostname:server01
datasource:github AND hostname:workstation
hostname:laptop AND NOT hostname:server01
datasource:github AND text:"open source" AND rust
(datasource:gasstations AND diesel) OR (datasource:github AND fuel)
text:(price OR cost) AND NOT (test OR demo)
hostname:workstation AND datasource:github AND rust
(hostname:server01 OR hostname:server02) AND datasource:gasstations
FTS5 searches are case-insensitive by default:
GOLANG = golang = GoLang
Text is tokenized by words, punctuation is generally ignored:
"hello-world" matches "hello world"
"api.github.com" matches "api github com"
Empty queries return recent results:
# No query = show recent items
-
Use column filters when possible to narrow search scope:
datasource:github golang # Better golang # Broader search -
Phrase queries are more precise:
"exact phrase" # More precise exact phrase # Matches "exact" AND "phrase" anywhere -
Wildcard queries can be slower:
prog* # Can be slow program # Faster
If a query has syntax errors, it will be treated as a literal string search. Most malformed FTS5 queries will still return results, just not with the intended logic.
- Unmatched quotes:
"unclosed quote - Unmatched parentheses:
(unclosed group - Invalid operators:
term === value
These will typically be searched as literal text rather than causing errors.