Developer forum

Forum » Ecommerce - Standard features » Repository: include all product groups except a few specific product groups

Repository: include all product groups except a few specific product groups

Jens Jakob Kristensen
Jens Jakob Kristensen
Reply

Hi,

I am trying to define the query for a product free text search. 

We need to search the product properties, which works fine:

  • product name
  • product number
  • vvs nummber (custom field)

The issue:

We want to include products from all product groups, except products from one or more speific product groups  (in this example Group ID=GROUP37).

I have tried several configurations, but I cannot seem to get the logic right in the query.

How do I achieve this?

Screen_Shot_2017-10-02_at_10.46.22.png

Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Jens,

 

You need to :

  • Add an Expression Group "AND" with Negate checkbox active
  • Create 1 expression where you match GroupID or Parent GroupID with Operator Match Any and set the value to the GroupID's you need

 

Best Regards,

Nuno Aguiar

And-Negate.jpg
 
Jens Jakob Kristensen
Jens Jakob Kristensen
Reply

Thank you Nuno for your quick response :-)

I have tried that, although with an "Equal", not a "Match any".

Now I have tried it as seen in this screenshot, but it still doesn't work? Now the search result is 0 results?

Hmm...what is wrong here? :-/

Screen_Shot_2017-10-02_at_14.09.11.png
 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Jens,

 

I can repro that in 9.3.1.

Looks like a nasty bug. If I remove the "Negate" it works as expected (only showing products from that GroupID). We'll have to wait for DW folks to confirm the bug.

 

//Nuno

 
Jens Jakob Kristensen
Jens Jakob Kristensen
Reply

The solution I am working on is using 9.2.17.

I have just now reported this to DW Support and asked them to investigate further.

I hope this is a matter of misconfiguration :-/

 
Steffen Kruse Hansen Dynamicweb Employee
Steffen Kruse Hansen
Reply

Hi Jens and Nuno,

You see this problem because in 9.3.1 and below, there is a problem with the 'Negate' option, so no matter that you set it will always return 0 results. 
 

The problem has been fixed in 9.3.2, and if you are running on a package solution, you should just be able to update the package 'Dynamicweb.Indexing.Lucene' to version 1.0.12, and everything should work just fine.

 

Best regards

Steffen

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Steffen,

 

Thank you for confirming. That information is not in the release notes, so that makes it harder to find.

 

Best Regards,

Nuno

 

You must be logged in to post in the forum