da92a19b54c930dc61a8102277bd8623d46c9491 — Thomas Sileo 3 years ago c2eef04
Update the README
2 files changed, 11 insertions(+), 3 deletions(-)

M app.lua
M README.md => README.md +10 -2
@@ 50,9 50,17 @@ TODO document custom domain support

_BlobPad_ supports full-text searching with a custom query language:

Sample queries:
### Query language

 - `+query`/`-query`: will match a note only if it matches/does not matches the query term
 - `"query"`: will match the query term exactly/requires an exact match (even in the middle of word)
 - `query`: the query term will be stemmed and matched with the note "text index"

### Sample queries

 - `+apple -orange`: returns notes containing `apple` **and** does not contain `orange`
 - `apple`: will match notes containing `apple` and `apples`
 - `apple orange`: will match notes containg  `apple(s)` **or** `orange(s)`
 - `"apple"`: will match only `apple` (i.e. not `apples`), and will also match `pineapple`
 - `apple orange`: will match notes containg  `apple(s)` **or** `orange(s)`
 - `apple orange -"pineapple"`:  will match notes containing  `apple(s)` **or** `orange(s)`; **and** that does not contains `pineapple`
 - `"multiple words"`: will match notes containing exactly `multiple words`

M app.lua => app.lua +1 -1
@@ 64,7 64,7 @@ router:get('/', function(params)
  -- most recently updated first
  local sort_index = '-_updated'

  if qs == "" then
  if qs == '' then
    local docs, pointers, _, _ = col:query('', 50, function(doc) return doc.pinned end, sort_index)
    for _, d in ipairs(docs) do
      _expand_note(d, pointers, 800, true)