Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 12963

Stop Words Blocking Results

$
0
0

I've been developing code to convert a Google-style search query to a full-text-search query. For example, it would conver "red car" to "(FORMSOF(INFLECTIONAL, red) AND FORMSOF(INFLECTIONAL, car))". This seems to work okay.

However, if the query is "stop a truck", it is converted to "(FORMSOF(INFLECTIONAL, stop) AND FORMSOF(INFLECTIONAL, a) AND FORMSOF(INFLECTIONAL, truck))". This will return zero results no matter how many times those three words appear in the indexed text. The reason is that "a" is a stop word.

It seems like there should be an option to have SQL Server return true for a term that will never be searched because it's a stop word. Otherwise, I can incorrectly get zero results. I realize my code could filter out the word "a" but the list of words needs to be complete and the code needs to work if I change or update the database.

How are others here handling FTS queries that contain stop words?


Jonathan Wood • Black Belt Coder

Viewing all articles
Browse latest Browse all 12963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>