Developer forum

Forum » Ecommerce - Standard features » Facets rendering each word separatly

Facets rendering each word separatly

Ivan Marijanović
Ivan Marijanović
Reply

Hi there

 we have isue in DW instalation that all facets render each word of filed as seprate value. For example we have atribute named "Screen printing" but in facet I get two values "screen" and "printing". How this can be avoided and also we would like to get values as entered and not smallcaped like in this example.

Thanx in advance.

Ivan


Replies

 
Mario Santos Dynamicweb Employee
Mario Santos
Reply
This post has been marked as an answer

Hi Ivan,

The field is being analyzed when indexed, you could either do not analyzed all fields or create a new index field based on the field you have right now and do not analyzed.
Take a look at documentation: https://doc.dynamicweb.com/documentation-9/platform/indexing-search/indexes

BR, Mario

 

Votes for this answer: 1
 
Ivan Marijanović
Ivan Marijanović
Reply

Thak you. This solved my problem. Could you point me to information is it possible not to render facets that have only one posible value.

 

Ivan

 
Nicolai Pedersen
Reply

Hi Ivan

The loop of facet options has a counter tag which = 1 if there is only one (*.LoopCounter). Or you can use LINQ in Razor:

foreach(LoopItem facetGroup in GetLoop("FacetGroups")) {
    foreach(LoopItem facet in facetGroup.GetLoop("Facets")) {
        if(facet.GetLoop("FacetOptions").Count()>1){
            foreach (LoopItem option in facet.GetLoop("FacetOptions"))
            {}
        }
    }
}

 

You must be logged in to post in the forum