How to index small words (3 letters) with SQL Full-text search?
I have an Incident
table with one row that has the value 'out of office'
in the Description
column.
However the following query does not return that row.
SELECT * FROM Incident
W开发者_开发百科HERE CONTAINS( (Incident.Description), '"out*"' )
The word 'out' is not in the noise file (I cleared the noise file completely and I rebuilt the index).
Is it because SQL Full-text search does not index small words? Is there a setting for that? Is there a command that I can run to see exactly which noise file has been used to build the index?
Note: I'm on SQL 2005.
when you deal with the noise files, they are not considered until you restart the propper SQL Server FullText Search service for your instance.
I have tested your scenario doing the following and it works...
- Having the noise file with the value 'out' in it
- Insert records with value like '% out %' in them
- Executed your select statement and see that they are not returned
- Modify the word file and remove the 'out' entry
- Restarted the SQL Server FullText Search service for my instance
- Rebuild the full text catalog using "ALTER FULLTEXT CATALOG [NameOfMyCatalog] REBUILD"
- Wait a bit (give a chance to the full text service to do the job)
- Executed your select statement and see that they are now returned
Hope this helps...
If you haven't already, try rebuilding the index after clearing out the noise file, as mentioned in this answer which links to a helpful blog post.
精彩评论