Developer forum

Forum » Ecommerce - Standard features » Advice on search index rule

Advice on search index rule

Marius Lian
Reply

Hi,

We want to do the following in the search index:

  • We have an assortment for a customer where some of the products should always be shown and some should only be show on a specific location.
  • Let's say we have products A, B and C that should always be shown and of these product C is on location Oslo. 
  • Then we have products D and E which both are on location Oslo.
Product AlwaysShow Location When Not Oslo When Oslo
A TRUE   Show Show
B TRUE   Show Show
C TRUE OSL Show Show
D   OSL   Show
E   OSL   Show

The problem with Dynamicweb's search seems to be that we are not able to show product "C" when you are not on Oslo since it can't handle that kind of logic. 

So for SQL this would be:

Select    *
From     Products
Where  AlwaysShow = TRUE
Or          Location = CurrentLocation

Note: this is for filters, so we would like to be able to do the above with filters. 

Anyone know if this can be done or not?

Thanks,
Marius


Replies

 
Nicolai Pedersen
Reply

Hi Marius

I believe you can do that in an expression using an expression group on the query it self, see https://doc.dynamicweb.com/documentation-9/indexing/indexing-search/queries#4791

Maybe you are just trying using parameters on the settings for the catalog app?

BR Nicolai

 

You must be logged in to post in the forum