On Aug 24, 2012, at 9:17 AM, Hasan Diwan wrote:

> <dataConfig>
>    <dataSource type="JdbcDataSource" driver="org.h2.Driver"
> url="jdbc:h2:tcp://192.168.1.6/finance" user="sa" />
>    <document>
>      <entity name="receipt" query="select location as location, amount as
> amount, done_on as when from RECEIPTS as r join APP_USERS as a on r.user_id
> = a.id"/>
>    </document>
> </dataConfig>
> 
> and I've added the appropriate fields to schema.xml:
>  <field name="location" type="string" indexed="true" stored="true"/>
>   <field name="amount" type="currency" indexed="true" stored="true"/>
>   <field name="when" type="date" indexed="true" stored="true"/>
> 
> There's nothing in my index and 343 rows in my table. What is going on? -- H


I don't see that you have anything in the DIH that tells what columns from the 
query go into which fields in the index.  You need something like

<field name="location" column="location" />
<field name="amount" column="amount" />
<field name="when" column="when" />

xoa

--
Andy Lester => a...@petdance.com => www.petdance.com => AIM:petdance

Reply via email to