Accessing the bin folder on the command screen

Let's do a search example taking advantage of the sample files in the solr folder itself.

We open the command line of Windows.

We start solr by typing the following commands:

solr start ejemplo

We can use one of the examples that come with solr, which are these:

  • cloud: SolrCloud example
  • dih: Data importer manager (rdbms, mail, rss, tika)
  • schemaless: Example without schema
  • techproducts: Example that provides extensive examples of Solr's features

Using the command -e techproducts we create a core.

We have the following options:

  • -c core_name Name of the core we want to create
  • -p port_name Port where we want to create the core
  • -d conf_dir Port configuration directory

Access to the techproducts folder

We type:

bin / solr -e techproducts

We choose techproducts, which will allow us to check the solr search functionality.

A screen similar to this will appear:

solr techproducts example start

Also, you can check that the techproducts folder has been created inside the examples folder:

solr techproducts folder

Access to localhost

We load http: // localhost: 8983 / solr / in our browser.

We will check that the techproducts selector appears on the left side of the control panel.

solr techproducts core selector

If we click on it, this screen will appear:

solr techproducts

We click on Query:

solr techproducts query example

Solr search parameters

In the image we can see the parameters used by solr.

The parameter “q” is mandatory and it is used to define the search using the standard search syntax.

Let's do a search.

We type “canon sd500” and note that there are two entries that match the search criteria.

solr busqueda ejemplo

So, from a series of documents, solr has created an index that has allowed us to do an example search.