lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From penela <pen...@gmail.com>
Subject Accessing a doc field while working at entity level
Date Mon, 05 Sep 2011 12:02:00 GMT
Hi!

This might probably be a stupid question, but I can't find clear info on how
to do it (sorry if it is too obvious).

I have a the following document configuration (only key elements shown) with
two entities, one embedded into the other:
<dataConfig>
    <dataSource type="URLDataSource" name="rss-ds" />
    <dataSource type="JdbcDataSource" name="db-ds" driver="com........" /> 
    <document>
		<entity name="feed-source"
				dataSource="db-ds"
                                ...
				rootEntity="false">
			<field column="last-update" dateTimeFormat="yyyy-MM-dd HH:mm:ss"
locale="en"  />
			
			<entity name="feed-content" dataSource="rss-ds"
					pk="link"	                
	                ...
	                transformer="DateFormatTransformer, DummyTransformer">

	            <field column="timestamp" xpath="/rss/channel/item/pubDate"
dateTimeFormat="EEE, dd MMM yyyy HH:mm:ss z" locale="en"  />     
	        </entity>
        </entity>
    </document>
</dataConfig>

What I want to do is accessing the outer entity field "last-update" while
I'm in the inner entity Transformer DummyTransformer. Debugging with Eclipse
it looks like that data is correctly stored during runtime on the Context
variable passed as parameter to the Transformer in: context.doc.fields

So the question is: Is there any way to access higher level entities' fields
while in an embedded entity? Or document fields at least?

Thanks!
-VĂ­ctor

--
View this message in context: http://lucene.472066.n3.nabble.com/Accessing-a-doc-field-while-working-at-entity-level-tp3310680p3310680.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message