SOLVED

How to search choice field values with 'Allow multiple selections'

Occasional Contributor

I have a SharePoint Online site. In the Documents library I have added a new field of type "Choices" with 'Allow multiple selections' ticked.

When I populate this field with values and use Microsoft Search, it will only return results when there is one value selected.

Is it possible to have it search the individual values?

MartinDAZN_0-1643307343636.png

MartinDAZN_1-1643307395087.png

If I search for Carrot, nothing is found...

MartinDAZN_2-1643307450280.png

 

 

2 Replies
best response confirmed by MartinDAZN (Occasional Contributor)
Solution

@MartinDAZN it's possible to search for distinct values inside a multi-value field. Unfortunately, the field/column you created has been crawled as a single value field. That's why you do get results when you're searching for a single value and there are items that only have that one value in that field.

You'll have to make some changes in order to get results that partially match the contents of the multi-value field (partially as in search for one of the options that have been selected).

  • You'll have to create a managed property, map it to the crawled property that has been created for your field, make sure you enable the right options to make the property searchable and to allow multiple values, then reindex your list/library and wait for the new result set to create created. 

To illustrate:

> At the site collection or tenant level (up to you) you'll have to navigate to the Search Schema

- Site Collection Level (make sure you click on the Search Schema under Site Collection Administration): 

Intelogist_0-1643309180763.png

- Tenant level (this is in SPO Admin > More Features > Search):

Intelogist_1-1643309269916.png

> Once you're on either of those, click to create a new managed property:

Intelogist_2-1643309525989.png

> Give it a name and select the options that are relevant to you. It will complain if you use funny characters in the name or alias, but follow the prompts and you'll be fine. 

The two options you definitely need to check are

- Searchable 

- Allow Multiple Values

Intelogist_3-1643309612674.png

Intelogist_4-1643309625413.png

Both of these need to be checked for this to work.

> Also, at the bottom of the page, you'll have to select which crawled property this managed property will be mapped to. Your property will be something like ows_testMulti (judging from the screenshots). Click on the coloured "Add a Mapping" button:

Intelogist_5-1643309751378.png

 

Type in the name of your field and click on "Find":

Intelogist_6-1643309809345.png

Select the ows_ property that appears and click on OK.

At this point, you're almost done. Ensure that your managed property has been created correctly by searching for it in the managed properties (you'll be taken there once you finish creating the property). You'll see something like this (depending on your actual configuration while creating the field):

Intelogist_7-1643310110449.png

Now, you're really done with configuring this. At this point, you'll have to reindex your list/library and wait for Search to do its thing.

You should be able to search for single values matching part of a multi-value field like so:

Intelogist_8-1643310251846.png

 

Hope you find this useful, good luck!

 

MGR

 

Thanks MGR, that has worked. 
I found a managed property had been created automatically but it needed to be edited as you described in order to work.