There aren't any great general purpose out of the box ways to handle
hieararchical data in Solr. Solr isn't an rdbms.
There may be some particular advice on how to set up a particular Solr
index to answer particular questions with regard to hieararchical data.
I saw a great point made recently comparing rdbms to NoSQL stores, which
applied to Solr too even though Solr is NOT a "noSQL store". In rdbms,
you set up your schema thinking only about your _data_, and modelling
your data as flexibly as possible. Then once you've done that, you can
ask pretty much any well-specified question you want of your data, and
get a correct and reasonably performant answer.
In Solr, on the other hand, we set up our schemas to answer particular
questions. You have to first figure out what kinds of questions you will
want to ask Solr, what kinds of queries you'll want to make, and then
you can figure out how to structure your data to ask those questions.
Some questions are actually very hard to set up Solr to answer -- in
general Solr is about setting up your data so whatever question you have
can be reduced to asking "is token X in field Y".
This can be especially tricky in cases where you want to use a single
Solr index to answer multiple questions, where the questions are such
that you really need to set up your data _differently_ to get Solr to
optimally answer each question.
Solr is not a general purpose store like an rdbms, where you can set up
your schema once in terms of your data and use it to answer nearly any
conceivable well-specified question after that. Instead, Solr does
things that rdbms can't do quickly or can't do at all. But you lose
some things too.
On 1/24/2011 3:03 AM, Damien Fontaine wrote:
Hi,
I am trying Solr and i have one question. In the schema that i set up,
there are 10 fields with always same data(hierarchical taxonomies) but
with 4 million
documents, space disk and indexing time must be big. I need this field
for auto complete. Is there another way to do this type of operation ?
Damien