Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

How to include custom columns/properties in search results of SharePoint's QueryEx webservice.?

  Asked By: Damaris    Date: Oct 25    Category: Sharepoint    Views: 5746

How to include custom columns in search results of SharePoint's QueryEx webservice.? In sharepoint 3.0 I added new column to the document library, to store additional information about the content say 'ManagerName'. When I search the sharepoint using the QueryEx web-service I get a fixed set of columns: 1.WorkId 2.Rank 3.Title 4.Author 5.Size 6.Path 7.Description 8.Write 9.Site name 10.CollapsingStatus 11.HitHighlightedSummary 12.HitHighlightedProperties 13.ContentClass 14.IsDocument 15.PictureThumbnailURL The Query I use for search is: <QueryPacket xmlns='urn:Microsoft.Search.Qu... <Query> <SupportedFormats> <Format revision='1'>urn:Microsoft.Search.Response.Document:Document</Format> </SupportedFormats> <Context> <QueryText language='en-US' type='STRING'> keywordString</QueryText> </Context> </Query> </QueryPacket> We also tried including the column in the Property tag in the query by adding: <Properties> <Property name='ManagerName'/> </Properties> But this leads to exception of type: Microsoft.SharePoint.Search.Query.InvalidPropertyException. Besides this 'STRING' query format we also tried to user the 'MSSQLFT' format as: <QueryText language='en-US' type='MSSQLFT'> select title,path,ManagerName from scope() where freetext('" + keywordString + "') </QueryText> This again gives the InvalidPropertyException.



1 Answer Found

Answer #1    Answered By: Angarika Shroff     Answered On: Oct 25

Follow Microsoft's instructions on how to Manage metadata property  mappings (Office SharePoint Server).

1. In Shared Services Administration, go to the search  section, click Search settings.

2. In the Crawl Settings section, click Metadata property mappings.

3. Make sure the field that you want to search is listed under 'Mappings', under People:[yourfieldname]. In my case, I was trying to find the field 'Office', so it was listed as People:Office(Text). If the field is not found, click on 'New Managed Property' button on the top to map a new property.

4. In your QueryEx, make sure the field being queried is the PropertyName that corresponds to your Mapping. In my case, I should have queried 'OfficeNumber' instead of 'Office'.

5. Remember to Start an Incremental Crawl (SSA, Search Settings, Manage Content Sources).