Merging two filtered lists of results - Parentheses issue

This is for mobile.

I’m using Fuzzy Search to pull a list of businesses. I have a parameter for the area of town (ex. Downtown) that corresponds to a Business field (OS Area). I have another business field where I can set if the Business “Serves All Areas” (OS Service Area).

I’m trying to pull a list that merges results filtered by Area of Town parameter with results filtered to contain Serves All Areas businesses. I have parentheses turned on but I can’t figure out how to get the parentheses to not include the merged with function. Right now, they only appear when I add merged with and include the search before and wants to add a function after.

Here’s what I mean":

(Search’s results filtered by merged with [Add])[Add]

What I want is this:

(Search’s results filtered by)merged with(Search’s results filtered by)


Any help is appreciated.

Hi @ashlyncavaletto

Are these two options sets same or different? OS Area and OS Service Area

If they are same and the second one is there only to check whether a business serves all areas, how about adding a yes/no there?

@shahrukhghazaan

They are different option sets. OS Area reflects specific regions around town in which there is the business’s physical location. OS Service Area is for non-location-based businesses (ex. Serving All Areas, Service City A, etc…). In case it helps, any business with a physical location will have something in the OS Area data field and their OS Service Area will be set as “Default to Location”.

There are essentially two different groups of businesses. Group 1 is those with physical locations that will have OS Area set. This will correspond to the Parameter being set. Group 2 businesses don’t have a physical location, but they have OS Service Area set to “Serving All Locations”.

If the parameter is City A, I want a search to give a list of results that have every business with OS Area set to City A and every business related to the search that have “Serving All Locations” set.

@ashlyncavaletto
I am attaching a screenshot below. Let me know if you want to achieve this kind of result:
Given that Area is “New York“. You want New York results plus relevant to New York (handled by fuzzy search) which have service area set to Serving All (Like Area: York City, Service Area: Serving All)

If you want this kind of result then do this:
Do a Search For (constraint on Area) merged with Do a Search For (constraint 1 on Area and constraint 2 on Service Area = “Serving All” )

Does that help?
If not please show me your exact implementation through screenshots

Fuzzy search needs to apply to both groups. For example, there may be a dry cleaner that is location specific (OS Area has a data value set) and a cleaning service that is not location specific (OS Service Area has a data value set as “Serving All Locations”). The fuzzy search needs to return both results in a list when someone searches for “clean”.

@ashlyncavaletto

Let me ask you this: Since user is entering only “clean” in this scenario, where does Area value come from? Is it current area of the user?

I figured out a workaround for my issue. I added a short list at the bottom of my vertical list element. The short list only appears when there is an OS Area filter(parameter is set) and the Fuzzy search result includes a business that has “Serving All Areas” set. This short list only shows the “Serving All Areas” businesses, while the vertical list still displays the businesses that match the parameter. It’s not elegant, but it works for now.


To find a better solution, here’s my response to your question:

The search results can be further filtered by area. In this example, say the search “clean” brings up 2 drycleaners, one in City A and one in City B (OS Area is set to City A or City B), and the search result also brings up a cleaning service set to “Serving All Areas”. If I further filter this search by setting the parameter to City A, the list of search results should return the drycleaner in City A and the cleaning service that serves all areas.

When using “Search 1 results filtered by parameter merged with Search 2 results filtered by Serving All Areas”, the second filter filtered all results, not just those in Search 2. This effectively removes all Search 1 results.

I actually noticed that too. I was only getting results from Search 2.

Can you use search constraints instead of filters? They will get results from both of the searches and merge will be correct

This initial constraint is the search term. The filters apply the additional constraints. I’m not sure what you mean by constraints versus filters.

@ashlyncavaletto

Let me explain. When you do it like this: Do a Search for Business :filtered then that is a filter. But you can also try it without adding filtered operator at the end. By clicking on “Do a Search For” you will see a button “Add Constraint” > clicking it will reveal the option to select a field of the data type (example Area field of Business) then apply “=” or “contains” etc to filter through values

Note that constraints are additive i.e. they have AND condition in between meaning if you apply 2 or more of constraints then a value fulfilling all of them will be returned

Filtered operator is useful in many cases (some advanced filters) but most of the times Search constraints can handle your required filtering.

If constraints work in your case, then that will resolve the issue of :merged with not returning both search results

If not, then can you try with 2 fuzzy searches and then merging their results?

Note: if you can share screenshots, that will help us help you better