Exemplo n.º 1
0
 def mappings(cls):
     return {
         cls.__type__: mappings.for_type(
             cls.__type__,
             mappings.properties(mappings.type_mapping("location", "geo_point")),
             mappings.dynamic_templates([mappings.EXACT]),
         )
     }
Exemplo n.º 2
0
 def mappings(cls):
     return {
         cls.__type__ : mappings.for_type(
             cls.__type__,
                 mappings.properties(mappings.type_mapping("location", "geo_point")),
                 mappings.dynamic_templates(
                 [
                     mappings.EXACT,
                 ]
             )
         )
     }
Exemplo n.º 3
0
                                "exact" : {"type" : "{dynamic_type}", "index" : "not_analyzed", "store" : "yes"}
                            }
                        }
                    }
                }
            ]
        }
    }
}
MAPPINGS['advert'] = {'advert':MAPPINGS['account']['account']}
"""

MAPPINGS = {
    "account" : mappings.for_type(
        "account",
            mappings.properties(mappings.type_mapping("loc", "geo_point")),
            mappings.dynamic_templates(
            [
                mappings.EXACT,
                mappings.dynamic_type_template("geo", "loc", mappings.make_mapping("geo_point"))
            ]
        )
    ),
    "advert" : mappings.for_type(
        "advert",
            mappings.properties(mappings.type_mapping("loc", "geo_point")),
            mappings.dynamic_templates(
            [
                mappings.EXACT,
                mappings.dynamic_type_template("geo", "loc", mappings.make_mapping("geo_point"))
            ]
Exemplo n.º 4
0
        }
    }
}
MAPPINGS['account'] = {'account':MAPPINGS['record']['record']}
MAPPINGS['pages'] = {'pages':MAPPINGS['record']['record']}
"""
MAPPINGS = {
    "song_store" : mappings.for_type("song_store", mappings.dynamic_templates([mappings.EXACT])),
    "version_store" : mappings.for_type("version_store", mappings.dynamic_templates([mappings.EXACT])),
    "singer_store" : mappings.for_type("singer_store", mappings.dynamic_templates([mappings.EXACT])),
    "song2song" : mappings.for_type("song2song", mappings.dynamic_templates([mappings.EXACT])),
    "song2version" : mappings.for_type("song2version", mappings.dynamic_templates([mappings.EXACT])),
    "singer2version" : mappings.for_type("singer2version", mappings.dynamic_templates([mappings.EXACT])),
    "song" : mappings.for_type(
        "song", 
            mappings.properties(mappings.type_mapping("canonical_location", "geo_point")),
            mappings.dynamic_templates(
            [
                mappings.EXACT, 
                mappings.dynamic_type_template("geo", "canonical_location", mappings.make_mapping("geo_point"))
            ]
        )
    ),
    "version" : mappings.for_type(
        "version",
            mappings.properties(mappings.type_mapping("canonical_location", "geo_point")), 
            mappings.dynamic_templates(
            [
                mappings.EXACT, 
                mappings.dynamic_type_template("geo", "canonical_location", mappings.make_mapping("geo_point"))
            ]
Exemplo n.º 5
0
ELASTIC_SEARCH_HOST = "http://ooz.cottagelabs.com:9200"
ELASTIC_SEARCH_INDEX = "wna"

from esprit import mappings
ELASTIC_SEARCH_MAPPINGS = {
    "reactor" : mappings.for_type(
        "reactor",
            mappings.properties(mappings.type_mapping("location", "geo_point")),
            mappings.dynamic_templates(
            [
                mappings.EXACT,
            ]
        )
    )
}

QUERY_ROUTE = {
    "query" : {
        "reactor" : {
            "auth" : False,
            "role" : None,
            "filters" : [],
            "dao" : "service.dao.ReactorDAO"
        }
    }
}

QUERY_FILTERS = {}