I am writing an application that is looking for solr 3.4. To populate the solr index, I use dataimporthandler and the class com.microsoft.sqlserver.jdbc.SQLServerDriver to retrieve data from the MS SQL database.
Now I am trying to call a stored procedure in the database, but the solr log always returns errors:
Full Import failed:org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: exec dbo.h_getThumbnails @h = '52' Processing Document
Ive tried different versions for calling a stored procedure. Here are the requests:
<entity name="PicturePath" processor="CachedSqlEntityProcessor" query="exec dbo.h_getThumbnails @h = 4 "> </entity> <entity name="PicturePath" processor="CachedSqlEntityProcessor" query="call dbo.h_getThumbnails @h = 4 "> </entity> <entity name="PicturePath" processor="CachedSqlEntityProcessor" query=" dbo.h_getThumbnails @h = 4 "> </entity>
Does anyone know how to call a stored procedure from solr? Or does anyone know where I should look for a reason?
Thanks so much for all your answers!
sql sql-server-2008 stored-procedures solr
Hw90
source share