Solr associations
Posted
by Tom
on Stack Overflow
See other posts from Stack Overflow
or by Tom
Published on 2010-04-22T08:56:54Z
Indexed on
2010/04/22
9:13 UTC
Read the original article
Hit count: 368
Hi all,
The last couple of days we are thinking of using Solr as our search engine of choice. Most of the features we need are out of the box or can be easily configured. There is however one feature that we absolutely need that seems to be well hidden (or missing) in Solr.
I'll try to explain with an example. We have lots of documents that are actually businesses:
<document>
<name>Apache</name>
<cat>1</cat>
...
</document>
<document>
<name>McDonalds</name>
<cat>2</cat>
...
</document>
In addition we have another xml file with all the categories and synonyms:
<cat id=1>
<name>software</name>
<synonym>IT<synonym>
</cat>
<cat id=2>
<name>fast food</name>
<synonym>restaurant<synonym>
</cat>
We want to associate both businesses and categories so we can search using the name and/or synonyms of the category. But we do not want to merge these files at indexing time because we should update the categories (adding.remioving synonyms...) without indexing all the businesses again.
Is there anything in Solr that does this kind of associations or do we need to develop some specific pieces?
All feedback and suggestions are welcome.
Thanks in advance, Tom
© Stack Overflow or respective owner