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 <p...@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)

Reply via email to