Friday, July 4, 2014

What makes a SharePoint column searchable?

By searchable I mean a user searches for a term, and get a search result if that term exists in a SharePoint column (without specifying a property query). Basically typing keywords in a search box.

By default when you create a SharePoint column on a list, it will generate a crawled property which is marked with Include in full-text index. This checkmark ensures you will get a hit for terms in this column. The naming of the crawled property is ows_internalColumnName.

If you look at managed properties, they have a corresponding property called Searchable. This means if your crawled property is mapped to a managed property marked as searchable, you will get recall on the column. However, if the managed property is not marked as searchable, even though the crawled property is marked with “Include in full-text” index, it will NOT be searchable.

To put it all in a table.
Crawled Property Managed Property
Included in
Full text-index
Not included in
Full text-index
Searchable Not
Searchable
Column
Searchable
x
x
x x
x x
x x
x x

Note

If a crawled property is mapped to two managed properties, where one of them is searchable, then the value will be searchable.

If a column is hidden or marked via column properties as "NoCrawl", then it will not be searchable.

If the crawled property is from a number/currencly column, you need to map it to a searchable managed property in order to get full text index recall.

Summary

In order to make a column in SharePoint not searchable, you either have to uncheck the option on the corresponding crawled property to include it in the full-text index, or map it to a managed property which is not marked as searchable.

Check out Benjamin Niaulin's post Understand SharePoint Crawled and Managed properties for search for more information on crawled and managed properties.

18 comments:

  1. What would keep a column/field/property not crawled? I'm trying to find the Publishing Image Caption.

    ReplyDelete
    Replies
    1. If the field is hidden or marked as NoCrawl. But are you getting the URL, just not the caption?

      Delete
  2. Hello Mikael ! I'm very confused
    1 - I've a "column" searchable but mapped to a not searchable "managed propery" & his "crawled property" have unchecked Include in the full-text search index
    => Used in Diplay template and it works, i used his not searchable MP but querybale
    I mean i can do MP:column

    2 - I've a "column" searchable and same as above, except it's not querybale
    I mean MP:column not show results, => so when using this MP in Display Template this does not work.

    3 - I've a "column" not searchable (and same as above) but queryable with another MP (not his MP where it'smapped to) and => when using this other MP i can show the column in Display Template

    My QS are :

    Why in 1 & 2 is searchable but thier MP(managed) & CP(crawled) are not ?
    How this can happen ?

    I think answering one can give me response to the second !

    ReplyDelete
    Replies
    1. 1: Searchable means free text search, queryable means property search. Not searchable does not impact queryable and vice versa.

      2: To do property:value it HAS to be queryable

      So, and mp being marked as queryable will allow property queries. If a mp is marked not searchable, then you cannot free text search on content from the mapped cp's.

      Delete
  3. Hi Mikael,

    In sharepoint online to include a property in free text search

    1.The Managed property should be configured as searchable and as well as should be included in full-text index?
    or
    2. Either one of them will make the property searchable. Either include in full text index or configure the property as searchable?


    ReplyDelete
    Replies
    1. Read the table left to right. Find the setting for the cp, if it's mapped to an mp, then the mp must be searchable for the cp content to be in the full text index. If the mp is searchable, then the cp settings are ignored.

      Delete
  4. Hi Mikael,

    In sharepoint online to include a property in free text search

    1.The Managed property should be configured as searchable and as well as should be included in full-text index?
    or
    2. Either one of them will make the property searchable. Either include in full text index or configure the property as searchable?


    ReplyDelete
  5. I have created a CHOICE site column and added it to a list. I have also created a few items in that list with value in the site column. I now see the automatically created crawled and managed property. Now, in the site's search box when I type in values of that column in the list item, I get the relevant search results. When I checked the crawled and managed property, I noticed that the properties and not set to "Include in full-text index" and Searchable respectively. How does the search show results in this case !

    ReplyDelete
    Replies
    1. Quite easy :) Your column X will get two cp's: ows_q_CHCS_X which is not free text searchable, and ows_X which is. If you don't want it searchable you need to map ows_X to a non searchable mp.

      Delete
  6. Hi Mikael,
    Thanks for explaining the searchability of a column. In my case, we have a custom list column of Number type (not site column). As you said a crawled property is automatically created and the "Include in full-text index" option is already checked. But the column's data is still not searchable. Although, there is no mapped managed property, but since the "Include in full-text index" is checked, it should ideally be searchable. But unfortunately that's not the case. Can you think of a reason why it isn't searchable or if I am missing anything?

    ReplyDelete
    Replies
    1. Does anyone knows if custom List columns of types Number or Currency are searchable? Their Crawled Property does have the "Include in full-text index" option checked, but the values inside these column types are not searchable.

      Delete
    2. Seems numbers are not added free text by default. Then you have to map it to a managed property which is searchable. Never tested this before. I'll update the article.

      Delete
  7. Hi Mikael,

    Just wanted to know if I can do search on Managed Metadata tags. What I mean is if I search for a text it should search for that tag instead of searching it inside the document.

    Regards
    Pradeep

    ReplyDelete
    Replies
    1. For site columns you can do property queries. Both on id and label. owsTaxIdColumnName is the auto-mp for metadata columns.

      owsTaxIdColumnName:label

      would give results for that label.

      Delete
  8. Hi, I've couple of list level columns of type currency. It has generated crawled property. I created managed property of type text since that's only allowed at Site collection level. After full crawl, search doesn't yield anything.

    I can't even used 'decimal' or 'refinabledecimal' managed properties since they are not marked as searchable.

    What would you recommend?

    ReplyDelete
    Replies
    1. I would perhaps use a site column which generates an automatic managed property - https://technet.microsoft.com/en-us/library/jj613136.aspx

      Delete