Search "PATH starts with ..." with the LIKE predicate is truncated by 64 characters
-
Friday, July 31, 2009 8:43 AMHi
The environment is:
- Microsoft Search Server Express 2008, but I tried also with Mircrosoft Office SharePoint Server 2007
- File Share Content Source to file://myserver/c$/temp
I have a webpart which executes a search by using the FullTextSqlQuery class. I would like to search only items that are located in a specific subfolder or in all childs of this subfolder. I try this by using the LIKE predicate. But it seems, that SharePoint truncates the Managed Property and also the searched value to 64 characters.
So if I have the following two files:
file://myserver/c$/temp/my first subfolder/the second subfolder/2008/my first test file.docx
file://myserver/c$/temp/my first subfolder/the second subfolder/2009/my second test file.docx
note that this are 64 characters: file://myserver/c$/temp/my first subfolder/the second subfolder/
Now I have a where clause like this:
WHERE Path LIKE 'file://myserver/c$/temp/my first subfolder/the second subfolder/2009 %'
This query returns both files also the file in the subfolder 2008! Also the following query returns both files:
WHERE Path LIKE 'file://myserver/c$/temp/my first subfolder/the second subfolder/2xy 009%'
Only if I put the 'xy' in the first 64 characters, then the query returns no results:
WHERE Path LIKE 'file://myserver/c$/temp/my first subfolder/the second subxy folder/2009%'
The same was with an equal clause before I installed WSS and MOSS SP2:
WHERE Path = 'file://myserver/c$/temp/my first subfolder/the second subfolder/2009/my second test file.docx '
This returned both files! But after I installed WSS and MOSS SP2 this behaviour changed. Now the query above returns only the correct one file.
But the clause with the LIKE predicate still compares only the first 64 characters.
Obviously I'm not the only one who has this problem. Here are some other links:
http://blogs.msdn.com/sharepoint/archive/2006/10/25/microsoft-office-sharepoint-server-2007-search-can-support-up-to-50-million-documents-in-a-single-index.aspx#8079390
http://social.technet.microsoft.com/forums/en-US/sharepointsearch/thread/322d882b-20d2-4065-ba64-c7bafc4ac1c0/
http://social.technet.microsoft.com/Forums/en-US/sharepointsearch/thread/303c5b8d-1ce3-4d9d-a929-72cd1fad9749
Is there a Hotfix for this issue which is not included in the SP2?
Ah after installing SP2 I reset the crawl content of course and recrawled.
I also tried to install the following hotfix (before SP2) without luck: http://support.microsoft.com/kb/952294
Regards Marc
- Moved by Mike Walsh FINMicrosoft Community Contributor, Moderator Saturday, August 01, 2009 6:38 AM off-topic - MSSX (From:SharePoint - Search)
All Replies
-
Saturday, August 01, 2009 3:46 AM
Yes this is a known limitation. You should avoid using the LIKE predicate in FullTextSQL and use the CONTAINS predicate. It works very well with the Path managed property. In you case just do CONTAINS(Path,'http://servername/sitename/listname/folder').
certdev.com- Proposed As Answer by kumarchandan Monday, August 03, 2009 5:15 AM
-
Saturday, August 01, 2009 6:38 AMModerator
> The environment is: - Microsoft Search Server Express 2008,
Search Server 2008 Express has its own forums.
http://social.msdn.microsoft.com/Forums/en-US/category/searchserver
Please post questions where your environment is Search Server 2008 Express there.
Moving to Off-topic.
WSS FAQ sites: http://wssv2faq.mindsharp.com and http://wssv3faq.mindsharp.com
Total list of WSS 3.0 / MOSS 2007 Books (including foreign language) http://wssv3faq.mindsharp.com/Lists/v3%20WSS%20FAQ/V%20Books.aspx- Proposed As Answer by kumarchandan Monday, August 03, 2009 5:15 AM
-
Saturday, August 01, 2009 10:04 AM
Mike, as I wrote this issue applies also to Microsoft Office SharePoint Server 2007. It's not only a Search Server 2008 issue. It's a common SharePoint Search issue. So in the general SharePoint - Search forum it's the correct location from my point of view...
- Proposed As Answer by kumarchandan Monday, August 03, 2009 5:15 AM
-
Monday, August 03, 2009 3:49 PMModeratorDon't include Search Server 2008 Express (and first!) in your question and I might agree with you ...But if I see "Search Server 2008 Express" in a question out it goes.Mike(One of the problems is that suppose I let this one stay because you add "but I tried also with Mircrosoft Office SharePoint Server 2007" - then all the other people posting (only) Search Server 2008 Express questions there will justify their post with your post being there. It's not easy being a Moderator ....)
WSS FAQ sites: http://wssv2faq.mindsharp.com and http://wssv3faq.mindsharp.com
Total list of WSS 3.0 / MOSS 2007 Books (including foreign language) http://wssv3faq.mindsharp.com/Lists/v3%20WSS%20FAQ/V%20Books.aspx- Edited by Mike Walsh FINMicrosoft Community Contributor, Moderator Monday, August 03, 2009 3:54 PM