How to organize quick search in SharePoint Online contact lists - irregular behavior

Search is a one of the most important topics in SharePoint usage. However, it is often overlooked, especially in small projects or at initial project planning stages.
Let us consider a quick search example in SharePoint Online list and various search problems which the user / administrator may encounter.Let's create a contact list and name it TeamContacts.



Now we fill some data in the list:


Let’s type a last name in search bar and press Enter. And here we got no results, nothing has been found:



For a person who is just started his acquaintance with SharePoint (either for a standard user) it is difficult to understand why the search does not worked.
Lost in thought, the user takes a coffee break, then he returns to work and searches another string. Now the result is unexpectedly appeared:



As we can see, search started working properly, but it took some time. Quick search box does not filtering items directly from the data already contained in the list. Search is performed over the indexed data by Search Service (Manage Crawling in SharePointServer 2013).
Without going into details of data crawling, the user rejoices at the search result. Then he types into the search field the name of company (column Company), and nothing happens again. He tries to fill the Home Phone in the field and the search is working, tries to type Business Phone - and it does not work, the same thing happens with the Company column.
So let’s learn more about data crawling. Crawled properties and managed properties are essential parameters for crawling and displaying search results.
Crawled properties are metadata that is extracted from documents during crawls. Metadata can be structured content (such as the title or the author from a Word document), or unstructured content (such as a detected language or extracted keywords).Managed properties are attributes which determine how the contents are shown in search results. Crawled properties are generated automatically. Managed property can be also created automatically or created by the user. 
Crawled and managed properties for site columns are automatically mapped. Managed properties for list columns require manually mapping.There are also the default managed properties. For each managed property that by default is mapped to one or several crawled properties, exist crawled properties these are listed in the mapped crawled properties column. List of them you can find there — Overview of crawled and managed properties in SharePoint Server 2013.
So let’s go back to our example and examine crawled and managed properties compiled for Home Phone and Business Phone columns.Open Manage Search Schema on the Search settings page:


Then click on the link “Crawled properties”. Type the word “phone” in crawled properties field and click the green button to display properties, which contain word “phone” in their names. 



So we have found many properties that contain this word, but we need to define which of them are related to Business Phone and Home Phone columns.

SharePoint has name convention for automatically created managed properties. Read more: Automatically created managed properties in SharePoint Server 2013

Home Phone and Business Phone have the following crawled и managed properties:

ows_HomePhone (no managed properties)

ows_q_TEXT_HomePhone (managed: HomePhoneOWSTEXT)

ows_WorkPhone (managed: WorkPhoneOWSTEXT)

ows_q_TEXT_WorkPhone (managed: WorkPhoneOWSTEXT)
In SharePoint 2010 crawled properties were known as: ows_InternalColumnName.

In SP2013/Online names convention was changed: ows_q_{Data Type Code}_{Site Column Internal Name}

It remains unclear why managed field is configured for ows_WorkPhone only and the same option is not accepted for ows_HomePhone. Anyway, in SharePoint 2013 managed properties are creating automatically only for ows_q_{Data Type Code}_{Site Column Internal Name}.
Let’s skip the details of all possible crawled и managed properties settings and pay attention to the two essential settings which make a column content available for search.
For crawled properties there is the setting Include in full-text index.



For managed properties there is the setting Searchable



The table below describes the dependencies of content showing in search result (Read moreWhat makes SharePoint column searchable):

Crawled Property
Managed Property
Column name
Not included in
Full text-index
Searchable
Not
Searchable
Column
Searchable
x
x
x
x
x
x
x
x
x
x

In our Contact List example we have following characteristics in the Home Phone Column:

ows_HomePhone — Include in full-text index: TRUE   (no managed properties)

ows_q_TEXT_HomePhone —  Include in full-text index: FALSE

HomePhoneOWSTEXT — Searchable: FALSE


If crawled property has no managed 
property and parameter Include in full-text index is true, this property will be shown by searching. That is why we have easily found phone number from the Home Phone column.
Settings for Business Phone:

ows_WorkPhone — Include in full-text index: TRUE

ows_q_TEXT_WorkPhone — Include in full-text index: FALSE

WorkPhoneOWSTEXT  — Searchable: FALSE


As we can see, managed property is compiled for both crawled properties, so it is not available for search.

The solution is the custom creation of managed property: create managed property (MyWorkPhoneOWSTEXT), set true for Searchable option, and add mapping to the managed property (ows_WorkPhone).  Another option is deleting crawled property ows_WorkPhone from mapping fields of managed property WorkPhoneOWSTEXT.
So what do we have now in search results? 



Searching is enabled for Business Phone as well as for other fields.
Search is one of the most important services in SharePoint, but sadly, many possibilities of its functionality are not described in detail. We hope this article was useful for you.