Skip to content Skip to footer

Solr Commands

Production

TypeQueryDescription
Getdocument with specified fieldcurl http://solr.axonator-private.com:8983/solr/axo_default_config/query?q=field:idTo Get document if the field has that id
Reload Corecurl  “http://solr.axonator-private.com:8983/solr/admin/cores?action=RELOAD&core=axo_default_config
Delete document with specified fieldcurl ‘”>http://solr.axonator-private.com:8983/solr/axo_default_config/update -H “Content-type: text/xml” –data-binary ‘<commit />’To Commit Changes
Add fieldcurl -X POST -H ‘Content-type:application/json’ –data-binary ‘
{  “add-field”:{  “name”:”field_name”, “type”:”field_type”, “stored”:true }}’ http://solr.axonator-private.com:8983/solr/axo_default_config/schema
To Add Field in solr schema
Delete Field From Schemacurl -X POST -H ‘Content-type:application/json’ –data-binary ‘{  “delete-field” : { “name”:”field_name” }}’
http://solr.axonator-private.com:8983/solr/axo_default_config/schema
To delete a particular field from Solr schema
optimizationcurl http://solr.axonator-private.com:8983/solr/axo_default_config/update?optimize=trueOptimizes index
Get field from schemacurl http://solr.axonator-private.com:8983/solr/axo_default_config/schema/fields/fieldnameExtracts the field from schema with it’s properties
Reload corecurl “http://solr.axonator-private.com:8983/solr/admin/cores?action=RELOAD&core=axo_default_configRestarting solr instance for that core
Get document with field_1 = field_2curl http://solr.axonator-private.com:8983/solr/axo_default_config/select?q={!frange l=1 u=1}strdist(field(field_1), field(field_2),edit)Compare two fields if same document

Localhost/QA

TypeQueryDescription
Getdocument with specified fieldcurl http://localhost:8983/solr/axo_default_config/query?q=field:idTo Get document if the field has that id
Delete document with specified fieldcurl ‘”>http://localhost:8983/solr/axo_default_config/update -H “Content-type: text/xml” –data-binary ‘<commit />’To Commit Changes
Add fieldcurl -X POST -H ‘Content-type:application/json’ –data-binary ‘
{  “add-field”:{  “name”:”field_name”, “type”:”field_type”, “stored”:true }}’http://localhost:8983/solr/axo_default_config/schema
To Add Field in solr schema
Delete Field From Schemacurl -X POST -H ‘Content-type:application/json’ –data-binary ‘{  “delete-field” : { “name”:”field_name” }}’
http://localhost:8983/solr/axo_default_config/schema
To delete a particular field from Solr schema
optimizationcurl http://localhost:8983/solr/axo_default_config/update?optimize=trueOprimizes index
Get field from schemacurl http://localhost:8983/solr/axo_default_config/schema/fields/fieldnameExtracts the field from schema with it’s properties
Get document with field_1 = field_2curl http://localhost:8983/solr/axo_default_config/select?q={!frange l=1 u=1}strdist(field(field_1), field(field_2),edit)Compare two fields if same document
Reload corecurl “http://localhost:8983/solr/admin/cores?action=RELOAD&core=axo_default_configRestarting solr instance for that core

Was This Article Helpful?

0
0 Comments

There are no comments yet

Leave a comment

Your email address will not be published. Required fields are marked *

Close Bitnami banner
Bitnami