Hi,
I think you can define field names in the first line of csv. Why don't you use
curl to index csv?
I don't have full working example with DIH but I have following example that
indexed every line as a separate solr scoument.
You need to add a transformer that splits each line according to comma.
<dataConfig>
<dataSource type="FileDataSource" encoding="UTF-8" name="fds"/>
<document>
<entity name="f" processor="FileListEntityProcessor" fileName=".*txt"
baseDir="/Volumes/data/Documents" recursive="false" rootEntity="false"
dataSource="null" transformer="TemplateTransformer" >
<entity onError="skip" name="jc" processor="LineEntityProcessor"
url="${f.fileAbsolutePath}" dataSource="fds" rootEntity="true"
transformer="TemplateTransformer">
<field column="link"
template="hello${f.fileAbsolutePath},${jc.rawLine}" />
<field column="rawLine" name="rawLine" />
</entity>
</entity>
</document>
</dataConfig>
On Friday, October 10, 2014 12:26 AM, nabil Kouici <[email protected]> wrote:
Hi Ahmet,
Thank you for this replay. Agree with you that csv update handler is fast but
we need always to specify columns in the http request. In addition, I don't
find documentation how to use csv update from solrj.
Could you please send me an example of DIH to load CSV file?
Regards,
Nabil.
Le Jeudi 9 octobre 2014 21h05, Ahmet Arslan <[email protected]> a écrit
:
Hi Nabil,
whats wrong with csv update handler? It is quite fast.
By the way DIH has line entity processor, yes it is doable with existing DIH
components.
Ahmet
On Thursday, October 9, 2014 9:58 PM, nabil Kouici <[email protected]> wrote:
Hi All,
Is it possible to have in solr a DIH to load from CSV file. Actually I'm using
update/csv handler but not responding to my need.
Regards,
NKI.