character in SQLite FTS3 queries?
I'm using Python and SQLAlchemy to query a SQLite FTS3 (full-text) store and I would like to prevent my users from using the - as an operator. How should I escape the - so users can search for a term containing the - (enabled by changing the default tokenizer) instead of it signifying "does not contain the term following the -"?
From elsewhere on the internet it seems it may be possible to surround each search term with double quotes "some-term". Since we do not need the subtraction operation, my solution was to replace hyphens -
with underscores _
when populating the search index and when performing searches.
From this documentation it seems that it is not really possible. Try to replace your -
with whitespace before searching…
上一篇: 普通的SQLite vs FTS3表
下一篇: SQLite FTS3查询中的字符?