Monday, September 28, 2009

Wildcards in the CONTAINS Predicate in Windows SharePoint Services Search SQL Syntax - no results

If you get no results with CONTAINS and wildcard search in MOSS make sure you don't forget the " in the query. The MSDN documentation does not include them.

wrong: select title, author, rank from scope() where CONTAINS (defaultproperties, 'sharep*') order by rank desc

correct: select title, author, rank from scope() where CONTAINS (defaultproperties, '"sharep*"') order by rank desc

I recommend http://www.codeplex.com/SPSearchBench for testing.

Monday, September 14, 2009

Content for this URL is excluded by the server because a no-index attribute

In SharePoint/MOSS server search crawl log you may see "Content for this URL is excluded by the server because a no-index attribute" apear for pages that you would like to be indexed.

What to check in this case:
  • Rules
  • Robots.txt file
  • Page Source (robots meta)
  • Page library advanced settings
  • 'Site Settings' - 'Search Visibility' under 'Site Administration'
  • and last but not least: Make sure you can access the page with the user that you definied as robots/crawler user. See central administration:
    /ssp/admin/_layouts/contentaccessaccount.aspx
    (log on to your site with this user)

Hint fot German users: The error message in German is "Der Inhalt für diese URL wird wegen eines Nichtindexattributs vom Server ausgeschlossen".