This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Install & configuration » DB tables linking contentobject to...
expandshrink

DB tables linking contentobject to meta attribute

DB tables linking contentobject to meta attribute

Wednesday 13 August 2014 1:00:03 pm - 2 replies

Hi,

I'm trying to figure out how a contentobject, e.g. an article, is linked to a meta attribute such as those used to refine search results.

I've been trying to find my way using the DB docs https://doc.ez.no/schemadoc-440/ but no joy.

Is anyone able to tell me how these are associated?

Thanks

Thursday 14 August 2014 10:53:19 am

If you can refine search results, you are most likely using ezfind (solr), which uses a dedicated index, outside of the database.

In eZ, content is mainly stored in 6 tables: classes, class_attributes, objects, object_versions, object_attributes and nodes.

In the solr index, each object attribute is stored, based on its type (eg string, xmltext, etc...), plus a lot of other object metadata. The mapping is done by php code in the ezfind extension. For object attributes, the mapping is flexible: you can configure custom mappers that e.g. take a single eZ attribute (say, a location) and turn it into 2 solr fields (lat, long).

Connecting to the solr admin console (http://localhost:8983/solr/admin by default) and using it to examine the structure of content stored in it is very instructive.

Thursday 14 August 2014 10:57:57 am

ps: if otoh what you are interested are the object metadata as available in (legacy) template code, then you have to look at the ezpersistentobject php class - which is the eZ ORM workhorse.

In short: all subclasses of ezpersistentobject have a list of "attributes". Some of those are mapped on the fields of a db table, some other are generated on access via a function call. The method named "definition" is where the description of such attributes is done.

So in template $node.parent is mapped to $node->attribute('parent'); in php, which in turn calls $this->fetchParent()

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from