Text Search of items < minimum size not possible?
robotron2084 opened this issue · comments
I am unable to full text search for items that are less than the minimum size of 3. I cannot seem to find a setting that will allow me to change this value. For example if I have an item called 'Item 12' and I were to, say, search for '12' there is no method to do so. I have tried different variations of blocks and searches, including full text and 'contains'. What am I doing wrong?
Steps to Reproduce:
Insert something like the following into the db:
t.TextInsert("MyTable","Item 12", "Item 12");
Search for the value '12' either as a 'full match' or 'contains' search:
t.TextSearch("MyTable").BlockAnd("12", "")
or
t.TextSearch("MyTable").BlockAnd("", "12")
No results are returned. I don't need to add a 'contains' but I would like to add '12' as a full match somehow. How can I do this?
Thank you.
These limitation cares the system reasonable boundaries.
In two words, you can try to store item name as "Item12" and search of it.
I've had the similar thought about hacking around the issue by using another character. While I understand that the 'contains' functionality could be problematic, i do not see why shorter strings could not be part of an exact matches. I think it is reasonable to expect that the software should be able to match the exact token '12' or 'a'.
...should be able to match the exact token '12' or 'a'.
It is about creating and supporting index for the documents that have char 'a' inside. For each encountered char in each document must be supported an extra index (for each 1 and each encountered 2 symbols combination).
Though, if it so principal it id possible to recompile DBreeze, without this limitation.
For the cases like "M 005" "Item12" there is a sense either remove spaces, or replace them with another symbol.
Adding fiktiv prefixes or suffixes to bring minimal search length to 3.
I initially thought that removing spaces would cause problems, but since these specific strings are short i think it will work out. I've modified my code to strip spaces on these strings and written tests against them and it seems like it is working fine for now.
While I feel like it would be nice if I could add these shorter tokens to the exact match search, I understand if that is not possible. I am not a database developer so i trust in your judgement, and appreciate your help.