Custom URL Hierarchical Menu

How can I re-format the URL based on Hierarchical Menu?

As well as to display different reifnement list depending on the category?

Hi @mgaytan!

The refinementList widget contains an attribute field that lets you filter on a given attribute in your record. This might be what you are looking for.

As for your first question, I’m sorry but I didn’t undestand what you meant. You would mind rephrasing it please?

No I’m looking to have different filters with different “categories” from the menu.

For Example:

Categories

  • Item 1
  • Item 2
  • Item 3

If I click on Item 1
I would like for a

  • Range Slider
  • REfinementList w/ attribute=“size”

If i click on Item 2
I would like for a

  • REfinementList w/attribute=“Length”
  • REfinementList w/attribute=“Depth”

and so on and so forth…

IS this even possible?

Hi there,

I’m Dorian, software engineer at Algolia.

Looking at our refinement list documentation and at the live examples I don’t think it’s something that is built-in in instantsearch. You would have to use a custom view to build something like this.

However, I’m not sure I understand the practicality of this: what would be a typical use-case where you would need to have different facets based on different selected items?

Also bear in mind that usually what is displayed in a refinement list comes from the search engine so it can’t be really known in advance. In our examples we use brand names (Apple, Samsung etc.) in our refinement list, let’s say you have some facets for Apple and some others for Samsung, what happens when you start having products from other manufacturers in your index? Do you have default facets in that case?

Another difficulty is what happens if 2 different items are selected at the same time? If they need different facets, which facets do you display? all of them? only some of them?

I hope this helps in your reflection, feel free to ask further questions,

Cheers,

How could I build a custom view?

It would work because you can only select one category at a time. I currently have the hierarchical menu that way with the custom router on the Documentation. But is there a way when its getting or building the path, that I can send the category to another function in angular?

We call this “Dynamic faceting”.

You can find a few resources online, that you’ll need to adapt to Angular InstantSearch :