Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //mapping
- return [
- '_all' => [
- 'enabled' => false
- ],
- 'dynamic_templates' => [
- [
- 'nested_filter' => [
- 'match' => 'filter',
- 'mapping' => [
- 'type' => 'nested',
- 'include_in_parent' => true
- ]
- ]
- ],
- [
- 'nested_template_str' => [
- 'path_match' => 'filter.*',
- 'mapping' => [
- 'type' => '{dynamic_type}',
- 'index' => 'not_analyzed',
- "doc_values" => true
- ]
- ]
- ]
- ],
- 'properties' => [
- 'id' => [
- 'type' => 'integer',
- 'index' => 'not_analyzed',
- "doc_values" => true
- ],
- 'name' => [
- 'type' => 'string',
- "analyzer" => "index_ru",
- "search_analyzer" => "search_ru",
- "term_vector" => "with_positions_offsets"
- ],
- 'address' => [
- 'type' => 'string',
- "analyzer" => "index_ru",
- "search_analyzer" => "search_ru",
- ],
- 'location' => [
- 'type' => 'geo_point',
- "doc_values" => true
- ],
- 'city' => [
- 'type' => 'string',
- "analyzer" => "index_ru",
- "search_analyzer" => "search_ru",
- ],
- 'description' => [
- 'type' => 'string',
- "analyzer" => "search_ru",
- "search_analyzer" => "search_ru",
- ],
- 'tags' => [
- 'type' => 'string',
- "analyzer" => "tag",
- "search_analyzer" => "tag",
- "term_vector" => "with_positions_offsets"
- ],
- 'categoryName' => [
- 'type' => 'string',
- "analyzer" => "index_ru",
- "search_analyzer" => "search_ru",
- "term_vector" => "with_positions_offsets"
- ],
- 'subcategoriesNames' => [
- 'type' => 'string',
- "analyzer" => "index_ru",
- "search_analyzer" => "search_ru",
- "term_vector" => "with_positions_offsets"
- ],
- 'specializationsNames' => [
- 'type' => 'string',
- "analyzer" => "index_ru",
- "search_analyzer" => "search_ru",
- ],
- 'services' => [
- 'type' => 'string',
- "analyzer" => "index_ru",
- "search_analyzer" => "search_ru",
- ]
- ]
- ];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement