Ethan Deng's SharePoint Blog

About Me
SharePoint
Blog
List Pagination 1
List Pagination 2
Customize Home Page
Excel Services Issue
Error with mngfield Page
User Defined Function
Enable Incoming Email
Install SP2 On R2
SharePoint Content Migrat
SharePoint2010 Installati
Troubleshoot Search
Dash Sign And Search
Search Pattern Issue
Create Dropdown Menu
Email Enabled Custom List
Email Enabled Issue List
SharePoint Folder
Cost Effective Small Farm
SharePoint Throttling
SystemUpdate And Alerts
A Parallel Approach
Avoid Using Dash Sign In File Name and List Data For Better Search Result
 
 
"-" Dash or Minus or hyphen sign, whatever you call it will cause trouble in SharePoint search if you use it in file name or column data.
 
For example, if you have a convention to name your product name like "Hello-A1007.19" and you refere to the name in other word file, your query for
 
hello-a1007
a1007
a1007.19
 
will not return any result. The reason is that SharePoint index engine doesn't break this pattern correctly and the dash sign is a special character in query: It means "excluded" word.
 
So query for "hello-a1007" is actually means query for words "hello" and "1007".
 
Internally the index engine break the "Hello-A1007.19" as "Hello" and "1007.19". Your query must include these two words to get any result back.
 
To avoid this confusion in both the query and index engine, try to avoid using dash sign in any part of your data. Use underscore instead.
 
For example, name the file "Hello_A1007 19". (Replace dot with a white space too. The dot makes the number looks as a real number).
 
The other documents refer to the file as "Hello_A1007 19.doc" too. With this pattern, next queries will work
 
 
Hello_a1007
Hello_a1007 19
 
However "a1007" will not work, because the word is broken as "Hello_a1007" and "19".
 
Don't use pattern "Hello_A1007_19" if you don't expect end user will include the last part as part of the query. In this pattern the word is broken into as "Hello_A1007_19", so any other query for patial name like "Hello_Al007" will not return results.
 
If you expect end user will use query like "A1007", then the naming must use white spaces instead of other character to seperate the words. For example "Hello A1007 19". Any other character than white space will force the index engine to index it as one word without breaking it.
 
 
 
The prinicipal applies to the list data or metadata of documents too.