No me hago responsable si copiaste mal algún código que sale en las páginas de este sitio.
Ojalá sea de ayuda para más de alguno este sitio.
Se agradece si deja algún comentario.

viernes, 10 de septiembre de 2010

Refinamiento Búsqueda

Referencias:
http://www.sharepointanalysthq.com/2010/06/sharepoint-2010-search-refinement-panel-options/
http://www.sharepointanalysthq.com/2010/06/showing-items-counts-in-sharepoint-2010-search-refiners/
http://www.sharepointanalysthq.com/2010/06/refinement-panel-metadatathreshold-configuration/
http://www.sharepointanalysthq.com/2010/06/adding-search-refiners-in-sharepoint-2010/
http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/03/15/get-to-know-the-refinement-web-part-in-sharepoint-2010-enterprise-search.aspx
http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/03/15/get-to-know-the-refinement-web-part-in-sharepoint-2010-enterprise-search.aspx

Configuración previa:
http://sharepointgeorge.com/2010/configuring-enterprise-search-sharepoint-2010/

Esta opción aún no me ha funcionado...


Scenario: Your documents go through a series of steps (e.g. Started, Working, Complete, Cancelled) and you have a metadata column (e.g. Process Step) that tracks the status of a particular document.  You have SharePoint Server 2010 and Enterprise Search you want users to be able to refine search results to a particular process step.
How To:  As the metadata column for tracking document status isn’t managed metadata(http://technet.microsoft.com/en-us/library/ee424403.aspx) the search crawler needs to be made aware of your particular column so that we can use it to configure search.  To this we need to create a Managed Property:
  • Central Administration -> Manage Service Applications -> Search Service Application -> Metadata Properties
  • New Managed Property -> Complete the form adding in a mapping to the ows_ crawled property for your column (e.g. ows_Process_0x0020_Step)
  • Start an re-index against the content source to crawl the data for the managed property
Now that search is aware of the column we can go ahead and use it in the search refiners.  This is done by configuring the Refinement Panel WebPart that is included on search results pages:
  • Put the results page in edit mode and edit the properties of the Refinement Panel WebPart
  • In the Refinement section -> Filter Category Definition -> Add the following to the XML definition modifying Title, Description and MappedProperty for your scenario:
<Category Title="Process Step" 
          Description="Process Step of the document" 
          Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator"
          MetadataThreshold="5"    
          NumberOfFiltersToDisplay="4"    
          MaxNumberOfFilters="20"    
          SortBy="Frequency"    
          SortByForMoreFilters="Name"    
          SortDirection="Descending"    
          SortDirectionForMoreFilters="Ascending"    
          ShowMoreLink="True"    
          MappedProperty="ProcessStep"    
          MoreLinkText="show more"    
          LessLinkText="show fewer" />
  • Uncheck the Use Default Configuration option
  • Save the web part and then the page and issue a search query to see the refiner in action
If you don’t see the refiner showing your options and you didn’t get any errors, there are a few things that will impact visibility of your custom refiner.  Firstly, you need to make sure that you have re-indexed your content to make sure that there is data for the refiner to work with.  Secondly, you need a big enough result set containing your column to make the refiner meaningful; if it’s too small the panel won’t display your refiner.  Thirdly, the refiners are shown in the order they are defined in the XML so if you place yours at the end but configure the refinement panel to only show the first X, it won’t appear in the panel.

Esta opción parece que funciona..

The new search refinement panel in SharePoint 2010 search is pretty cool! When you fire up a search you can see the various pieces of metadata that match the search results and then drill down from there.
But what if you want to add your own? Well its actually very easy if the column type that you want to add is Managed Metadata. If you are adding other columns types you have to do it the old SharePoint 2007 way where you have to crawl the property, create a managed property, do the mapping and then add the XML into the Refinement Panel.
But if the column is a Managed Metadata column then the SharePoint search engine will actually create managed properties out of the crawled properties for you so you don’t even have to do that! So all you need to do is add the following xml to Refinement Panel Filter Category Definition XML file:

Add the following to the Filter Category Definition file
So the XML is below:
1<Category Title="Field Name"
Description="xx" ShowMoreLink="True"
Type
="Microsoft.Office.Server.Search.WebControls.
TaxonomyFilterGenerator"
MappedProperty="ows_MetadataFacetInfo" MoreLinkText="Show More"

MetadataThreshold="1" NumberOfFiltersToDisplay="5"/>
**Esta configuracion, al validarse con el Refinador, no me dio error.. pero no arrojó nada..
Ok there are a bunch more options that you can add but put simply you need the following:
  • Title: This is the name of the Column or Field that the Managed Metadata is mapped to. If the field has a space that’s ok but remember its the column name
  • Type: This has to be the TaxonomyFilterGenerator for Managed Metadata fields (for other fields you use the ManagedPropertyFilterGenerator class)
  • Mapped Property: For Managed Metadata fields this is ALWAYS ows_MetadataFacetInfo, SharePoint will do the rest!
You can actually have a look at the default Filter Definition Configuration file and see that there it two Categories defined in this exact fashion: Managed Metadata Columns and Tags. The difference between the two is that Tags is the Enterprise Keywords while Managed Metadata Columns are used for well Managed Metadata Columns! So if you want to force or create your own refiners follow the steps above and you should be all good!
Se prueba habilitar managed metadata dentro de la biblioteca de documentos y agregar campos de indexación y tags, y keywords (todo dentro de la biblioteca de documentos).

No hay comentarios:

Publicar un comentario