Example #1
0
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

DOMAIN_INDEX = es_index("hqdomains_2016-08-08")
DOMAIN_MAPPING = {'_meta': {'comment': '',
                            'created': None},
 'date_detection': False,
 'date_formats': ['yyyy-MM-dd',
                  "yyyy-MM-dd'T'HH:mm:ssZZ",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss'Z'",
                  "yyyy-MM-dd'T'HH:mm:ssZ",
                  "yyyy-MM-dd'T'HH:mm:ssZZ'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
                  "yyyy-MM-dd'T'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss.SSSSSS",
                  "mm/dd/yy' 'HH:mm:ss"],
 'dynamic': False,
 'properties': {'area': {'type': 'string'},
                'attribution_notes': {'type': 'string'},
                'author': {'fields': {'author': {'index': 'analyzed',
                                                 'type': 'string'},
                                      'exact': {'index': 'not_analyzed',
                                                'type': 'string'}},
                           'type': 'multi_field'},
                'cached_properties': {'dynamic': False, 'type': 'object'},
                'call_center_config': {'dynamic': False,
                                       'properties': {'case_owner_id': {'type': 'string'},
                                                      'use_fixtures': {'type': 'boolean'},
Example #2
0
from corehq.pillows.base import DEFAULT_META
from corehq.pillows.core import DATE_FORMATS_STRING, DATE_FORMATS_ARR
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

REPORT_XFORM_INDEX = es_index("report_xforms_20160824_1708")

CASE_MAPPING_FRAGMENT = {
    'type': 'nested',
    'dynamic': False,
    'properties': {
        'date_modified': {
            "type": "date",
            "format": DATE_FORMATS_STRING
        },
        '@date_modified': {
            "type": "date",
            "format": DATE_FORMATS_STRING
        },
        'index': {
            'type': 'object',
            'dynamic': True
        },

        "@case_id": {"type": "string", "index": "not_analyzed"},
        "@user_id": {"type": "string", "index": "not_analyzed"},
        "@xmlns": {"type": "string", "index": "not_analyzed"},


        "case_id": {"type": "string", "index": "not_analyzed"},
        "user_id": {"type": "string", "index": "not_analyzed"},
Example #3
0
from corehq.util.elastic import es_index

DOMAIN_INDEX = es_index("hqdomains_20151204_1053")
DOMAIN_MAPPING = {'_meta': {'comment': 'farid modified on 2015/11/23',
                            'created': None},
 'date_detection': False,
 'date_formats': ['yyyy-MM-dd',
                  "yyyy-MM-dd'T'HH:mm:ssZZ",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss'Z'",
                  "yyyy-MM-dd'T'HH:mm:ssZ",
                  "yyyy-MM-dd'T'HH:mm:ssZZ'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
                  "yyyy-MM-dd'T'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss.SSSSSS",
                  "mm/dd/yy' 'HH:mm:ss"],
 'dynamic': False,
 'properties': {'area': {'type': 'string'},
                'attribution_notes': {'type': 'string'},
                'author': {'fields': {'author': {'index': 'analyzed',
                                                 'type': 'string'},
                                      'exact': {'index': 'not_analyzed',
                                                'type': 'string'}},
                           'type': 'multi_field'},
                'cached_properties': {'dynamic': False, 'type': 'object'},
                'call_center_config': {'dynamic': False,
                                       'properties': {'case_owner_id': {'type': 'string'},
                                                      'use_fixtures': {'type': 'boolean'},
                                                      'case_type': {'type': 'string'},
Example #4
0
from __future__ import absolute_import
from __future__ import unicode_literals
from corehq.util.elastic import es_index
from corehq.pillows.core import DATE_FORMATS_ARR, DATE_FORMATS_STRING

from pillowtop.es_utils import ElasticsearchIndexInfo

USER_INDEX = es_index("hqusers_2017-09-07")
USER_MAPPING = {
    '_all': {
        'analyzer': 'standard'
    },
    '_meta': {
        'created': None
    },
    'date_detection': False,
    'date_formats': DATE_FORMATS_ARR,
    'dynamic': False,
    'properties': {
        'CURRENT_VERSION': {
            'type': 'string'
        },
        'base_doc': {
            'type': 'string'
        },
        'created_on': {
            'format': DATE_FORMATS_STRING,
            'type': 'date'
        },
        'date_joined': {
            'format': DATE_FORMATS_STRING,
Example #5
0
from __future__ import absolute_import
from corehq.pillows.core import DATE_FORMATS_ARR, DATE_FORMATS_STRING
from corehq.pillows.mappings import NULL_VALUE
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

CASE_INDEX = es_index("hqcases_2016-03-04")
CASE_ES_TYPE = 'case'

CASE_MAPPING = {
    'date_detection': False,
    'date_formats': DATE_FORMATS_ARR,
    'dynamic': False,
    '_meta': {
        'comment': '',
        'created': '2013-09-19 @dmyung'
    },
    'properties': {
        'actions': {
            'dynamic': False,
            'properties': {
                'action_type': {
                    'type': 'string'
                },
                'date': {
                    'format': DATE_FORMATS_STRING,
                    'type': 'date'
                },
                'doc_type': {
                    'index': 'not_analyzed',
                    'type': 'string'
Example #6
0
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

DOMAIN_INDEX = es_index("hqdomains_2020-02-10")
DOMAIN_MAPPING = {
    '_all': {
        'enabled': False
    },
    '_meta': {
        'comment': '',
        'created': None
    },
    'date_detection':
    False,
    'date_formats': [
        'yyyy-MM-dd', "yyyy-MM-dd'T'HH:mm:ssZZ",
        "yyyy-MM-dd'T'HH:mm:ss.SSSSSS", "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
        "yyyy-MM-dd'T'HH:mm:ss'Z'", "yyyy-MM-dd'T'HH:mm:ssZ",
        "yyyy-MM-dd'T'HH:mm:ssZZ'Z'", "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
        "yyyy-MM-dd'T'HH:mm:ss", "yyyy-MM-dd' 'HH:mm:ss",
        "yyyy-MM-dd' 'HH:mm:ss.SSSSSS", "mm/dd/yy' 'HH:mm:ss"
    ],
    'dynamic':
    False,
    'properties': {
        'area': {
            'type': 'string'
        },
        'attribution_notes': {
            'type': 'string'
        },
from __future__ import absolute_import
from corehq.pillows.core import DATE_FORMATS_STRING, DATE_FORMATS_ARR
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

REPORT_XFORM_INDEX = es_index("report_xforms_20160824_1708")

CASE_MAPPING_FRAGMENT = {
    'type': 'nested',
    'dynamic': False,
    'properties': {
        'date_modified': {
            "type": "date",
            "format": DATE_FORMATS_STRING
        },
        '@date_modified': {
            "type": "date",
            "format": DATE_FORMATS_STRING
        },
        'index': {
            'type': 'object',
            'dynamic': True
        },

        "@case_id": {"type": "string", "index": "not_analyzed"},
        "@user_id": {"type": "string", "index": "not_analyzed"},
        "@xmlns": {"type": "string", "index": "not_analyzed"},


        "case_id": {"type": "string", "index": "not_analyzed"},
        "user_id": {"type": "string", "index": "not_analyzed"},
Example #8
0
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

USER_INDEX = es_index("hqusers_2017-02-03")
USER_MAPPING = {
    '_all': {
        'analyzer': 'standard'
    },
    '_meta': {
        'created': None
    },
    'date_detection':
    False,
    'date_formats': [
        'yyyy-MM-dd', "yyyy-MM-dd'T'HH:mm:ssZZ",
        "yyyy-MM-dd'T'HH:mm:ss.SSSSSS", "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
        "yyyy-MM-dd'T'HH:mm:ss'Z'", "yyyy-MM-dd'T'HH:mm:ssZ",
        "yyyy-MM-dd'T'HH:mm:ssZZ'Z'", "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
        "yyyy-MM-dd'T'HH:mm:ss", "yyyy-MM-dd' 'HH:mm:ss",
        "yyyy-MM-dd' 'HH:mm:ss.SSSSSS", "mm/dd/yy' 'HH:mm:ss"
    ],
    'dynamic':
    False,
    'properties': {
        'CURRENT_VERSION': {
            'type': 'string'
        },
        'base_doc': {
            'type': 'string'
        },
        'created_on': {
Example #9
0
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

APP_INDEX = es_index("hqapps_2016-07-11_2128")
APP_MAPPING = {
    '_meta': {
        'created': None
    },
    'date_detection':
    False,
    'date_formats': [
        'yyyy-MM-dd', "yyyy-MM-dd'T'HH:mm:ssZZ",
        "yyyy-MM-dd'T'HH:mm:ss.SSSSSS", "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
        "yyyy-MM-dd'T'HH:mm:ss'Z'", "yyyy-MM-dd'T'HH:mm:ssZ",
        "yyyy-MM-dd'T'HH:mm:ssZZ'Z'", "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
        "yyyy-MM-dd'T'HH:mm:ss", "yyyy-MM-dd' 'HH:mm:ss",
        "yyyy-MM-dd' 'HH:mm:ss.SSSSSS", "mm/dd/yy' 'HH:mm:ss"
    ],
    'dynamic':
    False,
    'properties': {
        'admin_password': {
            'type': 'string'
        },
        'admin_password_charset': {
            'type': 'string'
        },
        'application_version': {
            'type': 'string'
        },
        'attribution_notes': {
Example #10
0
from corehq.util.elastic import es_index

APP_INDEX = es_index("hqapps_2016-02-12_1300")
APP_MAPPING={'_meta': {'created': None},
 'date_detection': False,
 'date_formats': ['yyyy-MM-dd',
                  "yyyy-MM-dd'T'HH:mm:ssZZ",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss'Z'",
                  "yyyy-MM-dd'T'HH:mm:ssZ",
                  "yyyy-MM-dd'T'HH:mm:ssZZ'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
                  "yyyy-MM-dd'T'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss.SSSSSS",
                  "mm/dd/yy' 'HH:mm:ss"],
 'dynamic': False,
 'properties': {'admin_password': {'type': 'string'},
                'admin_password_charset': {'type': 'string'},
                'application_version': {'type': 'string'},
                'attribution_notes': {'type': 'string'},
                'build_broken': {'type': 'boolean'},
                'build_comment': {'type': 'string'},
                'build_langs': {'type': 'string'},
                'build_signed': {'type': 'boolean'},
                'build_spec': {'dynamic': False,
                               'properties': {'build_number': {'type': 'long'},
                                              'doc_type': {'index': 'not_analyzed',
                                                           'type': 'string'},
                                              'latest': {'type': 'boolean'},
Example #11
0
from __future__ import absolute_import
from __future__ import unicode_literals
from corehq.util.elastic import es_index
from corehq.pillows.mappings.utils import mapping_from_json
from pillowtop.es_utils import ElasticsearchIndexInfo

APP_INDEX = es_index("hqapps_2019-01-23")
APP_MAPPING = mapping_from_json('app_mapping.json')
APP_ES_ALIAS = "hqapps"
APP_ES_TYPE = "app"

APP_INDEX_INFO = ElasticsearchIndexInfo(
    index=APP_INDEX,
    alias=APP_ES_ALIAS,
    type=APP_ES_TYPE,
    mapping=APP_MAPPING
)
from corehq.pillows.core import DATE_FORMATS_STRING, DATE_FORMATS_ARR
from corehq.util.elastic import es_index
REPORT_XFORM_INDEX = es_index("report_xforms_20150406_1136")

CASE_MAPPING_FRAGMENT = {
    'type': 'nested',
    'dynamic': False,
    'properties': {
        'date_modified': {
            "type": "date",
            "format": DATE_FORMATS_STRING
        },
        '@date_modified': {
            "type": "date",
            "format": DATE_FORMATS_STRING
        },
        'index': {
            'type': 'object',
            'dynamic': True
        },

        "@case_id": {"type": "string", "index": "not_analyzed"},
        "@user_id": {"type": "string", "index": "not_analyzed"},
        "@xmlns": {"type": "string", "index": "not_analyzed"},


        "case_id": {"type": "string", "index": "not_analyzed"},
        "user_id": {"type": "string", "index": "not_analyzed"},
        "xmlns": {"type": "string", "index": "not_analyzed"},

        "create": {
from corehq.pillows.base import DEFAULT_META

from corehq.pillows.mappings.case_mapping import CASE_ES_TYPE
from corehq.pillows.mappings.utils import mapping_from_json
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo


CASE_SEARCH_INDEX = es_index("case_search_2016-03-15")
CASE_SEARCH_ALIAS = "case_search"
CASE_SEARCH_MAX_RESULTS = 10
CASE_SEARCH_MAPPING = mapping_from_json('case_search_mapping.json')


CASE_SEARCH_INDEX_INFO = ElasticsearchIndexInfo(
    index=CASE_SEARCH_INDEX,
    alias=CASE_SEARCH_ALIAS,
    type=CASE_ES_TYPE,
    meta=DEFAULT_META,
    mapping=CASE_SEARCH_MAPPING,
)
Example #14
0
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

USER_INDEX = es_index("hqusers_2016-07-19")
USER_MAPPING = {
    '_all': {
        'analyzer': 'standard'
    },
    '_meta': {
        'created': None
    },
    'date_detection':
    False,
    'date_formats': [
        'yyyy-MM-dd', "yyyy-MM-dd'T'HH:mm:ssZZ",
        "yyyy-MM-dd'T'HH:mm:ss.SSSSSS", "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
        "yyyy-MM-dd'T'HH:mm:ss'Z'", "yyyy-MM-dd'T'HH:mm:ssZ",
        "yyyy-MM-dd'T'HH:mm:ssZZ'Z'", "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
        "yyyy-MM-dd'T'HH:mm:ss", "yyyy-MM-dd' 'HH:mm:ss",
        "yyyy-MM-dd' 'HH:mm:ss.SSSSSS", "mm/dd/yy' 'HH:mm:ss"
    ],
    'dynamic':
    False,
    'properties': {
        'CURRENT_VERSION': {
            'type': 'string'
        },
        'base_doc': {
            'type': 'string'
        },
        'created_on': {
Example #15
0
from corehq.pillows.base import DEFAULT_META
from corehq.pillows.core import DATE_FORMATS_STRING, DATE_FORMATS_ARR
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

REPORT_XFORM_INDEX = es_index("report_xforms_20160707_2322")

CASE_MAPPING_FRAGMENT = {
    'type': 'nested',
    'dynamic': False,
    'properties': {
        'date_modified': {
            "type": "date",
            "format": DATE_FORMATS_STRING
        },
        '@date_modified': {
            "type": "date",
            "format": DATE_FORMATS_STRING
        },
        'index': {
            'type': 'object',
            'dynamic': True
        },
        "@case_id": {
            "type": "string",
            "index": "not_analyzed"
        },
        "@user_id": {
            "type": "string",
            "index": "not_analyzed"
        },
Example #16
0
from __future__ import absolute_import
from __future__ import unicode_literals
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

GROUP_INDEX = es_index("hqgroups_2017-05-29")
GROUP_MAPPING = {
    "date_formats": [
        "yyyy-MM-dd",
        "yyyy-MM-dd'T'HH:mm:ssZZ",
        "yyyy-MM-dd'T'HH:mm:ss.SSSSSS",
        "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
        "yyyy-MM-dd'T'HH:mm:ss'Z'",
        "yyyy-MM-dd'T'HH:mm:ssZ",
        "yyyy-MM-dd'T'HH:mm:ssZZ'Z'",
        "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
        "yyyy-MM-dd'T'HH:mm:ss",
        "yyyy-MM-dd' 'HH:mm:ss",
        "yyyy-MM-dd' 'HH:mm:ss.SSSSSS",
        "mm/dd/yy' 'HH:mm:ss"
    ],
    "dynamic": False,
    "_meta": {
        "comment": "Ethan updated on 2014-04-02",
        "created": None
    },
    "date_detection": False,
    "properties": {
        "doc_type": {
            "index": "not_analyzed",
            "type": "string"
Example #17
0
from corehq.pillows.base import DEFAULT_META
from corehq.pillows.core import DATE_FORMATS_ARR, DATE_FORMATS_STRING
from corehq.pillows.mappings import NULL_VALUE
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

CASE_INDEX = es_index("hqcases_2016-03-04")
CASE_ES_TYPE = 'case'

CASE_MAPPING = {
    'date_detection': False,
    'date_formats': DATE_FORMATS_ARR,
    'dynamic': False,
    '_meta': {
        'comment': '',
        'created': '2013-09-19 @dmyung'
    },
    'properties': {
        'actions': {'dynamic': False,
                    'properties': {
                        'action_type': {'type': 'string'},
                        'date': {'format': DATE_FORMATS_STRING,
                                 'type': 'date'},
                        'doc_type': {'index': 'not_analyzed',
                                     'type': 'string'},
                        'indices': {'dynamic': False,
                                    'properties': {
                                        'doc_type': {'index': 'not_analyzed',
                                                     'type': 'string'},
                                        'identifier': {'type': 'string'},
                                        'referenced_id': {'type': 'string'},
Example #18
0
from __future__ import absolute_import
from __future__ import unicode_literals
from corehq.pillows.core import DATE_FORMATS_ARR, DATE_FORMATS_STRING
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

SMS_INDEX = es_index("smslogs_2017-02-09")
SMS_MAPPING = {
    '_meta': {
       'comment': 'Autogenerated [corehq.apps.sms.models.SMSLog] mapping from ptop_generate_mapping 09/23/2013',
       'created': None
    },
    'date_detection': False,
    'date_formats': DATE_FORMATS_ARR,
    'dynamic': False,
    'properties': {
        'backend_api': {'type': 'string'},
        'backend_id': {'type': 'string'},
        'base_doc': {'type': 'string'},
        'billed': {'type': 'boolean'},
        'couch_recipient': {'type': 'string'},
        'couch_recipient_doc_type': {'type': 'string'},
        'date': {
            'format': DATE_FORMATS_STRING,
            'type': 'date'
        },
        'direction': {'type': 'string'},
        'doc_type': {'index': 'not_analyzed', 'type': 'string'},
        'domain': {
            'fields': {
                'domain': {'index': 'analyzed', 'type': 'string'},
Example #19
0
from corehq.pillows.base import DEFAULT_META

from corehq.pillows.mappings.utils import mapping_from_json
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

LEDGER_INDEX = es_index("ledgers_2016-03-15")
LEDGER_ALIAS = "ledgers"
LEDGER_TYPE = "ledger"
LEDGER_MAPPING = mapping_from_json('ledger_mapping.json')

LEDGER_INDEX_INFO = ElasticsearchIndexInfo(
    index=LEDGER_INDEX,
    alias=LEDGER_ALIAS,
    type=LEDGER_TYPE,
    meta=DEFAULT_META,
    mapping=LEDGER_MAPPING,
)
Example #20
0
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

DOMAIN_INDEX = es_index("hqdomains_20160531_1131")
DOMAIN_MAPPING = {'_meta': {'comment': 'kkrampa modified on 2016/05/31',
                            'created': None},
 'date_detection': False,
 'date_formats': ['yyyy-MM-dd',
                  "yyyy-MM-dd'T'HH:mm:ssZZ",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss'Z'",
                  "yyyy-MM-dd'T'HH:mm:ssZ",
                  "yyyy-MM-dd'T'HH:mm:ssZZ'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
                  "yyyy-MM-dd'T'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss.SSSSSS",
                  "mm/dd/yy' 'HH:mm:ss"],
 'dynamic': False,
 'properties': {'area': {'type': 'string'},
                'attribution_notes': {'type': 'string'},
                'author': {'fields': {'author': {'index': 'analyzed',
                                                 'type': 'string'},
                                      'exact': {'index': 'not_analyzed',
                                                'type': 'string'}},
                           'type': 'multi_field'},
                'cached_properties': {'dynamic': False, 'type': 'object'},
                'call_center_config': {'dynamic': False,
                                       'properties': {'case_owner_id': {'type': 'string'},
                                                      'use_fixtures': {'type': 'boolean'},
Example #21
0
from __future__ import absolute_import
from __future__ import unicode_literals
from corehq.pillows.core import DATE_FORMATS_STRING, DATE_FORMATS_ARR
from corehq.pillows.mappings import NULL_VALUE
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

XFORM_INDEX = es_index("xforms_2016-07-07")

XFORM_MAPPING = {
    "date_detection": False,
    "date_formats": DATE_FORMATS_ARR,  # for parsing the explicitly defined dates
    'dynamic': False,
    "_meta": {
        "created": '2013-08-13',
    },
    "properties": {
        'doc_type': {'type': 'string'},
        'inserted_at': {"type": "date", "format": DATE_FORMATS_STRING},
        'user_type': {'type': 'string', "index": "not_analyzed", "null_value": NULL_VALUE},
        "domain": {
            "type": "multi_field",
            "fields": {
                "domain": {"type": "string", "index": "analyzed"},
                "exact": {"type": "string", "index": "not_analyzed"}
                # exact is full text string match - hyphens get parsed in standard
                # analyzer
                # in queries you can access by domain.exact
            }
        },
        "xmlns": {
Example #22
0
from corehq.util.elastic import es_index
from corehq.pillows.mappings.utils import mapping_from_json
from pillowtop.es_utils import ElasticsearchIndexInfo

APP_INDEX = es_index("hqapps_2019-08-14")
APP_MAPPING = mapping_from_json('app_mapping.json')
APP_ES_ALIAS = "hqapps"
APP_ES_TYPE = "app"

APP_INDEX_INFO = ElasticsearchIndexInfo(
    index=APP_INDEX,
    alias=APP_ES_ALIAS,
    type=APP_ES_TYPE,
    mapping=APP_MAPPING
)
Example #23
0
from corehq.pillows.core import DATE_FORMATS_ARR, DATE_FORMATS_STRING
from corehq.util.elastic import es_index

CASE_INDEX = es_index("hqcases_7a8d2b81335e0a8cef1de718313a23b9")


CASE_MAPPING = {
    'date_detection': False,
    'date_formats': DATE_FORMATS_ARR,
    'dynamic': False,
    '_meta': {
        'comment': '',
        'created': '2013-09-19 @dmyung'
    },
    'properties': {
        'actions': {'dynamic': False,
                    'properties': {
                        'action_type': {'type': 'string'},
                        'date': {'format': DATE_FORMATS_STRING,
                                 'type': 'date'},
                        'doc_type': {'index': 'not_analyzed',
                                     'type': 'string'},
                        'indices': {'dynamic': False,
                                    'properties': {
                                        'doc_type': {'index': 'not_analyzed',
                                                     'type': 'string'},
                                        'identifier': {'type': 'string'},
                                        'referenced_id': {'type': 'string'},
                                        'referenced_type': {'type': 'string'}
                                    },
                                    'type': 'object'},
Example #24
0
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

USER_INDEX = es_index("hqusers_2016-09-29")
USER_MAPPING={'_all': {'analyzer': 'standard'},
 '_meta': {'created': None},
 'date_detection': False,
 'date_formats': ['yyyy-MM-dd',
                  "yyyy-MM-dd'T'HH:mm:ssZZ",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss'Z'",
                  "yyyy-MM-dd'T'HH:mm:ssZ",
                  "yyyy-MM-dd'T'HH:mm:ssZZ'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
                  "yyyy-MM-dd'T'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss.SSSSSS",
                  "mm/dd/yy' 'HH:mm:ss"],
 'dynamic': False,
 'properties': {'CURRENT_VERSION': {'type': 'string'},
                'base_doc': {'type': 'string'},
                'created_on': {'format': "yyyy-MM-dd||yyyy-MM-dd'T'HH:mm:ssZZ||yyyy-MM-dd'T'HH:mm:ss.SSSSSS||yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'||yyyy-MM-dd'T'HH:mm:ss'Z'||yyyy-MM-dd'T'HH:mm:ssZ||yyyy-MM-dd'T'HH:mm:ssZZ'Z'||yyyy-MM-dd'T'HH:mm:ss.SSSZZ||yyyy-MM-dd'T'HH:mm:ss||yyyy-MM-dd' 'HH:mm:ss||yyyy-MM-dd' 'HH:mm:ss.SSSSSS||mm/dd/yy' 'HH:mm:ss",
                               'type': 'date'},
                'date_joined': {'format': "yyyy-MM-dd||yyyy-MM-dd'T'HH:mm:ssZZ||yyyy-MM-dd'T'HH:mm:ss.SSSSSS||yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'||yyyy-MM-dd'T'HH:mm:ss'Z'||yyyy-MM-dd'T'HH:mm:ssZ||yyyy-MM-dd'T'HH:mm:ssZZ'Z'||yyyy-MM-dd'T'HH:mm:ss.SSSZZ||yyyy-MM-dd'T'HH:mm:ss||yyyy-MM-dd' 'HH:mm:ss||yyyy-MM-dd' 'HH:mm:ss.SSSSSS||mm/dd/yy' 'HH:mm:ss",
                                'type': 'date'},
                'doc_type': {'index': 'not_analyzed', 'type': 'string'},
                'domain': {'fields': {'domain': {'index': 'analyzed',
                                                 'type': 'string'},
                                      'exact': {'index': 'not_analyzed',
                                                'type': 'string'}},
Example #25
0
from corehq.pillows.base import DEFAULT_META
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

REPORT_CASE_INDEX = es_index("report_cases_czei39du507m9mmpqk3y01x72a3ux4p0")

REPORT_CASE_MAPPING = {
    '_meta': {
        'comment': '2013-11-05 dmyung',
        'created': None
    },
    'date_detection':
    False,
    'date_formats': [
        'yyyy-MM-dd', "yyyy-MM-dd'T'HH:mm:ssZZ",
        "yyyy-MM-dd'T'HH:mm:ss.SSSSSS", "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
        "yyyy-MM-dd'T'HH:mm:ss'Z'", "yyyy-MM-dd'T'HH:mm:ssZ",
        "yyyy-MM-dd'T'HH:mm:ssZZ'Z'", "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
        "yyyy-MM-dd'T'HH:mm:ss", "yyyy-MM-dd' 'HH:mm:ss",
        "yyyy-MM-dd' 'HH:mm:ss.SSSSSS", "mm/dd/yy' 'HH:mm:ss"
    ],
    'dynamic':
    True,
    'dynamic_templates': [{
        'everything_else': {
            'mapping': {
                '{name}': {
                    'index': 'not_analyzed',
                    'type': 'string'
                }
            },
Example #26
0
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

USER_INDEX = es_index("hqusers_2016-02-16_1402")
USER_MAPPING={'_all': {'analyzer': 'standard'},
 '_meta': {'comment': 'Simon modified on 2016-01-20',
           'created': None},
 'date_detection': False,
 'date_formats': ['yyyy-MM-dd',
                  "yyyy-MM-dd'T'HH:mm:ssZZ",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss'Z'",
                  "yyyy-MM-dd'T'HH:mm:ssZ",
                  "yyyy-MM-dd'T'HH:mm:ssZZ'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
                  "yyyy-MM-dd'T'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss.SSSSSS",
                  "mm/dd/yy' 'HH:mm:ss"],
 'dynamic': False,
 'properties': {'CURRENT_VERSION': {'type': 'string'},
                'base_doc': {'type': 'string'},
                'created_on': {'format': "yyyy-MM-dd||yyyy-MM-dd'T'HH:mm:ssZZ||yyyy-MM-dd'T'HH:mm:ss.SSSSSS||yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'||yyyy-MM-dd'T'HH:mm:ss'Z'||yyyy-MM-dd'T'HH:mm:ssZ||yyyy-MM-dd'T'HH:mm:ssZZ'Z'||yyyy-MM-dd'T'HH:mm:ss.SSSZZ||yyyy-MM-dd'T'HH:mm:ss||yyyy-MM-dd' 'HH:mm:ss||yyyy-MM-dd' 'HH:mm:ss.SSSSSS||mm/dd/yy' 'HH:mm:ss",
                               'type': 'date'},
                'date_joined': {'format': "yyyy-MM-dd||yyyy-MM-dd'T'HH:mm:ssZZ||yyyy-MM-dd'T'HH:mm:ss.SSSSSS||yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'||yyyy-MM-dd'T'HH:mm:ss'Z'||yyyy-MM-dd'T'HH:mm:ssZ||yyyy-MM-dd'T'HH:mm:ssZZ'Z'||yyyy-MM-dd'T'HH:mm:ss.SSSZZ||yyyy-MM-dd'T'HH:mm:ss||yyyy-MM-dd' 'HH:mm:ss||yyyy-MM-dd' 'HH:mm:ss.SSSSSS||mm/dd/yy' 'HH:mm:ss",
                                'type': 'date'},
                'doc_type': {'index': 'not_analyzed', 'type': 'string'},
                'domain': {'fields': {'domain': {'index': 'analyzed',
                                                 'type': 'string'},
                                      'exact': {'index': 'not_analyzed',
Example #27
0
from corehq.pillows.base import DEFAULT_META
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

GROUP_INDEX = es_index("hqgroups_20150403_1501")
GROUP_MAPPING = {
    "date_formats": [
        "yyyy-MM-dd",
        "yyyy-MM-dd'T'HH:mm:ssZZ",
        "yyyy-MM-dd'T'HH:mm:ss.SSSSSS",
        "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
        "yyyy-MM-dd'T'HH:mm:ss'Z'",
        "yyyy-MM-dd'T'HH:mm:ssZ",
        "yyyy-MM-dd'T'HH:mm:ssZZ'Z'",
        "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
        "yyyy-MM-dd'T'HH:mm:ss",
        "yyyy-MM-dd' 'HH:mm:ss",
        "yyyy-MM-dd' 'HH:mm:ss.SSSSSS",
        "mm/dd/yy' 'HH:mm:ss"
    ],
    "dynamic": False,
    "_meta": {
        "comment": "Ethan updated on 2014-04-02",
        "created": None
    },
    "date_detection": False,
    "properties": {
        "doc_type": {
            "index": "not_analyzed",
            "type": "string"
        },
Example #28
0
from corehq.util.elastic import es_index

DOMAIN_INDEX = es_index("hqdomains_20160128_1552")
DOMAIN_MAPPING = {'_meta': {'comment': 'farid modified on 2015/11/23',
                            'created': None},
 'date_detection': False,
 'date_formats': ['yyyy-MM-dd',
                  "yyyy-MM-dd'T'HH:mm:ssZZ",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss'Z'",
                  "yyyy-MM-dd'T'HH:mm:ssZ",
                  "yyyy-MM-dd'T'HH:mm:ssZZ'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
                  "yyyy-MM-dd'T'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss.SSSSSS",
                  "mm/dd/yy' 'HH:mm:ss"],
 'dynamic': False,
 'properties': {'area': {'type': 'string'},
                'attribution_notes': {'type': 'string'},
                'author': {'fields': {'author': {'index': 'analyzed',
                                                 'type': 'string'},
                                      'exact': {'index': 'not_analyzed',
                                                'type': 'string'}},
                           'type': 'multi_field'},
                'cached_properties': {'dynamic': False, 'type': 'object'},
                'call_center_config': {'dynamic': False,
                                       'properties': {'case_owner_id': {'type': 'string'},
                                                      'use_fixtures': {'type': 'boolean'},
                                                      'case_type': {'type': 'string'},
Example #29
0
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

SMS_INDEX = es_index("smslogs_708c77f8e5fe00286fa5791e9fa7d45f")
SMS_MAPPING = {
    '_meta': {
        'comment':
        'Autogenerated [corehq.apps.sms.models.SMSLog] mapping from ptop_generate_mapping 09/23/2013',
        'created': None
    },
    'date_detection':
    False,
    'date_formats': [
        'yyyy-MM-dd', "yyyy-MM-dd'T'HH:mm:ssZZ",
        "yyyy-MM-dd'T'HH:mm:ss.SSSSSS", "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
        "yyyy-MM-dd'T'HH:mm:ss'Z'", "yyyy-MM-dd'T'HH:mm:ssZ",
        "yyyy-MM-dd'T'HH:mm:ssZZ'Z'", "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
        "yyyy-MM-dd'T'HH:mm:ss", "yyyy-MM-dd' 'HH:mm:ss",
        "yyyy-MM-dd' 'HH:mm:ss.SSSSSS", "mm/dd/yy' 'HH:mm:ss"
    ],
    'dynamic':
    False,
    'properties': {
        'backend_api': {
            'type': 'string'
        },
        'backend_id': {
            'type': 'string'
        },
        'base_doc': {
            'type': 'string'
from corehq.pillows.core import DATE_FORMATS_ARR, DATE_FORMATS_STRING
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

SMS_INDEX = es_index("smslogs_2020-01-28")
SMS_MAPPING = {
    '_meta': {
        'comment':
        'Autogenerated [corehq.apps.sms.models.SMSLog] mapping from ptop_generate_mapping 09/23/2013',
        'created': None
    },
    "_all": {
        "enabled": False
    },
    'date_detection': False,
    'date_formats': DATE_FORMATS_ARR,
    'dynamic': False,
    'properties': {
        'backend_api': {
            'type': 'string'
        },
        'backend_id': {
            'type': 'string'
        },
        'base_doc': {
            'type': 'string'
        },
        'billed': {
            'type': 'boolean'
        },
        'couch_recipient': {
Example #31
0
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

APP_INDEX = es_index("hqapps_2016-10-20_1835")
APP_MAPPING={'_meta': {'created': None},
 'date_detection': False,
 'date_formats': ['yyyy-MM-dd',
                  "yyyy-MM-dd'T'HH:mm:ssZZ",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss'Z'",
                  "yyyy-MM-dd'T'HH:mm:ssZ",
                  "yyyy-MM-dd'T'HH:mm:ssZZ'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
                  "yyyy-MM-dd'T'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss.SSSSSS",
                  "mm/dd/yy' 'HH:mm:ss"],
 'dynamic': False,
 'properties': {'admin_password': {'type': 'string'},
                'admin_password_charset': {'type': 'string'},
                'application_version': {'type': 'string'},
                'attribution_notes': {'type': 'string'},
                'build_broken': {'type': 'boolean'},
                'build_comment': {'type': 'string'},
                'build_langs': {'type': 'string'},
                'build_signed': {'type': 'boolean'},
                'build_spec': {'dynamic': False,
                               'properties': {'build_number': {'type': 'long'},
                                              'doc_type': {'index': 'not_analyzed',
                                                           'type': 'string'},
from django.conf import settings

from corehq.pillows.core import DATE_FORMATS_STRING, DATE_FORMATS_ARR
from corehq.pillows.mappings import NULL_VALUE
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

XFORM_INDEX = es_index(settings.ES_XFORM_INDEX_NAME)

XFORM_MAPPING = {
    "date_detection": False,
    "date_formats":
    DATE_FORMATS_ARR,  # for parsing the explicitly defined dates
    'dynamic': False,
    "_meta": {
        "created": '2013-08-13',
    },
    "properties": {
        'doc_type': {
            'type': 'string'
        },
        'inserted_at': {
            "type": "date",
            "format": DATE_FORMATS_STRING
        },
        'user_type': {
            'type': 'string',
            "index": "not_analyzed",
            "null_value": NULL_VALUE
        },
        "domain": {
Example #33
0
from __future__ import absolute_import
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

GROUP_INDEX = es_index("hqgroups_2017-05-29")
GROUP_MAPPING = {
    "date_formats": [
        "yyyy-MM-dd", "yyyy-MM-dd'T'HH:mm:ssZZ",
        "yyyy-MM-dd'T'HH:mm:ss.SSSSSS", "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
        "yyyy-MM-dd'T'HH:mm:ss'Z'", "yyyy-MM-dd'T'HH:mm:ssZ",
        "yyyy-MM-dd'T'HH:mm:ssZZ'Z'", "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
        "yyyy-MM-dd'T'HH:mm:ss", "yyyy-MM-dd' 'HH:mm:ss",
        "yyyy-MM-dd' 'HH:mm:ss.SSSSSS", "mm/dd/yy' 'HH:mm:ss"
    ],
    "dynamic":
    False,
    "_meta": {
        "comment": "Ethan updated on 2014-04-02",
        "created": None
    },
    "date_detection":
    False,
    "properties": {
        "doc_type": {
            "index": "not_analyzed",
            "type": "string"
        },
        "domain": {
            "fields": {
                "domain": {
                    "index": "analyzed",
Example #34
0
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

USER_INDEX = es_index("hqusers_2016-09-29")
USER_MAPPING = {
    '_all': {
        'analyzer': 'standard'
    },
    '_meta': {
        'created': None
    },
    'date_detection':
    False,
    'date_formats': [
        'yyyy-MM-dd', "yyyy-MM-dd'T'HH:mm:ssZZ",
        "yyyy-MM-dd'T'HH:mm:ss.SSSSSS", "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
        "yyyy-MM-dd'T'HH:mm:ss'Z'", "yyyy-MM-dd'T'HH:mm:ssZ",
        "yyyy-MM-dd'T'HH:mm:ssZZ'Z'", "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
        "yyyy-MM-dd'T'HH:mm:ss", "yyyy-MM-dd' 'HH:mm:ss",
        "yyyy-MM-dd' 'HH:mm:ss.SSSSSS", "mm/dd/yy' 'HH:mm:ss"
    ],
    'dynamic':
    False,
    'properties': {
        'CURRENT_VERSION': {
            'type': 'string'
        },
        'base_doc': {
            'type': 'string'
        },
        'created_on': {
Example #35
0
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

SMS_INDEX = es_index("smslogs_708c77f8e5fe00286fa5791e9fa7d45f")
SMS_MAPPING={'_meta': {'comment': 'Autogenerated [corehq.apps.sms.models.SMSLog] mapping from ptop_generate_mapping 09/23/2013',
           'created': None},
 'date_detection': False,
 'date_formats': ['yyyy-MM-dd',
                  "yyyy-MM-dd'T'HH:mm:ssZZ",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss'Z'",
                  "yyyy-MM-dd'T'HH:mm:ssZ",
                  "yyyy-MM-dd'T'HH:mm:ssZZ'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
                  "yyyy-MM-dd'T'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss.SSSSSS",
                  "mm/dd/yy' 'HH:mm:ss"],
 'dynamic': False,
 'properties': {'backend_api': {'type': 'string'},
                'backend_id': {'type': 'string'},
                'base_doc': {'type': 'string'},
                'billed': {'type': 'boolean'},
                'couch_recipient': {'type': 'string'},
                'couch_recipient_doc_type': {'type': 'string'},
                'date': {'format': "yyyy-MM-dd||yyyy-MM-dd'T'HH:mm:ssZZ||yyyy-MM-dd'T'HH:mm:ss.SSSSSS||yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'||yyyy-MM-dd'T'HH:mm:ss'Z'||yyyy-MM-dd'T'HH:mm:ssZ||yyyy-MM-dd'T'HH:mm:ssZZ'Z'||yyyy-MM-dd'T'HH:mm:ss.SSSZZ||yyyy-MM-dd'T'HH:mm:ss||yyyy-MM-dd' 'HH:mm:ss||yyyy-MM-dd' 'HH:mm:ss.SSSSSS||mm/dd/yy' 'HH:mm:ss",
                         'type': 'date'},
                'direction': {'type': 'string'},
                'doc_type': {'index': 'not_analyzed', 'type': 'string'},
                'domain': {'fields': {'domain': {'index': 'analyzed',
Example #36
0
from corehq.util.elastic import es_index

APP_INDEX = es_index("hqapps_2016-03-01_2128")
APP_MAPPING={'_meta': {'created': None},
 'date_detection': False,
 'date_formats': ['yyyy-MM-dd',
                  "yyyy-MM-dd'T'HH:mm:ssZZ",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss'Z'",
                  "yyyy-MM-dd'T'HH:mm:ssZ",
                  "yyyy-MM-dd'T'HH:mm:ssZZ'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
                  "yyyy-MM-dd'T'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss.SSSSSS",
                  "mm/dd/yy' 'HH:mm:ss"],
 'dynamic': False,
 'properties': {'admin_password': {'type': 'string'},
                'admin_password_charset': {'type': 'string'},
                'application_version': {'type': 'string'},
                'attribution_notes': {'type': 'string'},
                'build_broken': {'type': 'boolean'},
                'build_comment': {'type': 'string'},
                'build_langs': {'type': 'string'},
                'build_signed': {'type': 'boolean'},
                'build_spec': {'dynamic': False,
                               'properties': {'build_number': {'type': 'long'},
                                              'doc_type': {'index': 'not_analyzed',
                                                           'type': 'string'},
                                              'latest': {'type': 'boolean'},
from __future__ import absolute_import
from __future__ import unicode_literals
from corehq.pillows.mappings.case_mapping import CASE_ES_TYPE
from corehq.pillows.mappings.utils import mapping_from_json
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo


CASE_SEARCH_INDEX = es_index("case_search_2018-05-29")
CASE_SEARCH_ALIAS = "case_search"
CASE_SEARCH_MAX_RESULTS = 100
CASE_SEARCH_MAPPING = mapping_from_json('case_search_mapping.json')


CASE_SEARCH_INDEX_INFO = ElasticsearchIndexInfo(
    index=CASE_SEARCH_INDEX,
    alias=CASE_SEARCH_ALIAS,
    type=CASE_ES_TYPE,
    mapping=CASE_SEARCH_MAPPING,
)
Example #38
0
from __future__ import absolute_import
from __future__ import unicode_literals
from corehq.util.elastic import es_index
from corehq.pillows.mappings.utils import mapping_from_json
from pillowtop.es_utils import ElasticsearchIndexInfo

APP_INDEX = es_index("hqapps_2019-01-23")
APP_MAPPING = mapping_from_json('app_mapping.json')
APP_ES_ALIAS = "hqapps"
APP_ES_TYPE = "app"

APP_INDEX_INFO = ElasticsearchIndexInfo(index=APP_INDEX,
                                        alias=APP_ES_ALIAS,
                                        type=APP_ES_TYPE,
                                        mapping=APP_MAPPING)
Example #39
0
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

APP_INDEX = es_index("hqapps_2016-10-20_1835")
APP_MAPPING = {
    '_meta': {
        'created': None
    },
    'date_detection':
    False,
    'date_formats': [
        'yyyy-MM-dd', "yyyy-MM-dd'T'HH:mm:ssZZ",
        "yyyy-MM-dd'T'HH:mm:ss.SSSSSS", "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
        "yyyy-MM-dd'T'HH:mm:ss'Z'", "yyyy-MM-dd'T'HH:mm:ssZ",
        "yyyy-MM-dd'T'HH:mm:ssZZ'Z'", "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
        "yyyy-MM-dd'T'HH:mm:ss", "yyyy-MM-dd' 'HH:mm:ss",
        "yyyy-MM-dd' 'HH:mm:ss.SSSSSS", "mm/dd/yy' 'HH:mm:ss"
    ],
    'dynamic':
    False,
    'properties': {
        'admin_password': {
            'type': 'string'
        },
        'admin_password_charset': {
            'type': 'string'
        },
        'application_version': {
            'type': 'string'
        },
        'attribution_notes': {
Example #40
0
from __future__ import absolute_import
from __future__ import unicode_literals
from corehq.util.elastic import es_index
from corehq.pillows.core import DATE_FORMATS_ARR, DATE_FORMATS_STRING

from pillowtop.es_utils import ElasticsearchIndexInfo


USER_INDEX = es_index("hqusers_2017-09-07")
USER_MAPPING = {'_all': {'analyzer': 'standard'},
 '_meta': {'created': None},
 'date_detection': False,
 'date_formats': DATE_FORMATS_ARR,
 'dynamic': False,
 'properties': {'CURRENT_VERSION': {'type': 'string'},
                'base_doc': {'type': 'string'},
                'created_on': {'format': DATE_FORMATS_STRING,
                               'type': 'date'},
                'date_joined': {'format': DATE_FORMATS_STRING,
                                'type': 'date'},
                'doc_type': {'index': 'not_analyzed', 'type': 'string'},
                'domain': {'fields': {'domain': {'index': 'analyzed',
                                                 'type': 'string'},
                                      'exact': {'index': 'not_analyzed',
                                                'type': 'string'}},
                           'type': 'multi_field'},
                'user_location_id': {'index': 'not_analyzed', 'type': 'string'},
                'location_id': {'index': 'not_analyzed', 'type': 'string'},
                'assigned_location_ids': {"type": "string"},
                'phone_numbers': {"type": "string"},
                'domain_membership': {'dynamic': False,
Example #41
0
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

DOMAIN_INDEX = es_index("hqdomains_2016-08-08")
DOMAIN_MAPPING = {
    '_meta': {
        'comment': '',
        'created': None
    },
    'date_detection':
    False,
    'date_formats': [
        'yyyy-MM-dd', "yyyy-MM-dd'T'HH:mm:ssZZ",
        "yyyy-MM-dd'T'HH:mm:ss.SSSSSS", "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
        "yyyy-MM-dd'T'HH:mm:ss'Z'", "yyyy-MM-dd'T'HH:mm:ssZ",
        "yyyy-MM-dd'T'HH:mm:ssZZ'Z'", "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
        "yyyy-MM-dd'T'HH:mm:ss", "yyyy-MM-dd' 'HH:mm:ss",
        "yyyy-MM-dd' 'HH:mm:ss.SSSSSS", "mm/dd/yy' 'HH:mm:ss"
    ],
    'dynamic':
    False,
    'properties': {
        'area': {
            'type': 'string'
        },
        'attribution_notes': {
            'type': 'string'
        },
        'author': {
            'fields': {
                'author': {
Example #42
0
from corehq.util.elastic import es_index
from corehq.pillows.mappings.utils import mapping_from_json
from pillowtop.es_utils import ElasticsearchIndexInfo

APP_INDEX = es_index("hqapps_2020-02-26")
APP_MAPPING = mapping_from_json('app_mapping.json')
APP_ES_ALIAS = "hqapps"
APP_ES_TYPE = "app"

APP_INDEX_INFO = ElasticsearchIndexInfo(index=APP_INDEX,
                                        alias=APP_ES_ALIAS,
                                        type=APP_ES_TYPE,
                                        mapping=APP_MAPPING)
Example #43
0
from corehq.pillows.base import DEFAULT_META
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo


REPORT_CASE_INDEX = es_index("report_cases_czei39du507m9mmpqk3y01x72a3ux4p0")

REPORT_CASE_MAPPING={'_meta': {'comment': '2013-11-05 dmyung',
           'created': None},
 'date_detection': False,
 'date_formats': ['yyyy-MM-dd',
                  "yyyy-MM-dd'T'HH:mm:ssZZ",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss'Z'",
                  "yyyy-MM-dd'T'HH:mm:ssZ",
                  "yyyy-MM-dd'T'HH:mm:ssZZ'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
                  "yyyy-MM-dd'T'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss.SSSSSS",
                  "mm/dd/yy' 'HH:mm:ss"],
 'dynamic': True,
 'dynamic_templates': [{'everything_else': {'mapping': {'{name}': {'index': 'not_analyzed',
                                                                   'type': 'string'}},
                                            'match': '*',
                                            'match_mapping_type': 'string'}}],
 'properties': {'actions': {'dynamic': True,
                            'properties': {'action_type': {'type': 'string'},
                                           'attachments': {'dynamic': False,
                                                           'properties': {'attachment_from': {'type': 'string'},
Example #44
0
from corehq.util.elastic import es_index

USER_INDEX = es_index("hqusers_2016-01-20_1610")
USER_MAPPING = {
    "_all": {"analyzer": "standard"},
    "_meta": {"comment": "Simon modified on 2016-01-20", "created": None},
    "date_detection": False,
    "date_formats": [
        "yyyy-MM-dd",
        "yyyy-MM-dd'T'HH:mm:ssZZ",
        "yyyy-MM-dd'T'HH:mm:ss.SSSSSS",
        "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
        "yyyy-MM-dd'T'HH:mm:ss'Z'",
        "yyyy-MM-dd'T'HH:mm:ssZ",
        "yyyy-MM-dd'T'HH:mm:ssZZ'Z'",
        "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
        "yyyy-MM-dd'T'HH:mm:ss",
        "yyyy-MM-dd' 'HH:mm:ss",
        "yyyy-MM-dd' 'HH:mm:ss.SSSSSS",
        "mm/dd/yy' 'HH:mm:ss",
    ],
    "dynamic": False,
    "properties": {
        "CURRENT_VERSION": {"type": "string"},
        "base_doc": {"type": "string"},
        "created_on": {
            "format": "yyyy-MM-dd||yyyy-MM-dd'T'HH:mm:ssZZ||yyyy-MM-dd'T'HH:mm:ss.SSSSSS||yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'||yyyy-MM-dd'T'HH:mm:ss'Z'||yyyy-MM-dd'T'HH:mm:ssZ||yyyy-MM-dd'T'HH:mm:ssZZ'Z'||yyyy-MM-dd'T'HH:mm:ss.SSSZZ||yyyy-MM-dd'T'HH:mm:ss||yyyy-MM-dd' 'HH:mm:ss||yyyy-MM-dd' 'HH:mm:ss.SSSSSS||mm/dd/yy' 'HH:mm:ss",
            "type": "date",
        },
        "date_joined": {
            "format": "yyyy-MM-dd||yyyy-MM-dd'T'HH:mm:ssZZ||yyyy-MM-dd'T'HH:mm:ss.SSSSSS||yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'||yyyy-MM-dd'T'HH:mm:ss'Z'||yyyy-MM-dd'T'HH:mm:ssZ||yyyy-MM-dd'T'HH:mm:ssZZ'Z'||yyyy-MM-dd'T'HH:mm:ss.SSSZZ||yyyy-MM-dd'T'HH:mm:ss||yyyy-MM-dd' 'HH:mm:ss||yyyy-MM-dd' 'HH:mm:ss.SSSSSS||mm/dd/yy' 'HH:mm:ss",
from corehq.pillows.mappings.case_mapping import CASE_ES_TYPE
from corehq.pillows.mappings.utils import mapping_from_json
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo


CASE_SEARCH_INDEX = es_index("case_search_2018-05-29")
CASE_SEARCH_ALIAS = "case_search"
CASE_SEARCH_MAX_RESULTS = 100
CASE_SEARCH_MAPPING = mapping_from_json('case_search_mapping.json')


CASE_SEARCH_INDEX_INFO = ElasticsearchIndexInfo(
    index=CASE_SEARCH_INDEX,
    alias=CASE_SEARCH_ALIAS,
    type=CASE_ES_TYPE,
    mapping=CASE_SEARCH_MAPPING,
)
Example #46
0
from corehq.pillows.core import DATE_FORMATS_STRING, DATE_FORMATS_ARR
from corehq.pillows.mappings import NULL_VALUE
from corehq.util.elastic import es_index


XFORM_INDEX = es_index("xforms_2016-06-09")


XFORM_MAPPING = {
    "date_detection": False,
    "date_formats": DATE_FORMATS_ARR,  # for parsing the explicitly defined dates
    'dynamic': False,
    "_meta": {
        "created": '2013-08-13',
    },
    "properties": {
        'doc_type': {'type': 'string'},
        'inserted_at': {"type": "date", "format": DATE_FORMATS_STRING},
        'user_type': {'type': 'string', "index": "not_analyzed", "null_value": NULL_VALUE},
        "domain": {
            "type": "multi_field",
            "fields": {
                "domain": {"type": "string", "index": "analyzed"},
                "exact": {"type": "string", "index": "not_analyzed"}
                # exact is full text string match - hyphens get parsed in standard
                # analyzer
                # in queries you can access by domain.exact
            }
        },
        "xmlns": {
            "type": "multi_field",
Example #47
0
from corehq.pillows.core import DATE_FORMATS_STRING, DATE_FORMATS_ARR
from corehq.pillows.mappings import NULL_VALUE
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

XFORM_INDEX = es_index("xforms_2016-07-07")

XFORM_MAPPING = {
    "date_detection": False,
    "date_formats":
    DATE_FORMATS_ARR,  # for parsing the explicitly defined dates
    'dynamic': False,
    "_meta": {
        "created": '2013-08-13',
    },
    "properties": {
        'doc_type': {
            'type': 'string'
        },
        'inserted_at': {
            "type": "date",
            "format": DATE_FORMATS_STRING
        },
        'user_type': {
            'type': 'string',
            "index": "not_analyzed",
            "null_value": NULL_VALUE
        },
        "domain": {
            "type": "multi_field",
            "fields": {
Example #48
0
from corehq.util.elastic import es_index
from corehq.pillows.core import DATE_FORMATS_ARR, DATE_FORMATS_STRING

from pillowtop.es_utils import ElasticsearchIndexInfo

USER_INDEX = es_index("hqusers_2017-05-11")
USER_MAPPING = {'_all': {'analyzer': 'standard'},
 '_meta': {'created': None},
 'date_detection': False,
 'date_formats': DATE_FORMATS_ARR,
 'dynamic': False,
 'properties': {'CURRENT_VERSION': {'type': 'string'},
                'base_doc': {'type': 'string'},
                'created_on': {'format': DATE_FORMATS_STRING,
                               'type': 'date'},
                'date_joined': {'format': DATE_FORMATS_STRING,
                                'type': 'date'},
                'doc_type': {'index': 'not_analyzed', 'type': 'string'},
                'domain': {'fields': {'domain': {'index': 'analyzed',
                                                 'type': 'string'},
                                      'exact': {'index': 'not_analyzed',
                                                'type': 'string'}},
                           'type': 'multi_field'},
                'user_location_id': {'index': 'not_analyzed', 'type': 'string'},
                'location_id': {'index': 'not_analyzed', 'type': 'string'},
                'assigned_location_ids': {"type": "string"},
                'phone_numbers': {"type": "string"},
                'domain_membership': {'dynamic': False,
                                      'properties': {'doc_type': {'index': 'not_analyzed',
                                                                  'type': 'string'},
                                                     'domain': {'fields': {'domain': {'index': 'analyzed',
Example #49
0
from corehq.pillows.core import DATE_FORMATS_ARR, DATE_FORMATS_STRING
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

SMS_INDEX = es_index("smslogs_2017-02-09")
SMS_MAPPING = {
    '_meta': {
       'comment': 'Autogenerated [corehq.apps.sms.models.SMSLog] mapping from ptop_generate_mapping 09/23/2013',
       'created': None
    },
    'date_detection': False,
    'date_formats': DATE_FORMATS_ARR,
    'dynamic': False,
    'properties': {
        'backend_api': {'type': 'string'},
        'backend_id': {'type': 'string'},
        'base_doc': {'type': 'string'},
        'billed': {'type': 'boolean'},
        'couch_recipient': {'type': 'string'},
        'couch_recipient_doc_type': {'type': 'string'},
        'date': {
            'format': DATE_FORMATS_STRING,
            'type': 'date'
        },
        'direction': {'type': 'string'},
        'doc_type': {'index': 'not_analyzed', 'type': 'string'},
        'domain': {
            'fields': {
                'domain': {'index': 'analyzed', 'type': 'string'},
                'exact': {'index': 'not_analyzed', 'type': 'string'}
            },
Example #50
0
from corehq.util.elastic import es_index

DOMAIN_INDEX = es_index("hqdomains_20160318_1339")
DOMAIN_MAPPING = {'_meta': {'comment': 'j$ modified on 2016/03/18',
                            'created': None},
 'date_detection': False,
 'date_formats': ['yyyy-MM-dd',
                  "yyyy-MM-dd'T'HH:mm:ssZZ",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss'Z'",
                  "yyyy-MM-dd'T'HH:mm:ssZ",
                  "yyyy-MM-dd'T'HH:mm:ssZZ'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
                  "yyyy-MM-dd'T'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss.SSSSSS",
                  "mm/dd/yy' 'HH:mm:ss"],
 'dynamic': False,
 'properties': {'area': {'type': 'string'},
                'attribution_notes': {'type': 'string'},
                'author': {'fields': {'author': {'index': 'analyzed',
                                                 'type': 'string'},
                                      'exact': {'index': 'not_analyzed',
                                                'type': 'string'}},
                           'type': 'multi_field'},
                'cached_properties': {'dynamic': False, 'type': 'object'},
                'call_center_config': {'dynamic': False,
                                       'properties': {'case_owner_id': {'type': 'string'},
                                                      'use_fixtures': {'type': 'boolean'},
                                                      'case_type': {'type': 'string'},
Example #51
0
from __future__ import absolute_import
from __future__ import unicode_literals
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

APP_INDEX = es_index("hqapps_2017-05-22_1426")
APP_MAPPING={'_meta': {'created': None},
 'date_detection': False,
 'date_formats': ['yyyy-MM-dd',
                  "yyyy-MM-dd'T'HH:mm:ssZZ",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss'Z'",
                  "yyyy-MM-dd'T'HH:mm:ssZ",
                  "yyyy-MM-dd'T'HH:mm:ssZZ'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
                  "yyyy-MM-dd'T'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss.SSSSSS",
                  "mm/dd/yy' 'HH:mm:ss"],
 'dynamic': False,
 'properties': {'admin_password': {'type': 'string'},
                'admin_password_charset': {'type': 'string'},
                'application_version': {'type': 'string'},
                'attribution_notes': {'type': 'string'},
                'build_broken': {'type': 'boolean'},
                'build_comment': {'type': 'string'},
                'build_langs': {'type': 'string'},
                'build_signed': {'type': 'boolean'},
                'build_spec': {'dynamic': False,
                               'properties': {'build_number': {'type': 'long'},
Example #52
0
from corehq.pillows.core import DATE_FORMATS_STRING, DATE_FORMATS_ARR
from corehq.util.elastic import es_index

XFORM_INDEX = es_index("xforms_20150403-1728")


XFORM_MAPPING = {
    "date_detection": False,
    "date_formats": DATE_FORMATS_ARR,  # for parsing the explicitly defined dates
    'dynamic': False,
    "_meta": {
        "created": '2013-08-13',
    },
    "properties": {
        'doc_type': {'type': 'string'},
        "domain": {
            "type": "multi_field",
            "fields": {
                "domain": {"type": "string", "index": "analyzed"},
                "exact": {"type": "string", "index": "not_analyzed"}
                # exact is full text string match - hyphens get parsed in standard
                # analyzer
                # in queries you can access by domain.exact
            }
        },
        "xmlns": {
            "type": "multi_field",
            "fields": {
                "xmlns": {"type": "string", "index": "analyzed"},
                "exact": {"type": "string", "index": "not_analyzed"}
            }
Example #53
0
from __future__ import absolute_import
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

APP_INDEX = es_index("hqapps_2017-05-22_1426")
APP_MAPPING={'_meta': {'created': None},
 'date_detection': False,
 'date_formats': ['yyyy-MM-dd',
                  "yyyy-MM-dd'T'HH:mm:ssZZ",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss'Z'",
                  "yyyy-MM-dd'T'HH:mm:ssZ",
                  "yyyy-MM-dd'T'HH:mm:ssZZ'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
                  "yyyy-MM-dd'T'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss.SSSSSS",
                  "mm/dd/yy' 'HH:mm:ss"],
 'dynamic': False,
 'properties': {'admin_password': {'type': 'string'},
                'admin_password_charset': {'type': 'string'},
                'application_version': {'type': 'string'},
                'attribution_notes': {'type': 'string'},
                'build_broken': {'type': 'boolean'},
                'build_comment': {'type': 'string'},
                'build_langs': {'type': 'string'},
                'build_signed': {'type': 'boolean'},
                'build_spec': {'dynamic': False,
                               'properties': {'build_number': {'type': 'long'},
                                              'doc_type': {'index': 'not_analyzed',
Example #54
0
from __future__ import absolute_import
from __future__ import unicode_literals
from corehq.pillows.mappings.utils import mapping_from_json
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo


LEDGER_INDEX = es_index("ledgers_2016-03-15")
LEDGER_ALIAS = "ledgers"
LEDGER_TYPE = "ledger"
LEDGER_MAPPING = mapping_from_json('ledger_mapping.json')


LEDGER_INDEX_INFO = ElasticsearchIndexInfo(
    index=LEDGER_INDEX,
    alias=LEDGER_ALIAS,
    type=LEDGER_TYPE,
    mapping=LEDGER_MAPPING,
)
Example #55
0
from __future__ import absolute_import
from __future__ import unicode_literals
from corehq.pillows.mappings.case_mapping import CASE_ES_TYPE
from corehq.pillows.mappings.utils import mapping_from_json
from corehq.util.elastic import es_index
from pillowtop.es_utils import ElasticsearchIndexInfo

CASE_SEARCH_INDEX = es_index("case_search_2016-03-15")
CASE_SEARCH_ALIAS = "case_search"
CASE_SEARCH_MAX_RESULTS = 100
CASE_SEARCH_MAPPING = mapping_from_json('case_search_mapping.json')

CASE_SEARCH_INDEX_INFO = ElasticsearchIndexInfo(
    index=CASE_SEARCH_INDEX,
    alias=CASE_SEARCH_ALIAS,
    type=CASE_ES_TYPE,
    mapping=CASE_SEARCH_MAPPING,
)
Example #56
0
from corehq.util.elastic import es_index

APP_INDEX = es_index("hqapps_2016-01-05_1821")
APP_MAPPING={'_meta': {'created': None},
 'date_detection': False,
 'date_formats': ['yyyy-MM-dd',
                  "yyyy-MM-dd'T'HH:mm:ssZZ",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss'Z'",
                  "yyyy-MM-dd'T'HH:mm:ssZ",
                  "yyyy-MM-dd'T'HH:mm:ssZZ'Z'",
                  "yyyy-MM-dd'T'HH:mm:ss.SSSZZ",
                  "yyyy-MM-dd'T'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss",
                  "yyyy-MM-dd' 'HH:mm:ss.SSSSSS",
                  "mm/dd/yy' 'HH:mm:ss"],
 'dynamic': False,
 'properties': {'admin_password': {'type': 'string'},
                'admin_password_charset': {'type': 'string'},
                'application_version': {'type': 'string'},
                'attribution_notes': {'type': 'string'},
                'build_broken': {'type': 'boolean'},
                'build_comment': {'type': 'string'},
                'build_langs': {'type': 'string'},
                'build_signed': {'type': 'boolean'},
                'build_spec': {'dynamic': False,
                               'properties': {'build_number': {'type': 'long'},
                                              'doc_type': {'index': 'not_analyzed',
                                                           'type': 'string'},
                                              'latest': {'type': 'boolean'},