Mostrando entradas con la etiqueta Scopes. Mostrar todas las entradas
Mostrando entradas con la etiqueta Scopes. Mostrar todas las entradas

viernes, 22 de febrero de 2013

Tips Info #97 Sharepoint 2010

1-Indexar archivos grandes en Sharepoint 2010

En Sharepoint 2010 el crawl por default no indexa archivos más grandes que 16 MB. Se puede cambiar esta propiedad mediante el siguiente comando de powershell:

$dSize = Get-SPEnterpriseSearchServiceApplication;
$dSize.SetProperty("MaxDownloadSize", 32);
$dSize.Update();

Recuerde que deberá reiniciar el servicio de search: Restart-Service osearch14

2-Reducir el tamaño de la base de datos de logging (WSS_UsageApplication) en Sharepoint 2010

Por default la cantidad de días que se retiene la información es de 14 días. Se puede verificar con el siguiente comando de power shell: Get-SPUsageDefinition

Se puede reducir el tamaño de la base ejecutando el siguiente comando:

Set-SPUsageDefinition –Identity "Page Requests" -DaysRetained 3

Esto provocará que se reduzca el tamaño.

Una manera rápida de ejecutar el comando sobre todas las features es mediante el siguiente script:

$definicionUsage = Get-SPUsageDefinition

Foreach($def in $definicionUsage)

{

Set-SPUsageDefinition –Identity $def.Name –DaysRetained 3

}

Recuerde que deberá ejecutar los dos siguientes jobs para limpiar los datos históricos:

'Microsoft SharePoint Foundation Usage Data Import' y 'Microsoft SharePoint Foundation Usage Data Processing'.

3-Feature ‘Site Use Confirmation and Deletion’

Site Use Confirmation and Deletion

Puede acceder a esta feature desde Central Administration > Site Collections > Site Use Confirm and Deletion

Esta feature informa a los administradores del site collection sobre sites que no se actualizan.

Hay tres campos que juegan un papel importante en el proceso (tabla AllSites de la base de contenido del web application):

  • “DeadWebNotifyCount”
  • “CertificationDate”
  • “LastContentChange”

DeadWebNotifyCount indica las veces que se notifico al usuario. Si es cero, significa que la fecha de expiración se extendió.

CertificationDate informa cuando se verificó el site.

LastContentChange, indica cuando se modificó el site (un documento, una lista, cualquier contenido)

Para poder actualizar los emails que se envian lea este link: http://msdn.microsoft.com/en-us/library/aa979730(v=office.14).aspx

4-Scope para buscar sólo documentos de librerías en Sharepoint 2010

Una vez que se crea un scope, se debe agregar una regla de query.

image

5-Workflows no disponibles después de realizar el upgrade de Sharepoint 2007 a 2010

Después de realizar el upgrade de SharePoint 2007 de la base de datos a SharePoint 2010 se observa que los Approval workflows de 2007no están disponibles/visibles para usuarios para crear nuevos workflows.

Ejecuta los siguientes pasos para habilitar 2007 workflows después del upgrade a SharePoint 2010:

· Ir a Site Actions ->Site Settings->Site Collection Administration->Site collection features

· Activar ‘SharePoint 2007 Workflows’

· Remueve el valor ‘none’ en <AssociationCategories>none</AssociationCategories> desde los siguientes files

    -14\template\features\ReviewWorkflows\Reviewapproval.xml

    -14\template\features\ReviewWorkflows\ReviewFeedback.xml

    -14\template\features\SignatureWorkflow\Signatures.xml

· Asocia el Workflow, ir a una librería,Library Settings, Add a Workflow, Seleccionar legacy Workflow.

Recuerda realizar un backup de los tres archivos modificados.

sábado, 19 de enero de 2013

Tips Info #93 Sharepoint 2010

1-Obtener el path de instalación de Sharepoint 2010 vía código (Get the installation path via code Sharepoint 2010)

Se puede usar la función SPUtility.GetGenericSetupPath

SPUtility.GetGenericSetupPath(string.Empty)
La línea de arriba retorna: C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\

SPUtility.GetGenericSetupPath("Template\\Images")
La línea de arriba retorna: C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\Images

2-Search Query Component no responde en Sharepoint 2010 (Does not respond Search Query Component)

El status del componente dice “Not Responding”.

Para reiniciar el componente puede ejecutar el siguiente comando de powershell:

$SearchApp = Get-SPEnterpriseSearchServiceApplication -identity "Search Service Application"
$SearchApp | Get-SPEnterpriseSearchQueryTopology | Get-SPEnterpriseSearchQueryComponent | Where-Object {$_.ServerName -eq 'server name'} | Restart-SPEnterpriseSearchQueryComponent

3-Actualizar un item de lista con PowerShell (Updating a list item with PowerShell)

$web = Get-SPWeb http://site/website
$list = $web.list["ListaNombre"]
$item = $list.GetItemByID(14)
$item.File.Update();    

4-Sharepoint Scopes

