tardis.apps.search package¶
Subpackages¶
Submodules¶
tardis.apps.search.api module¶
RESTful API for MyTardis search. Implemented with Tastypie.
-
class
tardis.apps.search.api.
AdvanceSearchAppResource
(api_name=None)¶ Bases:
tastypie.resources.Resource
-
class
Meta
¶ Bases:
object
-
always_return_data
= True¶
-
authentication
= <tardis.tardis_portal.api.MyTardisAuthentication object>¶
-
list_allowed_methods
= ['post']¶
-
object_class
¶ alias of
SearchObject
-
resource_name
= 'advance-search'¶
-
serializer
= <tardis.apps.search.api.PrettyJSONSerializer object>¶
-
-
base_fields
= {'hits': <tastypie.fields.ApiField object>, 'resource_uri': <tastypie.fields.CharField object>}¶
-
declared_fields
= {'hits': <tastypie.fields.ApiField object>}¶
-
detail_uri_kwargs
(bundle_or_obj)¶ Given a
Bundle
or an object (typically aModel
instance), it returns the extra kwargs needed to generate a detail URI.By default, it uses this resource’s
detail_uri_name
in order to create the URI.
-
get_object_list
(request)¶ A hook to allow making returning the list of available objects.
This needs to be implemented at the user level.
ModelResource
includes a full working version specific to Django’sModels
.
-
obj_create
(bundle, **kwargs)¶ Creates a new object based on the provided data.
This needs to be implemented at the user level.
ModelResource
includes a full working version specific to Django’sModels
.
-
obj_get_list
(bundle, **kwargs)¶ Fetches the list of objects available on the resource.
This needs to be implemented at the user level.
ModelResource
includes a full working version specific to Django’sModels
.
-
class
-
class
tardis.apps.search.api.
PrettyJSONSerializer
(formats=None, content_types=None, datetime_formatting=None)¶ Bases:
tastypie.serializers.Serializer
-
json_indent
= 2¶
-
to_json
(data, options=None)¶ Given some Python data, produces JSON output.
-
-
class
tardis.apps.search.api.
SearchAppResource
(api_name=None)¶ Bases:
tastypie.resources.Resource
Tastypie resource for simple-search
-
class
Meta
¶ Bases:
object
-
always_return_data
= True¶
-
authentication
= <tardis.tardis_portal.api.MyTardisAuthentication object>¶
-
list_allowed_methods
= ['get']¶
-
object_class
¶ alias of
SearchObject
-
resource_name
= 'simple-search'¶
-
serializer
= <tardis.apps.search.api.PrettyJSONSerializer object>¶
-
-
base_fields
= {'hits': <tastypie.fields.ApiField object>, 'resource_uri': <tastypie.fields.CharField object>}¶
-
declared_fields
= {'hits': <tastypie.fields.ApiField object>}¶
-
detail_uri_kwargs
(bundle_or_obj)¶ Given a
Bundle
or an object (typically aModel
instance), it returns the extra kwargs needed to generate a detail URI.By default, it uses this resource’s
detail_uri_name
in order to create the URI.
-
get_object_list
(request)¶ A hook to allow making returning the list of available objects.
This needs to be implemented at the user level.
ModelResource
includes a full working version specific to Django’sModels
.
-
obj_get_list
(bundle, **kwargs)¶ Fetches the list of objects available on the resource.
This needs to be implemented at the user level.
ModelResource
includes a full working version specific to Django’sModels
.
-
class
-
tardis.apps.search.api.
simple_search_public_data
(query_text)¶
tardis.apps.search.apps module¶
-
class
tardis.apps.search.apps.
SearchConfig
(app_name, app_module)¶ Bases:
tardis.app_config.AbstractTardisAppConfig
-
name
= 'tardis.apps.search'¶
-
verbose_name
= 'Search'¶
-
tardis.apps.search.documents module¶
-
class
tardis.apps.search.documents.
DataFileDocument
(related_instance_to_ignore=None, **kwargs)¶ Bases:
django_elasticsearch_dsl.documents.DocType
-
class
Index
¶ Bases:
object
-
name
= 'datafile'¶
-
settings
= {'number_of_replicas': 0, 'number_of_shards': 1}¶
-
-
django
= {'model': <class 'tardis.tardis_portal.models.datafile.DataF...}¶
-
get_queryset
()¶ Return the queryset that should be indexed by this doc type.
-
parallel_bulk
(actions, **kwargs)¶
-
prepare_experiments
(instance)¶
-
class
-
class
tardis.apps.search.documents.
DatasetDocument
(related_instance_to_ignore=None, **kwargs)¶ Bases:
django_elasticsearch_dsl.documents.DocType
-
class
Index
¶ Bases:
object
-
name
= 'dataset'¶
-
settings
= {'number_of_replicas': 0, 'number_of_shards': 1}¶
-
-
django
= {'model': <class 'tardis.tardis_portal.models.dataset.Datase...}¶
-
parallel_bulk
(actions, **kwargs)¶
-
class
-
class
tardis.apps.search.documents.
ExperimentDocument
(related_instance_to_ignore=None, **kwargs)¶ Bases:
django_elasticsearch_dsl.documents.DocType
-
class
Index
¶ Bases:
object
-
name
= 'experiments'¶
-
settings
= {'number_of_replicas': 0, 'number_of_shards': 1}¶
-
-
django
= {'model': <class 'tardis.tardis_portal.models.experiment.Exp...}¶
-
parallel_bulk
(actions, **kwargs)¶
-
class
tardis.apps.search.urls module¶
tardis.apps.search.views module¶
views relevant to search
-
class
tardis.apps.search.views.
SearchView
(**kwargs)¶ Bases:
django.views.generic.base.TemplateView
-
template_name
= 'search.html'¶
-