Yes, it looks like I had left off the field (misspelled it actually). I reran the full import and the fields did properly show up. However, it is still not working as expected. Using the example below, a result returned would only list one specie instead of a list of species. I have the following in my schema.xml file:
<field column="specie" multiValued="true" name="specie" type="string" indexed="true" stored="true" required="false" /> I reran the fullimport but it is still only listing one specie instead of multiple. Is my above declaration incorrect? On Tue, Mar 1, 2011 at 3:41 AM, Stefan Matheis < matheis.ste...@googlemail.com> wrote: > Brian, > > except for your sql-syntax error in the specie_relations-query "SELECT > specie_id FROMspecie_relations .." (missing whitespace after FROM) > your config looks okay. > > following questions: > * is there a field named specie in your schema? (otherwise dih will > silently ignore it) > * did you check your mysql-query log? to see which queries were > executed and what their result is? > > And, just as quick notice .. there is no need to use <field > column="foo" name="foo"> (while both attribute have the same value). > > Regards > Stefan > > On Mon, Feb 28, 2011 at 9:52 PM, Brian Lamb > <brian.l...@journalexperts.com> wrote: > > Hi all, > > > > I was able to get my dataimport to work correctly but I'm a little > unclear > > as to how the entity within an entity works in regards to search results. > > When I do a search for all results, it seems only the outermost responses > > are returned. For example, I have the following in my db config file: > > > > <dataConfig> > > <dataSource type="JdbcDataSource" name="mystuff" batchSize="-1" > > driver="com.mysql.jdbc.Driver" > > > url="jdbc:mysql://localhost/db?characterEncoding=UTF8&zeroDateTimeBehavior=convertToNull" > > user="user" password="password"/> > > <document> > > <entity name="animal" dataSource="mystuff" query="SELECT * FROM > > animals"> > > <field column="id" name="id" /> > > <field column="type" name="type" /> > > <field column="genus" name="genus" /> > > > > <!-- Add in the species --> > > <entity name="specie_relations" dataSource="mystuff" query="SELECT > > specie_id FROM specie_relations WHERE animal_id=${animal.id}"> > > <entity name="species" dataSource="mystuff" query="SELECT specie > > FROM species WHERE id=${specie_relations.specie_id}"> > > <field column="specie" name="specie" /> > > </entity> > > </entity> > > </entity> > > </document> > > </dataSource> > > </dataConfig> > > > > However, specie never shows up in my search results: > > > > <doc> > > <str name="type">Mammal</str> > > <str name="id">1</str> > > <str name="genus">Canis</str> > > </doc> > > > > I had hoped the results would include the species. Can it? If so, what is > my > > malfunction? > > >