lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Hoffman <p...@flo.org>
Subject Re: Regarding JSON indexing in SOLR 4.10
Date Wed, 30 Mar 2016 13:55:43 GMT
On Tue, Mar 29, 2016 at 11:30:06PM -0700, Aditya Desai wrote:
> I am running SOLR 4.10 on port 8984 by changing the default port in
> etc/jetty.xml. I am now trying to index all my JSON files to Solr running
> on 8984. The following is the command
> 
> curl 'http://localhost:8984/solr/update?commit=true' --data-binary *.json
> -H 'Content-type:application/json'

The wildcard is the problem; your shell is expanding --data-binary 
*.json to --data-binary foo.json bar.json baz.json and curl doesn't know 
how to download bar.json and baz.json.

Try this instead:

for file in *.json; do
    curl 'http://localhost:8984/solr/update?commit=true' --data-binary "$file" -H 'Content-type:application/json'
done

Paul.

-- 
Paul Hoffman <paul@flo.org>
Systems Librarian
Fenway Libraries Online
c/o Wentworth Institute of Technology
550 Huntington Ave.
Boston, MA 02115
(617) 442-2384 (FLO main number)

Mime
View raw message