DO free text search with SQL server returns unexpected results : a search for 1-1BL6-3006 returns way too much entities, that does not have this string in their full text indexed column. I suppose this is because '-' is interpreted as a special character. Besides Sql profiler shows that the query executed uses FREETEXTTABLE and not CONTAINSTABLE. In my case :
returns 154 results.
returns 3 results. (correct) Can you :
This would also allow me to fix this question : Full text search with * |
Currently DO supports only FREETEXTTABLE-based queries, i.e. it's impossible to make it executing a similar query with CONTAINSTABLE instead (the link you gave explains this). On the other hand, the problem you face occurs because stemmer splits the string you pass and performs search of its parts. On the other hand, it's pretty easy to disable stemming for the whole passed string - manual says, "If freetext_string is enclosed in double quotation marks, a phrase match is instead performed; stemming and thesaurus are not performed." Although I'm not sure if this will work on PostgreSQL as well (likely, won't). Actually, that's why we decided to initially add support only for You're right : enclosing the searched terms for with double quotes force a search with exact match. I understand : the support of the more complex sql server COTNAINSTABLE would require an abstraction layer to be able to use the query on another database software (postgres, ...). And possibly a custom implementation for db that does not support full text search and in memory storage. Is this planned? And with what priority? We would be interested by simple full text language support (search with "" or *) for sql server and maybe for in memory provider.
Until now no one requested this, so we don't have near-time plans related to this feature, neither a precise vision of possible API. I'll create an issue for this - let's try to define the features you need more precisely and see when this can be done. |