solnado package¶
Submodules¶
solnado.client module¶
-
class
solnado.client.SolrClient(host='localhost', port=8983, prefix='', method='http', ssl=False, verify_certs=True, ca_certs='', ioloop=None, *args, **kwargs)¶ Bases:
object-
add_configset(name, base_configset, callback=None, config_kwargs={}, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - name – Name of configset
- base_configset – Name of base configset
- callback – Callback to run on completion
- config_kwargs – Additional configuration
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
add_copy_field(collection, src, dst, callback=None, indent='off', maxChars=None, req_kwargs={}, wt='json')¶ Documentation for adding copy fields
Parameters: - collection – Collection name
- src – Source field name
- dst – Destination field name(s)
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
add_dynamic_field(collection, name, field_type, callback=None, field_kwargs={}, indent='off', req_kwargs={}, wt='json')¶ For more information on field types. Documentation for adding new dynamic fields
Parameters: - collection – Collection name
- name – The name of the field
- field_type – Field type
- callback – Callback to run on completion
- field_kwargs – Optional field type kwargs
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
add_field(collection, name, field_type, callback=None, field_kwargs={}, indent='off', req_kwargs={}, wt='json')¶ For more information on field types. Documentation for adding new fields.
Parameters: - collection – Collection name
- name – The name of the field
- field_type – Field type
- callback – Callback to run on completion
- field_kwargs – Optional field type kwargs
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
add_field_type(collection, name, callback=None, indent='off', field_kwargs={}, req_kwargs={}, wt='json')¶ Documentation for adding new field type.
Parameters: - collection – Collection name
- name – The name of the field
- callback – Callback to run on completion
- field_kwargs – Optional field type kwargs
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
add_json_document(collection, doc, boost=1, callback=None, indent='off', overwrite=True, commitWithin=1000, req_kwargs={}, wt='json')¶ -
Parameters: - collection – The name of the collection
- boost – Boosted weight
- CommitWithin – Commit within time (ms)
- doc – Dictionary to be uploaded
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
add_json_documents(collection, docs, boost=1, callback=None, commitWithin=1000, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - collection – The name of the collection
- docs – Dictionary to be uploaded
- boost – Boosted weight
- CommitWithin – Commit within time (ms)
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
alias_collection(collections, name, callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - name – Name of alias
- collection – Collection(s) to alias
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
core_create(name, callback=None, config='', indent='off', instance_dir=None, req_kwargs={}, schema='', wt='json')¶ -
Parameters: - name – The name of the core
- callback – Callback to run on completion
- config – Configuration file to use
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
core_reload(core, callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - core – Core to reload
- callback – Callback to run on completion
- indent – Indent the response body
- name – The name of the core
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
core_rename(core, other, callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - core – Core to be renamed
- other – Other name for core
- callback – Callback to run on completion
- indent – Indent the response body
- name – The name of the core
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
core_status(callback=None, core=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - callback – Callback to run on completion
- core – The name of the core
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
core_swap(core, other, callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - core – Core to be renamed
- other – Other name for core
- callback – Callback to run on completion
- indent – Indent the response body
- name – The name of the core
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
core_unload(core, callback=None, del_index=None, del_data_dir=None, del_inst_dir=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - core – Core to remove
- callback – Callback to run on completion
- del_index – Remove index
- del_data_dir – Remove data directory and subdirectories
- del_inst_dir – Remove everything related to core
- indent – Indent the response body
- name – The name of the core
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
create_collection(collection, callback=None, collection_kwargs={}, indent='off', req_kwargs={}, router_name='compositeId', shards=None, shards_per_node=1, replication=1, wt='json')¶ -
Parameters: - collection – Collection name
- collection_kwargs – Collection kwargs
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- router_name – Either ‘compositeId’ or ‘implicit’
- wt – Response format: ‘json’ or ‘xml’
-
delete(collection, docs, callback=None, indent='off', req_kwargs={}, wt='json')¶ Parameters: - collection – The name of the collection
- docs – Document id(s) to delete
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
delete_alias_collection(name, callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - name – Name of alias
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
delete_collection(name, shard=None, callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - name – Name of alias
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
delete_configset(name, callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - name – Name of configset
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
delete_copy_field(collection, src, dst, callback=None, indent='off', maxChars=None, req_kwargs={}, wt='json')¶ Documentation for deleting a copy field
Parameters: - collection – Collection name
- src – Source field name
- dst – Destination field name(s)
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
delete_dynamic_field(collection, name, callback=None, indent='off', req_kwargs={}, wt='json')¶ Documentation for deleting dynamic fields
Parameters: - collection – Collection name
- name – The name of the field
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
delete_field(collection, name, callback=None, indent='off', req_kwargs={}, wt='json')¶ Documentation for deleting fields
Parameters: - collection – Collection name
- name – The name of the field
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
delete_field_type(collection, name, callback=None, indent='off', req_kwargs={}, wt='json')¶ Documentation for deleting field types
Parameters: - collection – Collection name
- name – The name of the field
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
delete_replica_collection(collection, shard, replica, callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - collection – Name of collection
- shard – Shard id
- replica – Replica to be removed
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
delete_shard_collection(collection, shard, callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - collection – Collection name
- shard – Shard id
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
list_configset(callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
mk_req(url, **kwargs)¶ Helper function to create a tornado HTTPRequest object, kwargs get passed in to create the HTTPRequest object. See: Request Object
-
mk_url(*args, **kwargs)¶
-
query(collection, q, callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - collection – The name of the collection
- q – Query dictionary
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
reload_collection(collection, callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - collection – Collection name
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
replace_dynamic_field(collection, name, callback=None, indent='off', field_kwargs={}, req_kwargs={}, wt='json')¶ Documentation for replacing dynamic fields.
Parameters: - collection – Collection name
- name – The name of the field
- callback – Callback to run on completion
- field_kwargs – Optional field type kwargs
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
replace_field(collection, name, callback=None, indent='off', field_kwargs={}, req_kwargs={}, wt='json')¶ Documentation for replacing fields
Parameters: - collection – Collection name
- name – The name of the field
- callback – Callback to run on completion
- field_kwargs – Optional field type kwargs
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
replace_field_type(collection, name, callback=None, indent='off', field_kwargs={}, req_kwargs={}, wt='json')¶ Documentation for replacing field types
Parameters: - collection – Collection name
- name – The name of the field
- callback – Callback to run on completion
- field_kwargs – Optional field type kwargs
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
schema(collection, callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - collection – The name of the collection
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
schema_copy_fields(collection, callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - collection – The name of the collection
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
schema_default_operator(collection, callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - collection – The name of the collection
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
schema_dynamic_fields(collection, callback=None, field=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - collection – The name of the collection
- callback – Callback to run on completion
- field – Limit results to specific field
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
schema_field_types(collection, callback=None, field=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - collection – The name of the collection
- callback – Callback to run on completion
- field – Limit results to specific field
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
schema_fields(collection, callback=None, field=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - collection – The name of the collection
- callback – Callback to run on completion
- field – Limit results to specific field
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
schema_name(collection, callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - collection – The name of the collection
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
schema_similarity(collection, callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - collection – The name of the collection
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
schema_unique_key(collection, callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - collection – The name of the collection
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
schema_version(collection, callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - collection – The name of the collection
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
shard_collection(collection, shard, callback=None, shard_kwargs={}, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - collection – Collection name
- shard – Shard id
- shard_kwargs – Shard kwargs
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
split_shard_collection(collection, shard, callback=None, shard_kwargs={}, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - collection – Collection name
- shard – Shard id
- shard_kwargs – Shard kwargs
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
update_json(collection, upjson, callback=None, indent='off', req_kwargs={}, wt='json')¶ -
Parameters: - collection – The name of the collection
- upjson – Json to be posted
- callback – Callback to run on completion
- indent – Indent the response body
- req_kwargs – Optional tornado HTTPRequest kwargs
- wt – Response format: ‘json’ or ‘xml’
-
-
exception
solnado.client.SolrConfigurationError¶ Bases:
exceptions.Exception