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