Developer forum

Forum » Ecommerce - Standard features » Summary field as String Array

Summary field as String Array

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I have a situation where I need to optimize the number of queries and I am considering using Summary fields for the purpose.

However, some of the fields I want to group, should be String Arrays. I have noticed that Summary fields are implicitly set as String.

Is there any way I can summarize a couple of Sting Array fields and still get the Sting Array behavior for the resulting Summary Field?

Thank you,

Adrian

 


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Adrian,

 

Why would you need to do so? If it's a summary field you'll lkely use a "Contains", in which case you don't need an Array of strings.

So, grouping/merging into a single field that shares the same boost and properties (Analyzed, Stored, Indexed) will definately help.

 

Best Regards,

Nuno Aguiar

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nuno,

You are right about the expression. But the Facet will need to display the individual values that are separated with a comma in some situations.

For example, in one of these fields, I would have "Value1,Value2" for Product 1 and "Value1" for Product2 . If the field is a plain String, the Facet option will display "Value1,Value2" as a single option and "Value1" as another single option. And I need to have 2 distinct options: "Value1" and "Value2".

Maybe I am thinking it wrong and there might be another approach to this.

Thank you,

Adrian

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Adrian,

 

Then you "don't want" a Summary field. In these cases I recommend you use an IndexBuilderExtender to create the arrays you want/need

 

Best Regards,

Nuno Aguiar

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nuno,

That's also my conclusion so far.

It does not look like I have any built-in options yet.

Thank you,

Adrian

 

You must be logged in to post in the forum