You say you have millions of short string so I assume you can't store it RAM and keep it in a database.
Let's assume you keep your "short strings" in table named my_string (id, string).
Create another table, let's name it my_substring (id, substring[unique]), containing every substring of every string in my_string.
Also create a joining table for two tables above: my_substring_to_string (id, substring_id, string_id), its contents is obvious I suppose.
Now searching is straightforward and fast: search for your substring in my_substring (remember to create an index on my_substring.substring) and join it with my_string via my_substring_to_string.
Adding and removing of a new short string will require an update in my_substring and my_substring_to_string but these are quite straightforward.
If this solution will produce my_substring table with unacceptably large size, it can be optimized. Instead of keeping every substring try to keep every suffix and search for 'substring%' with ilike.
For example if the word is 'blues', you have to store suffixes:
'blues', 'lues', 'ues', 'es', 's' (joined with 'blues'). Then search for 'lu' (ilike 'lu%') will match 'lues'. This way a database will still be ale to use an index created on my_substring.substring column, so searching still will be fast.