Sorry for opening a new thread. As i sent first message w/o subscribing the
mailing list, i couldn't find a possible solution to reply original thread.
The messaging stream is attached below.


Actually the requirement came up from such a scenario: We collect some xml
documents from some external resources and need to parse those xml docs and
index some part of them. But those xml docs have different roots and
attributes in. So we generate all possible classes for each root type via
JAXB. As each document have different informative values, each of them
should be indexed into seperate solr instances. The module we wrote simply
generates a solr schema template with respect to all aggregative objects in
root object (recursively) except annotation @SolrIndexIgnore owners. And
also we are able to generate a SolrDocument from given object and index it
to specified solr instance. While retrieving results from solr, we generate
a list of this object's, from SolrDocument instances. Hibernate
configuration for Lucene indexing is a bit different i thought, as we are
able to generate solr-schema from given object.

Best.





-----Original Message----- From: Tuğcem Oral
Sent: Tuesday, June 04, 2013 8:57 AM
To: solr-user@lucene.apache.org
Subject: Solr - ORM like layer

Hi folks,

I wonder that there exist and ORM like layer for solr such that it
generates the solr schema from given complex object type and index given
list of corresponding objects. I wrote a simple module for that need in one
of my projects and happyly ready to generalize it and contribute to solr,
if there's not such a module exists or in progress.

Thanks all.

--
TO

Solr doesn't support complex objects directly - you must flatten and
otherwise denormalize them. If you do want to store something like a graph
in Solr, make each node a separate document (and try to avoid the
temptation to play games with dynamic and multivalued fields).

But if you have a tool to automatically flatten and denormalize complex
objects and graphs and database joins, great. Please describe what it
actually does in a little more (but not excessive) detail.

-- Jack Krupansky

-----Original Message----- From: Tuğcem Oral
Sent: Tuesday, June 04, 2013 8:57 AM
To: solr-user@lucene.apache.org
Subject: Solr - ORM like layer

Hi folks,

I wonder that there exist and ORM like layer for solr such that it
generates the solr schema from given complex object type and index given
list of corresponding objects. I wrote a simple module for that need in one
of my projects and happyly ready to generalize it and contribute to solr,
if there's not such a module exists or in progress.

Thanks all.

-- 
TO


If by ORM you mean Object Relational Mapping, Hibernate has annotations for
Lucene and if my memory doesn't betray me I think you can configure a Solr
server at Hibernate config.

I have successfully mapped POJO's to Lucene and done text search, it all
happens like magic once your annotations and configuration is right.

Hope that helps,

Guido.

On 04/06/13 13:57, Tuğcem Oral wrote:

> Hi folks,
>
> I wonder that there exist and ORM like layer for solr such that it
> generates the solr schema from given complex object type and index given
> list of corresponding objects. I wrote a simple module for that need in one
> of my projects and happyly ready to generalize it and contribute to solr,
> if there's not such a module exists or in progress.
>
> Thanks all.


-- 
TO

Reply via email to