Switched indexPDFinSolrCore.sh to use getopt parameters -c for core name and -p for path to file.
Added optimize at end of script to ensure API was immediately callable