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.

33 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
    3. At site collection we can only create managed properties of type text. After mapping and waiting for full crawl, search is still not showing anything.

      Shaibal, Mikael, any guidance?

      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
    2. What if we've a huge list and now is when business realize they need search. Also if I create managed property in SSA, which crawled properties will be available for mapping? I can see that local list level properties are not visible.

      Delete
    3. Any level column should become a global cp. And I always try to map on the ssa/tenant if I have permission to keep it simple.

      Delete
  9. Hello Mikael, thanks for the tutorial.
    How to make a managed property to appear in the property filter of a content search web part?

    ReplyDelete
    Replies
    1. Hi,
      Can you explain? Any mp which is of type refinable should appear as a filter in the wizard. I recommend using the re-usable ones when mapping - RefinableStringXX for example. Automatic mp's for site columns are not refinable by default.

      Delete
  10. In the BENJAMIN NIAULIN's post https://en.share-gate.com/blog/filtering-content-with-sharepoint-user-properties-search, the mp appears well on the property filter. I am on SharePoint online. Thanks

    ReplyDelete
    Replies
    1. Ah.. that box. Instead of picking it from the list, just type it into the template manually. If you know the name of your mp, type it. I never use the auto-build stuff and always manually write the KQL for templates. Not that hard :)

      Delete
  11. It works well if I type it manually. The goal in making it appear in the list of managed properties is to be able to use it in the web part of the new experience

    ReplyDelete
    Replies
    1. In the highlighted content webpart for modern you pick "Managed property" as the filter type. Type your name. If it doesn't list, hit F12, edit the control and enter you name and pick it :)

      Delete
  12. Hello Mikael, thanks for your post. I have created custom managed property, gave it context 1 and mapped it with "Keywords" crawled property so that when users tag documents with Enterprise Keywords column those documents would appear in sharepoint online search results. This was working fine until now but I noticed newly tagged documents are not appearing in search results however old tagged documents are still appearing. I reindexed libraries and site in sharepoint online and tested after an hour but newly tagged documents are not still showing up in search results. Should I delete this managed property and recreate new one ?

    ReplyDelete
    Replies
    1. Not appearing at all, or not with a tagged value?

      Delete
  13. They are appearing with title and name search but not with tagged value. Also when I tried to create new managed property sharepoint online said : Schema can't be modified since the application is paused. Would Tenant level re crawl do anything or should I wait ? There has been more than 2 hours since re crawled invidual library having those documents and sites but with no change in tagged search

    ReplyDelete
    Replies
    1. If app is paused, something is not right. File a support request.

      Delete
  14. Now it is not showing App is paused but still newly tagged documents are not appearing in search results. Would reindexing at tenant level fix this problem ?

    ReplyDelete
    Replies
    1. Try reindex the list only, or create a new item and check it.

      Delete