tardis.search package¶
Submodules¶
tardis.search.datafile_index module¶
search indexes for single search
-
class
tardis.search.datafile_index.
DataFileIndex
¶ Bases:
haystack.indexes.SearchIndex
,haystack.constants.Indexable
-
datafile_filename
= <haystack.fields.CharField object>¶
-
dataset_id_stored
= <haystack.fields.IntegerField object>¶
-
experiment_id_stored
= <haystack.fields.MultiValueField object>¶
-
fields
= {'datafile_filename': <haystack.fields.CharField object at 0x7fbcae7f5250>, 'dataset_id_stored': <haystack.fields.IntegerField object at 0x7fbcae7f52d0>, 'experiment_id_stored': <haystack.fields.MultiValueField object at 0x7fbcae7f5290>, 'text': <haystack.fields.CharField object at 0x7fbcae7f5210>}¶
-
get_model
()¶
-
objects
= <haystack.manager.SearchIndexManager object>¶
-
prepare_experiment_id_stored
(obj)¶
-
prepare_text
(obj)¶
-
text
= <haystack.fields.CharField object>¶
-
tardis.search.forms module¶
tardis.search.search_indexes module¶
search indexes for single search
-
class
tardis.search.search_indexes.
DatasetIndex
¶ Bases:
haystack.indexes.SearchIndex
,haystack.constants.Indexable
-
dataset_description
= <haystack.fields.CharField object>¶
-
dataset_id_stored
= <haystack.fields.IntegerField object>¶
-
experiment_id_stored
= <haystack.fields.MultiValueField object>¶
-
fields
= {'dataset_description': <haystack.fields.CharField object at 0x7fbcae90e950>, 'dataset_id_stored': <haystack.fields.IntegerField object at 0x7fbcae90e350>, 'experiment_id_stored': <haystack.fields.MultiValueField object at 0x7fbcae90ea50>, 'text': <haystack.fields.CharField object at 0x7fbcaefe3250>}¶
-
get_model
()¶
-
objects
= <haystack.manager.SearchIndexManager object>¶
-
prepare_experiment_id_stored
(obj)¶
-
prepare_text
(obj)¶ Elasticsearch’s standard tokenizer won’t split on underscores, as it uses the Unicode Text Segmentation algorithm, as specified in the Unicode Standard Annex #29. Some MyTardis users replace spaces with underscores in folder names, because their instrument data collection software won’t allow spaces in paths, so we replace underscores with spaces in the search index, but they will still appear as underscores in the search results.
-
text
= <haystack.fields.CharField object>¶
-
-
class
tardis.search.search_indexes.
ExperimentIndex
¶ Bases:
haystack.indexes.SearchIndex
,haystack.constants.Indexable
-
experiment_created_time
= <haystack.fields.DateTimeField object>¶
-
experiment_creator
= <haystack.fields.CharField object>¶
-
experiment_description
= <haystack.fields.CharField object>¶
-
experiment_end_time
= <haystack.fields.DateTimeField object>¶
-
experiment_id_stored
= <haystack.fields.IntegerField object>¶
-
experiment_institution_name
= <haystack.fields.CharField object>¶
-
experiment_start_time
= <haystack.fields.DateTimeField object>¶
-
experiment_title
= <haystack.fields.CharField object>¶
-
experiment_update_time
= <haystack.fields.DateTimeField object>¶
-
fields
= {'experiment_author': <haystack.fields.MultiValueField object at 0x7fbcaefe3350>, 'experiment_created_time': <haystack.fields.DateTimeField object at 0x7fbcaefe38d0>, 'experiment_creator': <haystack.fields.CharField object at 0x7fbcaefe3090>, 'experiment_description': <haystack.fields.CharField object at 0x7fbcaefe3850>, 'experiment_end_time': <haystack.fields.DateTimeField object at 0x7fbcaefe3b10>, 'experiment_id_stored': <haystack.fields.IntegerField object at 0x7fbcae7f5810>, 'experiment_institution_name': <haystack.fields.CharField object at 0x7fbcaefe3bd0>, 'experiment_start_time': <haystack.fields.DateTimeField object at 0x7fbcaefe39d0>, 'experiment_title': <haystack.fields.CharField object at 0x7fbcae7f56d0>, 'experiment_update_time': <haystack.fields.DateTimeField object at 0x7fbcaefe3b50>, 'text': <haystack.fields.CharField object at 0x7fbcae8251d0>}¶
-
get_model
()¶
-
index_queryset
(using=None)¶ Used when the entire index for model is updated.
-
objects
= <haystack.manager.SearchIndexManager object>¶
-
prepare_experiment_creator
(obj)¶
-
prepare_text
(obj)¶ Elasticsearch’s standard tokenizer won’t split on underscores, as it uses the Unicode Text Segmentation algorithm, as specified in the Unicode Standard Annex #29. Some MyTardis users replace spaces with underscores in folder names, because their instrument data collection software won’t allow spaces in paths, so we replace underscores with spaces in the search index, but they will still appear as underscores in the search results.
-
text
= <haystack.fields.CharField object>¶
-
tardis.search.urls module¶
tardis.search.utils module¶
tardis.search.views module¶
views relevant to search
-
class
tardis.search.views.
ExperimentSearchView
(**kwargs)¶ Bases:
haystack.generic_views.SearchView
-
create_response
()¶
-
extra_context
()¶
-
-
class
tardis.search.views.
SingleSearchView
(**kwargs)¶ Bases:
haystack.generic_views.SearchView
-
form_class
¶
-
form_valid
(form)¶ If the form is valid, redirect to the supplied URL.
-
template_name
= 'search/search.html'¶
-
-
tardis.search.views.
search_experiment
(request)¶ Either show the search experiment form or the result of the search experiment query.
-
tardis.search.views.
search_quick
(request)¶