MCPBlog

“Contains” is missing from SharePoint Advanced Search

Body:

Last night I was setting up SharePoint Advanced Search Box in Enterprise Search and I was puzzled for a couple of seconds. For all text fields that I had in metadata mappings, I had no option "Contains" and "Does not contain"!!!

But I had couple of technical documentation for "old" implementation, and had no single word about this needed to be set explicitly. "New" implementation of Search has also been slightly modified but I had no clue what happened. So I decided to investigate and luckily I've found problem/solution.

If you don't have Microsoft Office Servers Infrastructure Update in your SharePoint farm than you have this problem (Or if you have SP2).

Don't panic!!!

Simply add following piece <Option Name="AllowOpContains" Value="True"/> underneath root node.

  • Go to Advanced Search page and click Site Actions, and Edit Page.
  • On the Advanced Search Web Part, click Edit in upper right corner of web part, and then click Modify Shared Web Part.
  • In the Properties text box, click the small rectangle Builder.

  • In the Builder dialog box, under the root node create <Option Name="AllowOpContains" Value="True"/> and click OK.

Why has this been removed from SharePoint?

This option has been removed from the Advanced Search page, because setting this restriction can issue a very extensive SQL query, such as "CONTRACT". This causes a huge load on SQL server and such queries often timeout!!!

So take care with this option.

Category: Sharepoint
Published: 7.12.2009 22:29

Read the complete post at http://www.mcpblog.net/Lists/Posts/ViewPost.aspx?ID=64