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 Mike O'Leary <tm...@uw.edu> on 2012/02/23 02:37:35 UTC

Do nested entities have a representation in Solr indexes?

The data-config.xml file that I have for indexing database contents has nested entity nodes within a document node, and each of the entities contains field nodes. Lucene indexes consist of documents that contain fields. What about entities? If you change the way entities are structured in a data-config.xml file, in what way (if any) does it change how the contents are stored in the index. When I created the entities I am using, and defined the fields in one of the inner entities to be multivalued, I thought that the fields of that entity type would be grouped logically somehow in the index, but then I remembered that Lucene doesn't have a concept of sub-documents (that I know of), so each of the field values will be added to a list, and the extent of the logical grouping would be that the field values that were indexed together would be at the same position in their respective lists. Am I understanding this right, or do entities as defined in data-config.xml have some kind of representation in the index like document and field do?
Thanks,
Mike

Re: Do nested entities have a representation in Solr indexes?

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Hello Mike,

Solr is too flat yet. Work is in progress
https://issues.apache.org/jira/browse/SOLR-3076
Good introduction is in Michael's blog
http://blog.mikemccandless.com/2012/01/searching-relational-content-with.htmlbut
it's only about Lucene Queries.
Colleague of my blogged about the same problem but solved it by an
alternative approach http://blog.griddynamics.com/search/label/Solr
Finally we give up with termspositions/spans and considering BJQ as a
solution.

Regards

On Thu, Feb 23, 2012 at 5:37 AM, Mike O'Leary <tm...@uw.edu> wrote:

> The data-config.xml file that I have for indexing database contents has
> nested entity nodes within a document node, and each of the entities
> contains field nodes. Lucene indexes consist of documents that contain
> fields. What about entities? If you change the way entities are structured
> in a data-config.xml file, in what way (if any) does it change how the
> contents are stored in the index. When I created the entities I am using,
> and defined the fields in one of the inner entities to be multivalued, I
> thought that the fields of that entity type would be grouped logically
> somehow in the index, but then I remembered that Lucene doesn't have a
> concept of sub-documents (that I know of), so each of the field values will
> be added to a list, and the extent of the logical grouping would be that
> the field values that were indexed together would be at the same position
> in their respective lists. Am I understanding this right, or do entities as
> defined in data-config.xml have some kind of representation in the index
> like document and field do?
> Thanks,
> Mike
>



-- 
Sincerely yours
Mikhail Khludnev
Lucid Certified
Apache Lucene/Solr Developer
Grid Dynamics

<http://www.griddynamics.com>
 <mk...@griddynamics.com>