Sharepoint Insight by Namwar Rizvi

Sharepoint Tips, Tricks and inside knowledge from real world experience by Namwar Rizvi

Posts Tagged ‘Search’

How to Search on Last Modified By field in SharePoint Advanced Search

Posted by namwar on April 1, 2009


If you are wondering why you are unable to find any search result for Last Modified By filed in Advanced Search of SharePoint then don’t worry, you are not alone. This is one of the bug which still exist in SharePoint 2007 Server Search engine. I have found a solution posted by Pritam Dhake ina  SharePoint forum. I have used this solution and it works like a charm.

Here are the steps to manually hook the Last Modified By field to the creawled field.

  1. Open Central administration -> Shared Services -> SharedServices (X being the number of the shared services provider for the site you are creating a mapping)  – > search settings -> metadata property mappings 
  2. Click “Modifiedby” to edit the properties 
  3. Make sure  “Include values from all crawled properties mapped” is selected
  4. Click “add mapping” and select the “Office” category from the dropdown list. 
  5. look for a property named “OFFICE:8” , click “OK
  6. Click “add mapping” and select the “ows_Last_x0020_Modified(text)” from the ALL categories dropdown list, Click “OK
  7. Make sure the box is checked “Allow this property to be used in scopes”, click “OK
  8. Click on “Crawled Properties” link on the left side of the Shared Services Administration page. 
  9. Click On the “Office” Category.
  10. The mapped property you just created should be listed in the “Mapped To” column of the Office:8(Text) category.
  11. Click on the Office:8(Text) category to view the properties.
  12. In the “name and information” section, you should see the “property Set ID:” value is  ‘F29F85E0-4FF9-1068-AB91-08002B27B3D9‘ …This is very important!!!
  13. In the “Mappings to managed properties” section the managed property you edited in steps 2 – 7 should be listed. 
  14. The box to “Include values for this property in the search index” should be checked.
  15. Click “OK” to exit this page.
  16. Open “Shared Services administration” -> “ShareservicesX” -> “Search Settings” -> “Content Sources and crawl schedules” 
  17. Click on “Local Office SharePoint Server sites” to expand the dropdown list and select “Start full crawl” 
  18. When the crawl has completed, navigate to the site collection -> click on the search tab. 
  19. Select “Advanced Search” 
  20. In the properties dropdown list select “Last Modified By
  21. Select contains
  22. Enter a name that you know has added / edited a document
  23. Click the magnifier to execute the search
  24. Get back results.
Advertisements

Posted in Bugs, Search, Solutions | Tagged: , , , , | 3 Comments »

How Sharepoint ranks a document in Search Results?

Posted by namwar on January 12, 2009


Several times I have been asked about the way Sharepoint calculates the rank of a document in document search. Although, it is based on a complex probablistic algorithm developed by Microsft Researcher, following are some simple tips to know the background of search ranking and how to tune the search results. Please note, these tips are not an authentic statements from Microsoft, instead they are my observations and knowledge gained from other fellow Sharepoint experts.

According to Microsoft on Technet in this article

Ranking depends on:

  • The length of the document
  • The frequency of the query term in the entire collection of documents
  • The number of documents containing the query term
  • The number of documents in the entire collection of documents
     

Keeping the above points in mind, following observations have been made as mentioned in this blog

  • Higher size of the document = lower ranking
  • More frequent the keyword matched in a document = higher ranking
  • Deeper URL surf depth = lower ranking
  • Authoritative pages in SP = higher ranking
  • Default views seem to get ranked higher than individual item views
  • File types seem to affect ranking (.doc > .txt for instance)
  • Language seems to affect ranking, US-EN is always higher, even though your server installation may have french as it’s default language

Posted in Architecture, SSP | Tagged: , , , | Leave a Comment »

How to crawl Lookup field or column

Posted by namwar on October 5, 2008


Whenever you create a column in your list and want to enable search based on it then you add that column as a Managed Propety in your Shared Service Provider. It works for all type of columns except lookup columns, which actually refers to another list in the site, without needing any further steps. The difference in lookup columns is that they actually save just a reference not the actual value and if you have created a column with the name say Category ( having values Hardware, Software, etc) and add it as a managed property then you will see that you will not get any result if you will try to search by say Hardware,a value from the Category list, because internally only reference was saved and SSP indexed the reference not the actual value.

But don’t worry, there is a simple solution which unfortunately Microsoft has not documented properly. The solution is, just go back and edit your managed property mapping and instead of mapping Category; map ows_Category. This is an internal property generated by the Sharepoint when you created Category and this property saves the actual value.

Now, after doing the crawl, if you will search as before, you will get the expected result.

Posted in Architecture, SSP | Tagged: , , | Leave a Comment »

How to check if the file is indexed in SharePoint or not?

Posted by namwar on September 17, 2008


If you want to know whether your file is indexed in Sharepoint Search Services Provider (SSP) or not then there is no way provided directly in the object model of SSP.

Since Sharepoint stores its content on SQL Server therfore, you can run the following TSQL query to find it:

Select * from dbo.MSSAnchorText where Link='<Your File Path>'
Note: Please note you need to replace <Your File Path> by the full path of the your intended file in the above query
Example
Select * from dbo.MSSAnchorText where Link='http://mossdev/Shared%20Documents/UserManual.pdf'

Posted in Object Model, SSP | Tagged: , , , , | Leave a Comment »

How to get raw XML of Sharepoint Search Core Results Web Part?

Posted by namwar on September 12, 2008


If you are like me and trying to customize the search result presentation in SharePoint then you must have faced the issue of customizing the XSL of Sharepoint Search Core Results Web Part. You can customize the XSL by using SharePoint Designer or any other WYSIWYG XSL editor, if you know the raw XML returned by Search.

To get the raw XML click XSL Editor button of Search Core Results web part and replace the already provided XSL with the following

<xsl:stylesheet version=”1.0″ xmlns:xsl=”http://www.w3.org/1999/XSL/Transform&#8221; >

<xsl:output method=”xml” version=”1.0″ encoding=”UTF-8″ indent=”yes” />

<xsl:template match=”/”>

<xmp><xsl:copy-of select=”*”/></xmp>

</xsl:template>

</xsl:stylesheet>

Posted in Customization | Tagged: , , , | Leave a Comment »