You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by troya <ad...@gmail.com> on 2012/08/14 05:32:14 UTC
Indexing thousands file on solr
HI All,
I have thousands file on some folder which i want to index using solr.
Firstly my file only 9 until 20 file, so i upload them manually into solr
using curl.
But Now, my file is thousands file, how i can index it using solr ? should i
upload them one by one ?
i've tried using curl command like bellow :
java -Durl=http://localhost:8906/solr/update/extract?literal.id=PPN
-Dtype=text/html -jar post.jar *.htm
But when i search it, only one file appear.Not all of them.
Help me to solve this
Thanks
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-thousands-file-on-solr-tp4001050.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Indexing thousands file on solr
Posted by Jack Krupansky <ja...@basetechnology.com>.
The new 4.0 branch has a greatly improved post tool that handles directories
for SolrCell. And it will generate the default IDs for you.
See:
http://wiki.apache.org/solr/ExtractingRequestHandler#SimplePostTool_.28post.jar.29
-- Jack Krupansky
-----Original Message-----
From: troya
Sent: Monday, August 13, 2012 11:32 PM
To: solr-user@lucene.apache.org
Subject: Indexing thousands file on solr
HI All,
I have thousands file on some folder which i want to index using solr.
Firstly my file only 9 until 20 file, so i upload them manually into solr
using curl.
But Now, my file is thousands file, how i can index it using solr ? should i
upload them one by one ?
i've tried using curl command like bellow :
java -Durl=http://localhost:8906/solr/update/extract?literal.id=PPN
-Dtype=text/html -jar post.jar *.htm
But when i search it, only one file appear.Not all of them.
Help me to solve this
Thanks
--
View this message in context:
http://lucene.472066.n3.nabble.com/Indexing-thousands-file-on-solr-tp4001050.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Indexing thousands file on solr
Posted by Gora Mohanty <go...@mimirtech.com>.
On 14 August 2012 09:02, troya <ad...@gmail.com> wrote:
> HI All,
>
> I have thousands file on some folder which i want to index using solr.
> Firstly my file only 9 until 20 file, so i upload them manually into solr
> using curl.
>
> But Now, my file is thousands file, how i can index it using solr ? should i
> upload them one by one ?
>
> i've tried using curl command like bellow :
>
> java -Durl=http://localhost:8906/solr/update/extract?literal.id=PPN
> -Dtype=text/html -jar post.jar *.htm
You have to change the value of literal.id in between posts. Otherwise,
Solr is just updating the last document created with that ID.
Regards,
Gora
Re: Indexing thousands file on solr
Posted by Bing Hua <bh...@cornell.edu>.
You may write a client using solrj and loop through all files in that folder.
Something like,
ContentStreamUpdateRequest up = new
ContentStreamUpdateRequest("/update/extract");
up.addFile(new File(fileLocation), null);
ModifiableSolrParams p = new ModifiableSolrParams();
p.add("literal.id", str);
...
up.setParams(p);
server.request(up);
Bing
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-thousands-file-on-solr-tp4001050p4001196.html
Sent from the Solr - User mailing list archive at Nabble.com.