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 Pooja Verlani <po...@gmail.com> on 2009/08/31 13:56:04 UTC
Hierarchical schema design
Hi all,
Is there a possibility to have a hierarchical schema in solr, meaning can we
have objects under objects.
For example, for a doc like:
<doc>
<a1>
<b1>
<b2>
<b3>
</a1>
<a2>
<b1>
<b2>
,b3>
</a2>
.
.
.
.
.
.
.
</doc>
I need to make schema with 3 types of such objects and all of them having
different field values for each.
Please reply if there exists such a possibility.
Regards.
Pooja
Re: Hierarchical schema design
Posted by Avlesh Singh <av...@gmail.com>.
As Uri has already replied, there is no concept of "a hierarchical schema"
in Solr.
My gut feeling says you might be talking about Multiple
cores<http://www.google.co.in/search?q=multiple+core+solr&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a>
.
Cheers
Avlesh
On Mon, Aug 31, 2009 at 5:26 PM, Pooja Verlani <po...@gmail.com>wrote:
> Hi all,
> Is there a possibility to have a hierarchical schema in solr, meaning can
> we
> have objects under objects.
> For example, for a doc like:
> <doc>
> <a1>
> <b1>
> <b2>
> <b3>
> </a1>
> <a2>
> <b1>
> <b2>
> ,b3>
> </a2>
> .
> .
> .
> .
> .
> .
> .
> </doc>
>
> I need to make schema with 3 types of such objects and all of them having
> different field values for each.
>
> Please reply if there exists such a possibility.
>
> Regards.
> Pooja
>
Re: Hierarchical schema design
Posted by Uri Boness <ub...@gmail.com>.
Hi,
The search index is flat. There are no hierarchies in there. Now, I'm
not sure what you're referring to with "this type of objects". But if
you refer to having different types of documents in one index (and
schema) that's certainly possible. You can define all the fields that
you expect in all the different document types in one schema and have
one special field (called "type") to distinguish between the document
types (it will hold a unique value for each document type). The only
drawback of this solutions is that you cannot (in most cases) define the
fields as required. Another solution would be to deploy the different
documents on different core, where each core has its own schema (and
index). The drawback here however is that you will not be able to search
across the different document types.
Cheers,
Uri
Pooja Verlani wrote:
> Hi all,
> Is there a possibility to have a hierarchical schema in solr, meaning can we
> have objects under objects.
> For example, for a doc like:
> <doc>
> <a1>
> <b1>
> <b2>
> <b3>
> </a1>
> <a2>
> <b1>
> <b2>
> ,b3>
> </a2>
> .
> .
> .
> .
> .
> .
> .
> </doc>
>
> I need to make schema with 3 types of such objects and all of them having
> different field values for each.
>
> Please reply if there exists such a possibility.
>
> Regards.
> Pooja
>
>