2
votes

I have setup Solr to index data from Oracle DB through DIH handler. However through Solr admin I could see the DB connection is successfull, data retrieved from DB to Solr but not added into index. The message is that "0 documents added" even when I am able to see that 9 records are returned back.

The schema and fields in db-data-config.xml are one and the same.

Please suggest if anything I should look for.

1

1 Answers

0
votes

Did you do a full import by hitting http://HOST:PORT/solr/CORE/dataimport?command=full-import? Then the commit should happen by default. You can also try committing on full import explicitly by hitting http://HOST:PORT/solr/CORE/dataimport?command=full-import&commit=true.

Hit http://HOST:PORT/solr/CORE/select?q=*:* and check if you get 9 docs back.

However, if you are running a delta import, then there is a possibility that no documents were changed and you may see 0 docs added/deleted.

If you want to delete the existing Solr index before starting, hit http://HOST:PORT/solr/CORE/update?stream.body=<delete><query>*:*</query></delete>&commit=true and then do a full import & verify.