Hi Alex,

Thanks very much for your reply and pointers.
That didn't work I'm afraid..

I'll try to see if sql server supports a conversion function.

Regards,
-- Savvas

On 6 September 2010 15:49, Alexey-34 [via Lucene] <
ml-node+1426936-1702828919-54...@n3.nabble.com<ml-node%2b1426936-1702828919-54...@n3.nabble.com>
> wrote:

>
> http://wiki.apache.org/solr/DataImportHandlerFaq#Blob_values_in_my_table_are_added_to_the_Solr_document_as_object_strings_like_B.401f23c5
>
> Try to add convertType attribute to dataSource declaration, i.e.
>  <dataSource type="JdbcDataSource"
>   name="mssqlDatasource"
>   driver="net.sourceforge.jtds.jdbc.Driver"
>   url="jdbc:jtds:sqlserver://{db.host}:1433/{db};instance=SQLEXPRESS"
>   user="{username}"
>   password="{password}"
>
>   convertType="true"
> />
>
> HTH,
> Alex
>
> On Mon, Sep 6, 2010 at 5:49 PM, savvas.andreas
> <[hidden email] <http://user/SendEmail.jtp?type=node&node=1426936&i=0>>
> wrote:
>
> >
> > Hello,
> >
> > I am trying to index some data stored in an SQL Server database through
> DIH.
> > My setup in data-config.xml is the following:
> >
> > <dataConfig>
> >  <dataSource type="JdbcDataSource"
> >                          name="mssqlDatasource"
> >              driver="net.sourceforge.jtds.jdbc.Driver"
> >
> > url="jdbc:jtds:sqlserver://{db.host}:1433/{db};instance=SQLEXPRESS"
> >              user="{username}"
> >              password="{password}"/>
> >  <document>
> >    <entity name="id"
> >                        dataSource="mssqlDatasource"
> >            query="select id,
> >                        title
> >                        from WORK">
> >                        <field column="id" name="id" />
> >                        <field column="title" name="title" />
> >    </entity>
> >  </document>
> > </dataConfig>
> >
> > However, when I run the indexer (invoking
> > http://127.0.0.1:8983/solr/admin/dataimport.jsp?handler=/dataimport) I
> get
> > all the rows in my index but with incorrect data indexed.
> >
> > More specifically, by examining the top 10 terms for the title field I
> get:
> >
> > term    frequency
> > impl    1241371
> > jdbc    1241371
> > net     1241371
> > sourceforg      1241371
> > jtds    1241371
> > clob    1241371
> > netsourceforgejtdsjdbcclobimpl  1186981
> > c       185070
> > a       179901
> > e       160759
> >
> > which is clearly wrong..Does anybody know why Solr is indexing the jdbc
> > properties instead of the actual data?
> >
> > Any pointers would be much appreciated.
> >
> > Thank you very much.
> > -- Savvas
> > --
> > View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-is-indexing-jdbc-properties-tp1426473p1426473.html<http://lucene.472066.n3.nabble.com/Solr-is-indexing-jdbc-properties-tp1426473p1426473.html?by-user=t>
> > Sent from the Solr - User mailing list archive at Nabble.com.
> >
>
>
> ------------------------------
>  View message @
> http://lucene.472066.n3.nabble.com/Solr-is-indexing-jdbc-properties-tp1426473p1426936.html
> To unsubscribe from Solr is indexing jdbc properties, click 
> here<http://lucene.472066.n3.nabble.com/template/TplServlet.jtp?tpl=unsubscribe_by_code&node=1426473&code=c2F2dmFzLmFuZHJlYXMubW95c2lkaXNAZ29vZ2xlbWFpbC5jb218MTQyNjQ3M3wxMTY1Njc5ODAy>.
>
>
>

-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-is-indexing-jdbc-properties-tp1426473p1427034.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to