You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Darniz <rn...@edmunds.com> on 2015/06/26 12:46:54 UTC
need advice on parent child mulitple category
hello all
i need some best practice advice on nested categories i have a atom file
which i am going to index in solr. The file has the below categorization as
you can see below.
the first four category comparison test, honda , kia and sedan are parent
level
Then the next two Civic is a child of Honda and Rio is a child of kia
Then the next two 2015 is child of Civic and 2015 is a child of Rio
<feed>
<title> comparison road test between honda 2015 and kia rio 2015</title>
<category name="Comparison Test">
<category name="Honda">
<category name="Kia">
<category name="Sedan">
<category name="Civic" parent="Honda">
<category name="Rio" parent="Kia">
<category name="2015" parent="Civic">
<category name="2015" parent="Rio">
</feed>
i was planning to store in solr the above categorization as
<doc>
<title> comparison road test between honda 2015 and kia rio 2015</title>
<cat1>Comparison Test, Honda, Sedan, Kia</cat1>
<cat2>Civic, Rio</cat2>
<cat3>2015<cat3>
</doc>
so far so good
but i came across the following issue suppose if i have one more feed
<feed>
<title> 2015 Honda Accord Maintenance</title>
<category name="Maintenance">
<category name="Honda">
<category name="Accord" parent="Honda">
<category name="2015" parent="Accord">
<category name="Sedan">
</feed>
and for this my solr doc is
<doc>
<title>2015 Honda Accord Maintenance</title>
<cat1>Maintenance, Honda, Sedan</cat1>
<cat2>Accord</cat2>
<cat3>2015<cat3>
</doc>
when i display the facets at cat1 level i see
Comparison Test(1)
Honda(2)
Sedan (2)
Kia(1)
Maintenance(1)
Once a user clicks Honda then our query will be cat1:Honda and facets on
cat2 will show
Civic
Rio
Accord
as you can see Rio is not correct the fact which makes it complicated is
many to many category mappings.
any idea how to solve this.
--
View this message in context: http://lucene.472066.n3.nabble.com/need-advice-on-parent-child-mulitple-category-tp4214140.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: need advice on parent child mulitple category
Posted by Mikhail Khludnev <mk...@griddynamics.com>.
http://wiki.apache.org/solr/HierarchicalFaceting
On Mon, Jun 29, 2015 at 11:27 AM, Darniz <rn...@edmunds.com> wrote:
> hello
>
> any advice please
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/need-advice-on-parent-child-mulitple-category-tp4214140p4214602.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
--
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics
<http://www.griddynamics.com>
<mk...@griddynamics.com>
Re: need advice on parent child mulitple category
Posted by Darniz <rn...@edmunds.com>.
hello
any advice please
--
View this message in context: http://lucene.472066.n3.nabble.com/need-advice-on-parent-child-mulitple-category-tp4214140p4214602.html
Sent from the Solr - User mailing list archive at Nabble.com.