Al desarrollar para Sharepoint tenemos dos scopes que hacen referencia a donde se deployará los assemblies, y a que nivel de la granja se activará nuestra feature a implementar.

Solution Deployment Scope (ubicación de los assemblies)

  • GlobalAssemblyCache
  • WebApplication
  • Sandbox

Esta opción nos dice donde se deployarán los WSP de la solución y sus asemblies. Puede ser a nivel de farm (c:\windows\assemblies), sobre un Web Application (directorio \bin) o en la galería de soluciones, a traves de una Sandboxed solution.

image

Feature Scope (donde se habilitará la feature)

  • Farm
  • Web Application
  • Site
  • Web

Feature Scope se usa para activar una feature en una ubicación específica.

Farm – la feature estará disponible para toda la granja. Se activa desde: Central Administration > Operations > Manage Farm Features.
WebApplication – la feature estará disponible para todos los web applications. Se activa desde Central Administration > Application Management > Manage Web Application Features
Web – La feature estará disponible para todos los webs. Se activa en Site Settings > Site Features
Site – La feature estará disponible para todos los sites site collections.Se activa desde Site Settings > Site Collection Features

Hay dos tipos de recursos en Features para soportar archivos:

  • Local resources stored : se guarda en un subdirectorio dentro de la carpeta de la feature en \Template\Features directory.
  • Shared application Feature y site definition resources  son almacenados dentro de %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\Resources

5-Deshabilitar datasheet en Sharepoint 2010 (Disabled Datasheet)

DocShare1.gif

DocShare9.gif

Vía C#

using (SPSite site = new SPSite("http://sharepoint/sites/web1"))
{
    using (SPWeb web = site.RootWeb)
    {
        SPList docLibreria =web.Lists["Libreria"];

        // Change the advanced settings
        // Update the changes
        docLibreria.DisableGridEditing = true;
        docLibreria.Update();
    }
}

Vía PowerShell

$site=Get-SPSite "http://sharepoint/sites/web1"
$web=$site.RootWeb
$docLibreria =$web.Lists["Libreria"]
$docLibreria.DisableGridEditing  = $true
$docLibreria.Update()

sábado, 4 de febrero de 2012

Exclude Asset Library from search results by modifying search scopes

It’s possible to exclude SharePoint Lists from search results by excluding their types in the search scope definition.

Therefore you need to define an search scope rule based on a “property”. You have to use “contentclass” and a value. There are much lists of the possible values out in the web.

Value Description
STS_Web Site
STS_List Custom List
STS_ListItem Custom List item
STS_List_DocumentLibrary Document Library
STS_ListItem_DocumentLibrary Document Libary item
STS_List_Links Link List
STS_ListItem_Links Link List item
STS_List_Events Event List
STS_ListItem_Events Event List item
STS_List_Tasks Task List
STS_ListItem_Tasks Task List item
STS_List_Contacts Contact List
STS_ListItem_Contacts Contact List item
STS_List_Announcements Announcements List
STS_ListItem_Announcements Announcements List item
STS_List_DiscussionBoard Discussion Board
STS_ListItem_DiscussionBoard Discussion Board item
STS_List_GanttTasks Gantt Task List
STS_ListItem_GanttTasks Gantt Task item
STS_List_IssueTracking Issue Tracking list
STS_ListItem_IssueTracking Issue Tracking item
STS_List_Survey Survey
STS_ListItem_Survey Survey item
STS_List_PictureLibrary Picture Library
STS_ListItem_PictureLibrary Picture Library Item
STS_List_WebPageLibrary Web Page Library
STS_ListItem_WebPageLibrary Web Page Library Item
STS_List_XMLForm (InfoPath) Form Library
STS_ListItem_XMLForm (InfoPath) Form Library item
STS_List_850 Page Library
STS_ListItem_850 Page Library item
urn:content-class:SPSSearchQuery Search Query
urn:content-class:SPSListing:News News Listing
urn:content-class:SPSPeople People
urn:content-classes:SPSCategory Category
urn:content-classes:SPSListing Listing
urn:content-classes:SPSPersonListing Person Listing
urn:content-classes:SPSTextListing Text Listing
urn:content-classes:SPSSiteListing Site Listing
urn:content-classes:SPSSiteRegistry Site Registry Listing

You can generally exclude list items from search by using the value “STS_ListItem_PictureLibrary” for the property “contentclass”.

But how to exclude items or lists of type “Asset Library” which is also a standard list template like “Document Library”, “Picture Library”, “Calendar List”, … and “Page Library” which has as code (850) as name. (Marked red in the list above.)

I checked the 14 hive and figured out the 850 is the list template ID of “Page Library”. And the list template ID of “Asset Library” is 851.

So I used the following query in the search box: “(scope:"All Websites") (contentclass:STS_List_851)”

I created a new search scope exclude rule on the site collection using “STS_List_851” in it worked! Now there are no more Asset Libary links in the search result. If you you “STS_ListItem_851” you can exclude Asset Library Litems.

 

Fuente: http://ikarstein.wordpress.com/2011/11/28/exclude-asset-library-from-search-results-by-modifying-search-scopes/