Gravatar for changping.peng@avanade.com

Question by helen, Sep 6, 2017 10:06 AM

Facets Component lists all the facets even number of facets is greater than data-number-of-values

facets.pdf

Hi Team,

I run into a scenario on Facet component and please share your comments.

I set data-number-of-values = 5 and results return 7 facets. In this case, it does not show the last 2 facets group name : <year> and <type>. Instead, it shows all the facets belong to <year> and <type>.

When i click on collapse button for group 5 <Fuel>, it only hide facets under group <Fuel> not the other items from <year> and <type>.

In this way, user will get confused and they may expect hide all the items under <Fuel>, <year> and <type>.

Expect : Wonder if we'd better to hide <Year> and <type> no matter to click collapse button on <Fuel> or not

Coveo for sitecore version : 4.0.1088.0

Regards,

Helen

1 Reply
Gravatar for slangevin@coveo.com

Answer by Simon, Sep 6, 2017 5:24 PM

Not sure I understand the question in full, but from your pdf I understand that 5 values when you set the data-number-of-values to 5, and 7 when you set it to 10.

If you have, let's say, 20 possible values for a field in your index, the data-number-of-values attribute will simply put a limit of 10 with the possibility to expand if the expand/collapse button is active.

However the facets are dynamics, which means that if the query returns content which have data in only 7 out of the 20 values, only the 7 values will be shown. The data-number-of-values attribute will simply preserve the limit.

As for the collapse button, the behavior is to collapse only the selected facet.
You could however create a "master collapse" button which would trigger the collapse method of all the facets shown on the search interface.

Gravatar for changping.peng@avanade.com

Comment by helen, Sep 7, 2017 12:14 PM

Hi Simon,

Thanks for your explanation.

Let me try this way:

When we set data-number-of-values = 5, the collapse button on group 5 only hide 2 facets under group 5, the facet group 6 and 7 are still there.

Please refer to facets2.pdf. facets2.pdf

Regards,

Helen

Gravatar for changping.peng@avanade.com

Comment by helen, Sep 25, 2017 4:22 PM

Hi team,

May I kindly ask for any update ? Thanks!

Regards,

Helen

Gravatar for changping.peng@avanade.com

Comment by helen, Sep 27, 2017 4:27 PM

Hi Jean,

Good suggestion. I have validated html the page.

https://validator.w3.org/nu/?doc=http%3A%2F%2Fiauthor.rfwfsearch2.6devint.honeywell.com%2Fall-categories%2Fbackup-power%2Finverter-generators

The html validator highlighted meta data only. After this line was removed , the html is fine. I wonder if we can have a lync call about this issue. I am in CST timezone (UCT +8). Thanks!

<strong><meta name="viewport" content="width=device-width, target-densityDpi=device-dpi, initial-scale=1, user-scalable=no" /></strong>

Regards,

Helen

Ask a question