I've figured out, that this wrong categorization comes when doing an Delta import...
I'm doing the delta import as described her: http://wiki.apache.org/solr/DataImportHandlerDeltaQueryViaFullImport my data-properties.xml looks like: <dataConfig> <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://la/ekd " user="xxx " password="xxxx"/> <document> <entity name="id" query="select p.title as title, p.id, p.category_id, p.pic_thumb, c.name as category, c.id as category_id from product p, category c WHERE p.category_id = c.id AND '${dataimporter.request.clean}' != 'false' OR updated_at > '${dataimporter.last_index_time}' "> </entity> </document> </dataConfig> So I run the delta import command like: http://localhost:8983/solr/core0/dataimport?command=full-import&clean=false If I do this... the categories are set wrong as described below. If I do a full import with http://localhost:8983/solr/core0/dataimport?command=full-import&clean=true and delete the index previously, than categorization is correct. Is there somewhere an caching issue? Thanks, Ramo -----Ursprüngliche Nachricht----- Von: Gora Mohanty [mailto:g...@mimirtech.com] Gesendet: Dienstag, 17. April 2012 11:34 An: solr-user@lucene.apache.org Betreff: Re: Wrong categorization with DIH On 17 April 2012 14:47, Ramo Karahasan <ramo.karaha...@googlemail.com> wrote: > Hi, > > > > i currently face the followin issue: > > Testing the following sql statement which is also used in SOLR (DIH) > leads to a wrong categorization in solr: > > select p.title as title, p.id, p.category_id, p.pic_thumb, c.name as > category, c.id as category_id from product p, category c WHERE > p.category_id = c.id AND p.id = 3091328 > > > > This returns in my sql client: > > Apple MacBook Pro MD313D/A 33,8 cm (13,3 Zoll) Notebook (Intel Core > i5-2435M, 2,4GHz, 4GB RAM, 500GB HDD, Intel HD 3000, Mac OS), 3091328, > 1003, http://m-d.ww.cdn.com/images/I/41teWbp-uAL._SL75_.jpg, Computer, > 1003 > > > > As you see, the categoryid 1003 points to "Computer" > > > > Via the solr searchadmin i get the following result when searchgin for > id:3091328 > > <str name="category">Sport</str> > > <int name="category_id">1003</int> [...] Please share with us the rest of the DIH configuration file, i.e., the part where these data are saved to the Solr index. Regards, Gora