An ad-free and cookie-free website.
The search business is evolving and those with needs to develop capabilities in enterprise search and website search have two choices: buy or build. First, offerings from Google Custom Search and Amazon CloudSearch and a few other players offer a managed search option. The second option is to build a custom search application using the open-source Lucene search library and customize it with Apache Solr search or Elasticsearch.
Any comprehensive review of the choices requires building a test environment first which is normally performed on one server in what is called standalone mode in Solr. Next, as search volumes increase and the search application moves to production it is important to review distributed search in Apache Solr that sits in SolrCloud mode.
Tests in Solr search require building test data sets and configurations
for managing the search application. Here with
solr create_core you create a core
in standalone mode. The
solr create_collection command on the
other hand is used in SolrCloud mode for distributed search.
solr create_core command has a
more limited set of capabilities because cores run on one server and
data is not replicated and served by two instances.
The other two commands in this set include the
solr create command which is covered
in the previous page (click Back). It interprets the mode and uses
solr create_core command functionality
in standalone mode. If it interprets SolrCloud mode then it uses the
functionality of the
solr create_collection command
solr create_core command is one
of 12 commands within the main
solr create_core command itself
has 3 options, also known as parameters.
The syntax for running
is as follows.
The list of 3 options including default values are described in the table below.
This syntax assumes your current working directory is
the $SOLR_HOME directory for Solr, which for version 7
standalone mode for a local installation. When running in a production
environment the directory locations may differ.
So the path to the location of the solr script is:
solr script can be run using the
./solr from within
When using a Solr Windows installation, the solr script is called using
solr create_core command the
-c option is required. The other
options (parameters) are optional.
||Create a Solr core with default options named <name>.||
||Select a name for the core in standalone mode.||-c <name> is required|
||Select the configuration directory contents to copy to the
core in standalone mode.
Currently two options exist:
||Select the port on the server where Solr should create the core.||Solr selects the first running server|
The following command creates a Solr core named mycore creating a new configuration set called mycore by copying configurations from /server/solr/configsets/_default.
The following command will create a Solr core named mycore but with a configuration directory named mycoreconfigs. This is not advised.
The following command will create a Solr core called mycore on port number 8984 instead of the default 8983. This also creates a configuration directory called mycore with a copy of contents from /server/solr/configsets/_default.
From the command line you can access additional help on the
solr create_core command by appending
-help after the command.
FactorPad offers Apache Solr Search content in both tutorials and reference.
Our YouTube Channel is packed with free turorials for developers. It is growing and we would love if you joined us there.
A newly-updated free resource. Connect and refer a friend today.