Solr Commands
Production
Type | Query | Description |
---|---|---|
Getdocument with specified field | curl http://solr.axonator-private.com:8983/solr/axo_default_config/query?q=field:id | To Get document if the field has that id |
Reload Core | curl “http://solr.axonator-private.com:8983/solr/admin/cores?action=RELOAD&core=axo_default_config“ | |
Delete document with specified field | curl ‘”>http://solr.axonator-private.com:8983/solr/axo_default_config/update -H “Content-type: text/xml” –data-binary ‘<commit />’ | To Commit Changes |
Add field | curl -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 Schema | curl -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 |
optimization | curl http://solr.axonator-private.com:8983/solr/axo_default_config/update?optimize=true | Optimizes index |
Get field from schema | curl http://solr.axonator-private.com:8983/solr/axo_default_config/schema/fields/fieldname | Extracts the field from schema with it’s properties |
Reload core | curl “http://solr.axonator-private.com:8983/solr/admin/cores?action=RELOAD&core=axo_default_config“ | Restarting solr instance for that core |
Get document with field_1 = field_2 | curl 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
Type | Query | Description |
---|---|---|
Getdocument with specified field | curl http://localhost:8983/solr/axo_default_config/query?q=field:id | To Get document if the field has that id |
Delete document with specified field | curl ‘”>http://localhost:8983/solr/axo_default_config/update -H “Content-type: text/xml” –data-binary ‘<commit />’ | To Commit Changes |
Add field | curl -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 Schema | curl -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 |
optimization | curl http://localhost:8983/solr/axo_default_config/update?optimize=true | Oprimizes index |
Get field from schema | curl http://localhost:8983/solr/axo_default_config/schema/fields/fieldname | Extracts the field from schema with it’s properties |
Get document with field_1 = field_2 | curl 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 core | curl “http://localhost:8983/solr/admin/cores?action=RELOAD&core=axo_default_config“ | Restarting solr instance for that core |
0 Comments