Skip to content
Snippets Groups Projects
Commit ab326909 authored by Megan Henning's avatar Megan Henning
Browse files

Change string to text for 5.x

parent 518643d8
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ BASE_QUERY = {
}
}
FACET_QUERY = {
OLD_FACET_QUERY = {
"size": 0,
"aggs" : {
"Series Description" : {
......@@ -90,6 +90,67 @@ FACET_QUERY = {
}
FACET_QUERY = {
"size": 0,
"aggs" : {
"subect.sex" : {
"terms" : {
"field" : "subect.sex.raw",
"size" : 15
}
},
"subject.code" : {
"terms" : {
"field" : "subject.code.raw",
"size" : 15
}
},
"session.tags" : {
"terms" : {
"field" : "session.tags.raw",
"size" : 15
}
},
"project.label" : {
"terms" : {
"field" : "project.label.raw",
"size" : 15
}
},
"file.measurements" : {
"terms" : {
"field" : "file.measurements.raw",
"size" : 15
}
},
"file.type" : {
"terms" : {
"field" : "file.type.raw",
"size" : 15
}
},
"session.timestamp" : {
"date_histogram" : {
"field" : "session.timestamp",
"interval" : "month"
}
},
"session.created" : {
"date_histogram" : {
"field" : "session.created",
"interval" : "month"
}
},
"subject.age" : {
"histogram" : {
"field" : "subject.age",
"interval" : 31556952
}
}
}
}
class DataExplorerHandler(base.RequestHandler):
def __init__(self, request=None, response=None):
......
......@@ -44,7 +44,7 @@ DYNAMIC_TEMPLATES = [
'match': '_id',
'match_mapping_type' : 'string',
'mapping': {
'type': 'string',
'type': 'text',
'index': 'not_analyzed'
}
}
......@@ -102,7 +102,7 @@ DYNAMIC_TEMPLATES = [
'match': 'hash',
'match_mapping_type' : 'string',
'mapping': {
'type': 'string',
'type': 'text',
'index': 'not_analyzed'
}
}
......@@ -112,13 +112,13 @@ DYNAMIC_TEMPLATES = [
'match': '*',
'match_mapping_type' : 'string',
'mapping' : {
'type': 'string',
'type': 'text',
'search_analyzer': 'str_search_analyzer',
'index_analyzer': 'str_index_analyzer',
'ignore_above': 10922,
"fields": {
"raw": {
"type": "string",
"type": "text",
"index": "not_analyzed",
"ignore_above": 256
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment