2009/4/13 Vincent Pérès <vincent.pe...@gmail.com> > > <dataConfig> > <dataSource > type="JdbcDataSource" driver="com.mysql.jdbc.Driver" > url="jdbc:mysql://localhost:33061/completelynovel" user="root" password="" > /> > <document name="books"> > <entity name="book" pk="ID" query="select isbn, listing_id AS id, title, > publisher_name, author_name AS author_name_s from amazon_books where > publisher_name IS NOT NULL AND author_name IS NOT NULL LIMIT 0, 10"> > <field column="ID" name="id" /> > <field column="ISBN" name="isbn" /> > <field column="TITLE" name="title" /> > <field column="PUBLISHER_NAME" name="publisher_name" /> > <field column="AUTHOR_NAME_S" name="author_name_s" /> > <entity name="book_category" pk="id" query="SELECT abn.name AS cat, > ab.isbn AS isbn_temp FROM (amazon_books AS ab LEFT JOIN > amazon_book_browse_nodes AS abbn ON ab.isbn = abbn.amazon_book_id) LEFT > JOIN > amazon_browse_nodes AS abn ON abbn.amazon_browse_node_id = abn.id WHERE > ab.isbn = '${book.ISBN}'"> > <field column="cat" name="cat" /> > </entity> > </entity> > </document> > </dataConfig> > > > Ten fields are well created... but without the 'cat' multi value field.
Just a guess, try ${book.isbn} instead Does you sql return the column names in capitals? If you are using trunk, you do not need to specify upper-case to lower-case mapping in data-config. Infact the "<field>" mapping is not required at all if your schema has a field with the same name as returned by SQL. DataImportHandler will populate it with the value, irrespective of case. Also, if you intend to facet on 'cat', you should probably use a non-tokenized field type in the schema such as string. Faceting is performed on the indexed value rather than the stored value. -- Regards, Shalin Shekhar Mangar.