Tuesday, September 8, 2009

Advanced Search retreats

Technorati Tags: ,

In software development one of the key rules is not to take functionality away from users. However, if you do then you should document the fact. The new infrastructure update removes the "Contains" and "Does not contain" operators from the Advanced Search Box webpart. This is probably due to the fact that the webpart uses the "Like" operator instead of using the CONTAINS fulltext predicate in the fulltext sql it generates. The "Like" operator is very slow, so in large deployments searches like these could slow the server down. The question here is why not just use the CONTAINS predicate and not remove the functionality from the webpart?

To enable "Contains" you need to edit the "Advanced Search Box" webpart on the Advanced.aspx page.  Under the "properties" section of webpart's toolbox click on the button next to the "Properties" text box. This will display a "Text Entry-Web Page Dialog".

At the very top of this xml you will see:


<Option Name="AllowOpContains" Value="False"/>


Change the "Value" attribute to True and save your changes. The "Contains" and "Does Not Contains" should now show up.

 

No comments:

Post a Comment