On 6/5/2020 4:24 PM, Jim Anderson wrote:
I am running my first solrj program and it is crashing when I call the
method

client.query("coreName",queryParms)

The API doc says the string should be a collection. I'm still not sure
about the difference between a collection and a core, so what I am doing is
likely illegal. Given that I have created a core, create a collection from
it so that I can truly pass a collection name to the query function?

The concept of a collection comes from SolrCloud. A collection is made up of one or more shards. A shard is made up of one or more replicas. Each replica is a core. If you're not running SolrCloud, then you do not have collections.

Wherever SolrJ docs says "collection" as a parameter for a request, it is likely that you can think "core" instead and have it still be correct. If you're running SolrCloud, you'll want to be very careful to know the difference.

It seems very odd for a SolrJ query to cause the program to crash. It would be pretty common for it to throw an exception, but that's not the same as a crash, unless exception handling is incorrect or missing.

Thanks,
Shawn

Reply via email to