Hierarchical Maze Solr. An example is needed

I am new to solr. I want to implement a hierarchical cut in my application. I went through http://wiki.apache.org/solr/HierarchicalFaceting , and also to prepare the correct xml.

I need to move the XML to solr for indexing, and it should show the expected results, as shown in the solr wiki.

Problem: I do not understand how I should specify facet fields in the solrconfig / schema file, as well as in the xml to be published. If someone out there can provide me with a configuration example, that would be great. I would like to do this, since it performs on the hierarchical wiki solr above.

It seems like a newbie here, but I'm stuck.

Ref Document -

<add> <doc> <field name="id">4</field> <field name="0/NonFic">General</field> <field name="1/NonFic/Law">Rules</field> <field name="1/NonFic/Sci">Chemistry</field> <field name="1/NonFic/Sci">Physics</field> </doc> </add> 

Thanks 89neuron

+1
source share
1 answer

There is no configuration difference for Solr Pivots , and they do not need special configuration.

When XML data is configured as a single field field or a multi-valued field.

Configure the fields as in multi-valued fields in string format, if necessary.
E.g. the field for the country and state will consist of two fields.

Only during the search you need to go through facet.pivot=country,state to get the edges of the Hierarchy.

 <add> <doc> <field name="id">4</field> <field name="country">US</field> <field name="country">India</field> <field name="state">mumbai</field> <field name="state">Nevada</field> </doc> </add> 
+1
source

Source: https://habr.com/ru/post/986579/


All Articles