• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

FullText Search - SQL Server

And no, sadly a wildcard doesn't make any difference. Still nada.

Thanks for trying chaps. :happy

Edit : I just got this to work.

SELECT * FROM MyTable WHERE Contains(MyField,'Exactlymatchingstring')

This works. But

SELECT * FROM MyTable WHERE Contains(MyField,'Exactlymatchi')

does not work.
 
Last edited: 16:33
And no, sadly a wildcard doesn't make any difference. Still nada.

Thanks for trying chaps. :happy

Edit : I just got this to work.

SELECT * FROM MyTable WHERE Contains(MyField,'Exactlymatchingstring')

This works. But

SELECT * FROM MyTable WHERE Contains(MyField,'Exactlymatchi')

does not work.

Ahem.....

Yep, I think this is the key - "Attrn" is not recognised as a logical linguistic extension of "Att". I finally cheated and RTFM
 
Not getting it.

How is "Exactlymatchinstri' a word, but 'Exactlymatchingstring' isn't?

Because you either need a "*" wildcard or to include something extra like FORMSOF, INFLECTIONAL and / or FREETEXT rather than just CONTAINS.
 
And no, sadly a wildcard doesn't make any difference. Still nada.

Thanks for trying chaps. :happy

Edit : I just got this to work.

SELECT * FROM MyTable WHERE Contains(MyField,'Exactlymatchingstring')

This works. But

SELECT * FROM MyTable WHERE Contains(MyField,'Exactlymatchi')

does not work.

Worth as much as you have paid for it.

I trust this is for some hobby project and no one is paying for your SQL Server "expertise" :D
 
Not getting it.

How is "Exactlymatchinstri' a word, but 'Exactlymatchingstring' isn't?

That's the opposite of what you said :confused:

What's syntax are you using for your wildcard match?


And no, sadly a wildcard doesn't make any difference. Still nada.

Thanks for trying chaps. :happy

Edit : I just got this to work.

SELECT * FROM MyTable WHERE Contains(MyField,'Exactlymatchingstring')

This works. But

SELECT * FROM MyTable WHERE Contains(MyField,'Exactlymatchi')

does not work.
 
I've not touched fts for years, but it is basically looking for words, without wildcards it works off the stems of whole words, so "story" or "stories" are the same, as are tenses such as "going" and "gone". This used to show up in Sharepoint, where searches for, say, product IDs unless fully qualified failed miserably.
 
Last edited: 00:01
It's to do with stemming.

Grab a coffee and have a read through this:
https://blogs.msdn.microsoft.com/sq...tionality-in-full-text-search-using-contains/

I've not touched fts for years, but it is basically looking for words, without wildcards it works off the stems of whole words, so "story" or "stories" are the same, as are tenses such as "going" and "gone". This used to show up in Sharepoint, where searches for, say, product IDs unless fully qualified failed miserably.

If he reads the blog post that I linked to, rather than waiting to be spoonfed the answer, he'd know that by now. :)
 
If he reads the blog post that I linked to, rather than waiting to be spoonfed the answer, he'd know that by now. :)

Yes but the wildcard doesn't work. I'm sure I mentioned this before. :D
 

Advertisers

Back
Top