If you need to upload csv files directly into solr (and they have a
reasonable amount of rows, i.e. not too much to lead an OOM in Solr)
Well, I'm used to loading them directly with a curl from a bash script.
It's something like this:
curl "http://solr.server:8983/solr/collection/update?commit=tru
: @Chris can you provide a sample Java code using ContentStreamUpdateRequest
: class?
I mean ... it's a SolrRequest like any other...
1) create an instante
2) add the File you want to add (or pass in some other ContentStream --
maybe StringStream if your CSV is already in memory)
3) process()
@Chris can you provide a sample Java code using ContentStreamUpdateRequest
class?
Le ven. 10 févr. 2023 à 19:22, Chris Hostetter a
écrit :
>
> : what is a common use case then if it is not the csv type?
> : how to index massively data into Solr using SolrJ
> : You can't just read line by line ea
As part of migration we converted csv data by creating multiple json files
each consisting around 100mb data and then wrote a small shell script to
inject these files through solr api in loop .
Just make sure when If you have multiple nodes then it might take some time
to get the replication done
: what is a common use case then if it is not the csv type?
: how to index massively data into Solr using SolrJ
: You can't just read line by line each dataset you want to index.
There are lots of usecases for using SolrJ that involve programaticlly
generating the SolrInputDocuments you wnat to
what is a common use case then if it is not the csv type?
how to index massively data into Solr using SolrJ
You can't just read line by line each dataset you want to index.
Le lun. 30 janv. 2023 à 14:11, Jan Høydahl a écrit :
> It's not a common use case for SolrJ to post plain CSV content to So
It's not a common use case for SolrJ to post plain CSV content to Solr. SolrJ
is used to push SolrInputDocument objects. Maybe there's a way to do it by
using some Generic request type and overriding content type.. Can you explain
more what you app will do, where that CSV file comes from in the
The Java code should perform the post. Any piece of code to show to better
explain this?
thanks
Le dim. 29 janv. 2023 à 20:29, Jan Høydahl a écrit :
> Read csv in your app, create a Solr doc from each line and ingest to Solr
> in fitting batches. You can use a csv library or just parse each lin
Read csv in your app, create a Solr doc from each line and ingest to Solr in
fitting batches. You can use a csv library or just parse each line yourself if
the format is fixed.
If you need to post csv directly to Solr you’d use a plain http post with
content-type csv, but in most cases your app
Hi guys,
I can't find a reference on how to index a dataset.csv file into Solr using
SolrJ.
https://solr.apache.org/guide/6_6/using-solrj.html
Thanks.
10 matches
Mail list logo