SQLITE fts5 syntax error when clearing search field #329
-
|
I am beginning the implementation of the fts5 full text search and it appears that the search is working, except when I clear the text field. When I do that, I get two purple errors, both the same. The first is in the updateQuery function where I await the $seaerchResults.load and the second is in the Sharing module in the loadError in the DEBUG if !isTesting , let newValue clause Any idea s to what might be causing this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi @StewartLynch, it would be best if you can share the query you are constructing, as well as the search text that is entered when this error occurs. Most likely this is due to the search text fed to an FTS5 function being invalid FTS syntax. We don't currently provide a builder for FTS and so it's very easy to provide text that is invalid syntax. We discuss this in episode 339 at 7:13 (direct link). The fix is to just do a light amount of escaping of the search text to make it valid FTS syntax, and some day in the future we may provide a better builder for FTS5. |
Beta Was this translation helpful? Give feedback.
Hi @StewartLynch, it would be best if you can share the query you are constructing, as well as the search text that is entered when this error occurs.
Most likely this is due to the search text fed to an FTS5 function being invalid FTS syntax. We don't currently provide a builder for FTS and so it's very easy to provide text that is invalid syntax. We discuss this in episode 339 at 7:13 (direct link). The fix is to just do a light amount of escaping of the search text to make it valid FTS syntax, and some day in the future we may provide a better builder for FTS5.