Is it possible to search the word "FILL" saved in the SQLite database using the words "REFILL" or "FILLED"? Not just these words specifically but you get the idea of searching the root word using the same word but with prefixes or suffixes.

I might get misunderstood as wanting to use the LIKE operator/command. But what I need is somehow reverse of that. The case is that the root words (FILL) are the ones in my database and the words that I am going to use in the query are those with prefixes or suffixes (e.g REFILL, FILLED)

I cannot use those word-trimming API because it's not going to be done in English. A code for android/Sqlite would be great but the query command is already a great help. Thaanks.

  • 2
    What's wrong with the % wildcard (unless I've misunderstood)? LIKE '%FILL%'? Or regular expressions
    – Vérace
    Commented Aug 29, 2017 at 9:25
  • So, what you need is something like full-text indexing for SQLite?
    – RDFozz
    Commented Aug 29, 2017 at 14:23

1 Answer 1


What you're talking about is "stemming" where a word -- refill -- is related to its "root" or "stem" word -- fill. This is usually implemented through Full Text Search, which I believe SQLite supports, though I've never used it.

To implement this yourself in your own tables and code will be a complex task requiring a thorough understanding of the target language(s), how word-forms are constructed and how the grammar is defined, both theoretically and in practice.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.