)]}'
{"doc/source/indexingservice.rst":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"da9bfaac7b01d0959db8320b8acb46767b23e59a","unresolved":false,"context_lines":[{"line_number":73,"context_line":"the old index to the new one to avoid re-harvesting the data from each service"},{"line_number":74,"context_line":"API."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":".. note::"},{"line_number":77,"context_line":"  Due to some limitations discovered during the Mitaka release, indexing into"},{"line_number":78,"context_line":"  multiple indices (multiple plugin resource groups) is disabled. This behavior"},{"line_number":79,"context_line":"  will be reimplemented in the Newton release, and potentially backported to"}],"source_content_type":"text/x-rst","patch_set":12,"id":"dab17558_ea3739e1","line":76,"updated":"2016-05-06 22:17:45.000000000","message":"I think you need to modify the last sentence in this note to say that\n\n\"The newton release implemented full support for specifying different resource groups for different resource types.\"","commit_id":"88147e762bed014feda795dc83babd865ddfc69d"},{"author":{"_account_id":8959,"name":"Lakshmi N Sampath","email":"lakshmi.sampath@hp.com","username":"lakshmi"},"change_message_id":"f3d8776a21ba59671808fa0a77c34f817f8862a7","unresolved":false,"context_lines":[{"line_number":73,"context_line":"the old index to the new one to avoid re-harvesting the data from each service"},{"line_number":74,"context_line":"API."},{"line_number":75,"context_line":""},{"line_number":76,"context_line":".. note::"},{"line_number":77,"context_line":"  Due to some limitations discovered during the Mitaka release, indexing into"},{"line_number":78,"context_line":"  multiple indices (multiple plugin resource groups) is disabled. This behavior"},{"line_number":79,"context_line":"  will be reimplemented in the Newton release, and potentially backported to"}],"source_content_type":"text/x-rst","patch_set":12,"id":"dab17558_c2b147e3","line":76,"in_reply_to":"dab17558_ea3739e1","updated":"2016-05-09 18:37:08.000000000","message":"Done","commit_id":"88147e762bed014feda795dc83babd865ddfc69d"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"da9bfaac7b01d0959db8320b8acb46767b23e59a","unresolved":false,"context_lines":[{"line_number":78,"context_line":"  multiple indices (multiple plugin resource groups) is disabled. This behavior"},{"line_number":79,"context_line":"  will be reimplemented in the Newton release, and potentially backported to"},{"line_number":80,"context_line":"  the stable Mitaka release if possible."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":".. note::"},{"line_number":83,"context_line":"  When sorting on fields across multiple resource types(with each plugin specifying"},{"line_number":84,"context_line":"  a separate resource group name), follow the guidelines below on avoiding errors"}],"source_content_type":"text/x-rst","patch_set":12,"id":"dab17558_8a266db8","line":81,"updated":"2016-05-06 22:17:45.000000000","message":"If you add a reference here like\n\n.. _using-resource-groups:\n\nUsing Resource Groups\n^^^^^^^^^^^^^^^^^^^^^^^\n\nThen you can reference it from elsewhere (such as in the plugin docs).\n\nSee :ref:`using-resource-groups` for issues to consider when enabling multiple resource groups.\n\ne.g.\n\nFor example, see:\n\nLine 17 doc/source/authoring-plugins.rst\n\nand \n\nLine 80 in doc/source/index.rst","commit_id":"88147e762bed014feda795dc83babd865ddfc69d"},{"author":{"_account_id":8959,"name":"Lakshmi N Sampath","email":"lakshmi.sampath@hp.com","username":"lakshmi"},"change_message_id":"f3d8776a21ba59671808fa0a77c34f817f8862a7","unresolved":false,"context_lines":[{"line_number":78,"context_line":"  multiple indices (multiple plugin resource groups) is disabled. This behavior"},{"line_number":79,"context_line":"  will be reimplemented in the Newton release, and potentially backported to"},{"line_number":80,"context_line":"  the stable Mitaka release if possible."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":".. note::"},{"line_number":83,"context_line":"  When sorting on fields across multiple resource types(with each plugin specifying"},{"line_number":84,"context_line":"  a separate resource group name), follow the guidelines below on avoiding errors"}],"source_content_type":"text/x-rst","patch_set":12,"id":"dab17558_a239a343","line":81,"in_reply_to":"dab17558_8a266db8","updated":"2016-05-09 18:37:08.000000000","message":"Done","commit_id":"88147e762bed014feda795dc83babd865ddfc69d"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"da9bfaac7b01d0959db8320b8acb46767b23e59a","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"  https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#_ignoring_unmapped_fields"},{"line_number":88,"context_line":"  https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#_missing_values"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":".. _aliases: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"Bulk indexing"}],"source_content_type":"text/x-rst","patch_set":12,"id":"dab17558_0aa43da4","line":89,"updated":"2016-05-06 22:17:45.000000000","message":"How about a slight rewording:\n\nUsing multiple resource groups will impact sort behavior when sorting on fields across resource types when all the resource types don\u0027t have the requested \u0027sort-by field\u0027. Follow the guidelines below to avoid errors:","commit_id":"88147e762bed014feda795dc83babd865ddfc69d"},{"author":{"_account_id":8959,"name":"Lakshmi N Sampath","email":"lakshmi.sampath@hp.com","username":"lakshmi"},"change_message_id":"f3d8776a21ba59671808fa0a77c34f817f8862a7","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"  https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#_ignoring_unmapped_fields"},{"line_number":88,"context_line":"  https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#_missing_values"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":".. _aliases: https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"Bulk indexing"}],"source_content_type":"text/x-rst","patch_set":12,"id":"dab17558_42227701","line":89,"in_reply_to":"dab17558_0aa43da4","updated":"2016-05-09 18:37:08.000000000","message":"Done","commit_id":"88147e762bed014feda795dc83babd865ddfc69d"}],"doc/source/plugins.rst":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"a1f8002005b86afb9b6294921a5be6482ebdb88b","unresolved":false,"context_lines":[{"line_number":165,"context_line":"| resource_group_name | searchlight   | Determines the ElasticSearch index  |                           |"},{"line_number":166,"context_line":"|                     |               | and alias where documents will be   | | Restart services        |"},{"line_number":167,"context_line":"|                     |               | stored. Index names will be         | | Re-index all types      |"},{"line_number":168,"context_line":"|                     |               | suffixed with a timestamp.          |                           |"},{"line_number":169,"context_line":"+---------------------+---------------+-------------------------------------+---------------------------+"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"Inheritable Common Configuration Options"}],"source_content_type":"text/x-rst","patch_set":7,"id":"dab17558_05e8e27b","line":168,"updated":"2016-05-05 22:48:56.000000000","message":"I think we can add a note here and in the general resource group documentation (use a common rst reference if needed) to tell people that if they use different resource groups, that this will affect sorting.  Just tell them that the best way is for them to specify in the sort how to handle unmapped fields with a reference to the links Steve provided:\n\nhttps://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#_ignoring_unmapped_fields\n\nhttps://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#_missing_values","commit_id":"d28eed9cbeeef79a999109015295c71e0a6e61d6"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"da9bfaac7b01d0959db8320b8acb46767b23e59a","unresolved":false,"context_lines":[{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    Sorting on fields across resource types(plugins), with each plugin specifying a different resource group"},{"line_number":174,"context_line":"    name will cause errors if sort-by fields are not defined in each resource type."},{"line_number":175,"context_line":"    See :doc:`indexingservice` for more information on how to sort across different resource groups"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"Inheritable Common Configuration Options"},{"line_number":178,"context_line":"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"}],"source_content_type":"text/x-rst","patch_set":12,"id":"dab17558_4ac5a53a","line":175,"updated":"2016-05-06 22:17:45.000000000","message":"Need a space before the (plugins).\n\nUse the ref I mentioned in the other doc, please.","commit_id":"88147e762bed014feda795dc83babd865ddfc69d"}],"releasenotes/notes/bp-reenable-multiple-indices-3c05b9dde9d45d62.yaml":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"da9bfaac7b01d0959db8320b8acb46767b23e59a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    Multiple resource groups were previously removed to address"},{"line_number":4,"context_line":"    issues with search on resource types with parents. Those issues have"},{"line_number":5,"context_line":"    been addressed here."}],"source_content_type":"text/x-yaml","patch_set":12,"id":"dab17558_0a555d4f","line":2,"updated":"2016-05-06 22:17:45.000000000","message":"The prelude get combined with all release notes.  So, we have to word it with that in mind.\n\nHow about:\n\nThe ability to distribute resource type indexing across resource groups has now been fully enabled. This allows for improved indexing speed and clustering customization.","commit_id":"88147e762bed014feda795dc83babd865ddfc69d"},{"author":{"_account_id":8959,"name":"Lakshmi N Sampath","email":"lakshmi.sampath@hp.com","username":"lakshmi"},"change_message_id":"f3d8776a21ba59671808fa0a77c34f817f8862a7","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"prelude: \u003e"},{"line_number":3,"context_line":"    Multiple resource groups were previously removed to address"},{"line_number":4,"context_line":"    issues with search on resource types with parents. Those issues have"},{"line_number":5,"context_line":"    been addressed here."}],"source_content_type":"text/x-yaml","patch_set":12,"id":"dab17558_8261ff3b","line":2,"in_reply_to":"dab17558_0a555d4f","updated":"2016-05-09 18:37:08.000000000","message":"Done","commit_id":"88147e762bed014feda795dc83babd865ddfc69d"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"da9bfaac7b01d0959db8320b8acb46767b23e59a","unresolved":false,"context_lines":[{"line_number":7,"context_line":"  - Reenabled multiple indices by allowing plugins to be"},{"line_number":8,"context_line":"    managed under different resource groups."},{"line_number":9,"context_line":"issues:"},{"line_number":10,"context_line":"  - When sorting on fields across multiple resource types(with each plugin specifying"},{"line_number":11,"context_line":"    a separate resource group name), follow the guidelines on elasticsearch sorting"},{"line_number":12,"context_line":"    documentation to avoid errors specially when all the resource types don\u0027t have the"},{"line_number":13,"context_line":"    mapping for \u0027sort-by field\u0027."}],"source_content_type":"text/x-yaml","patch_set":12,"id":"dab17558_ead8d9f1","line":10,"updated":"2016-05-06 22:17:45.000000000","message":"The wording i suggested in the indexing rst could be copied here as well.","commit_id":"88147e762bed014feda795dc83babd865ddfc69d"},{"author":{"_account_id":8959,"name":"Lakshmi N Sampath","email":"lakshmi.sampath@hp.com","username":"lakshmi"},"change_message_id":"f3d8776a21ba59671808fa0a77c34f817f8862a7","unresolved":false,"context_lines":[{"line_number":7,"context_line":"  - Reenabled multiple indices by allowing plugins to be"},{"line_number":8,"context_line":"    managed under different resource groups."},{"line_number":9,"context_line":"issues:"},{"line_number":10,"context_line":"  - When sorting on fields across multiple resource types(with each plugin specifying"},{"line_number":11,"context_line":"    a separate resource group name), follow the guidelines on elasticsearch sorting"},{"line_number":12,"context_line":"    documentation to avoid errors specially when all the resource types don\u0027t have the"},{"line_number":13,"context_line":"    mapping for \u0027sort-by field\u0027."}],"source_content_type":"text/x-yaml","patch_set":12,"id":"dab17558_227493fb","line":10,"in_reply_to":"dab17558_ead8d9f1","updated":"2016-05-09 18:37:08.000000000","message":"Done","commit_id":"88147e762bed014feda795dc83babd865ddfc69d"}],"searchlight/cmd/manage.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"62f889cee1c515f65f910376d507209b9b384e0f","unresolved":false,"context_lines":[{"line_number":135,"context_line":""},{"line_number":136,"context_line":"            def format_selection(selection):"},{"line_number":137,"context_line":"                resource_type, ext \u003d selection"},{"line_number":138,"context_line":"                return \u0027  \u0027 + ext.obj.get_index_display_name()"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"            # Grab the first element in the first (and only) tuple."},{"line_number":141,"context_line":"            group \u003d resource_groups[0][0]"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_85865263","line":138,"range":{"start_line":138,"start_character":60,"end_line":138,"end_character":62},"updated":"2016-04-18 19:22:16.000000000","message":"Should\u0027ve noticed this earlier - we need to add back in the RG name to this message","commit_id":"ef9e5750261ba1b96fdba8d93d98419dea92fa83"}],"searchlight/elasticsearch/plugins/utils.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"8a05422e1a14e7974d2bce19186ac708d99e11e9","unresolved":false,"context_lines":[{"line_number":173,"context_line":"    # Create an empty mapping that cannot be used."},{"line_number":174,"context_line":"    # TODO(ricka) Should we set \u0027dynamic\u0027 to \u0027strict\u0027, so it throws an"},{"line_number":175,"context_line":"    #             exception if used?"},{"line_number":176,"context_line":"    body \u003d {\u0027dynamic\u0027: False,"},{"line_number":177,"context_line":"            \u0027properties\u0027: {"},{"line_number":178,"context_line":"                \u0027never_used_field\u0027: {\u0027type\u0027: \u0027string\u0027}"},{"line_number":179,"context_line":"            }}"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a18252c_f8c51b8e","line":176,"range":{"start_line":176,"start_character":23,"end_line":176,"end_character":28},"updated":"2016-04-13 18:43:35.000000000","message":"I would say yes. There *should* be no circumstance in which that happens (or at least none in which it\u0027s ok; it would mean changing aliases underneath searchlight). Best to explode noisily","commit_id":"18d804d7de59018b2eedd77766f0ef6cf673df85"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"7dae6b396839147d2159808acb2f89d663069107","unresolved":false,"context_lines":[{"line_number":173,"context_line":"    # Create an empty mapping that cannot be used."},{"line_number":174,"context_line":"    # TODO(ricka) Should we set \u0027dynamic\u0027 to \u0027strict\u0027, so it throws an"},{"line_number":175,"context_line":"    #             exception if used?"},{"line_number":176,"context_line":"    body \u003d {\u0027dynamic\u0027: False,"},{"line_number":177,"context_line":"            \u0027properties\u0027: {"},{"line_number":178,"context_line":"                \u0027never_used_field\u0027: {\u0027type\u0027: \u0027string\u0027}"},{"line_number":179,"context_line":"            }}"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a18252c_09eec7eb","line":176,"range":{"start_line":176,"start_character":23,"end_line":176,"end_character":28},"in_reply_to":"5a18252c_f8c51b8e","updated":"2016-04-13 19:59:36.000000000","message":"Ok.","commit_id":"18d804d7de59018b2eedd77766f0ef6cf673df85"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"8a05422e1a14e7974d2bce19186ac708d99e11e9","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                \u0027never_used_field\u0027: {\u0027type\u0027: \u0027string\u0027}"},{"line_number":179,"context_line":"            }}"},{"line_number":180,"context_line":"    for doc_type in doc_types:"},{"line_number":181,"context_line":"        mapping \u003d es_engine.indices.get_mapping(index\u003dindex_name,"},{"line_number":182,"context_line":"                                                doc_type\u003ddoc_type)"},{"line_number":183,"context_line":"        if not mapping:"},{"line_number":184,"context_line":"            es_engine.indices.put_mapping(index\u003dindex_name, doc_type\u003ddoc_type,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a18252c_58308f9e","line":181,"range":{"start_line":181,"start_character":36,"end_line":181,"end_character":47},"updated":"2016-04-13 18:43:35.000000000","message":"There\u0027s an \u0027exists_type\u0027 method (https://elasticsearch-py.readthedocs.org/en/master/api.html#elasticsearch.client.IndicesClient.exists_type). I would recommend using that unless the existing mapping will be used for error checking","commit_id":"18d804d7de59018b2eedd77766f0ef6cf673df85"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"7dae6b396839147d2159808acb2f89d663069107","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                \u0027never_used_field\u0027: {\u0027type\u0027: \u0027string\u0027}"},{"line_number":179,"context_line":"            }}"},{"line_number":180,"context_line":"    for doc_type in doc_types:"},{"line_number":181,"context_line":"        mapping \u003d es_engine.indices.get_mapping(index\u003dindex_name,"},{"line_number":182,"context_line":"                                                doc_type\u003ddoc_type)"},{"line_number":183,"context_line":"        if not mapping:"},{"line_number":184,"context_line":"            es_engine.indices.put_mapping(index\u003dindex_name, doc_type\u003ddoc_type,"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a18252c_89b817e7","line":181,"range":{"start_line":181,"start_character":36,"end_line":181,"end_character":47},"in_reply_to":"5a18252c_58308f9e","updated":"2016-04-13 19:59:36.000000000","message":"Handy! The existing mapping was used only to check for existence. I\u0027ll switch it over to exists_type().","commit_id":"18d804d7de59018b2eedd77766f0ef6cf673df85"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"bee5b98799395dcfc32722dc0a7c830e98ad85e0","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    # has a \"_parent\" field for the \"has_parent\" queries. Make sure that the"},{"line_number":175,"context_line":"    # the \"_parent\" field is not used anywhere else."},{"line_number":176,"context_line":"    body \u003d {\u0027dynamic\u0027: \u0027strict\u0027,"},{"line_number":177,"context_line":"            \u0027_parent\u0027: {"},{"line_number":178,"context_line":"                \u0027type\u0027: \u0027never_used_parent\u0027},"},{"line_number":179,"context_line":"            \u0027properties\u0027: {"},{"line_number":180,"context_line":"                \u0027never_used_field\u0027: {\u0027type\u0027: \u0027string\u0027}"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a122d0e_3f44f572","line":177,"range":{"start_line":177,"start_character":13,"end_line":177,"end_character":20},"updated":"2016-04-15 17:09:03.000000000","message":"_parent is only needed when the plugin has a parent; there\u0027ll never be a has_parent query issued against (e.g. Nova servers). I can\u0027t see that this would be harmful but I think it\u0027s best not to add it unless we have to. I don\u0027t know if the \"type\" needs ot be real, but i don\u0027t see any disadvantage making the mapping realistic.","commit_id":"c87e3c12b7eb8ae539e616e428664d78e0df7598"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"886ce5c68b635c9b48e567189f9c46591a633e1f","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    # has a \"_parent\" field for the \"has_parent\" queries. Make sure that the"},{"line_number":175,"context_line":"    # the \"_parent\" field is not used anywhere else."},{"line_number":176,"context_line":"    body \u003d {\u0027dynamic\u0027: \u0027strict\u0027,"},{"line_number":177,"context_line":"            \u0027_parent\u0027: {"},{"line_number":178,"context_line":"                \u0027type\u0027: \u0027never_used_parent\u0027},"},{"line_number":179,"context_line":"            \u0027properties\u0027: {"},{"line_number":180,"context_line":"                \u0027never_used_field\u0027: {\u0027type\u0027: \u0027string\u0027}"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a122d0e_2a177ea4","line":177,"range":{"start_line":177,"start_character":13,"end_line":177,"end_character":20},"in_reply_to":"1a122d0e_13d00d53","updated":"2016-04-17 02:58:13.000000000","message":"Ok.","commit_id":"c87e3c12b7eb8ae539e616e428664d78e0df7598"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"64357084666e9a2b835dd4bf7d55c6f41c2d366c","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    # has a \"_parent\" field for the \"has_parent\" queries. Make sure that the"},{"line_number":175,"context_line":"    # the \"_parent\" field is not used anywhere else."},{"line_number":176,"context_line":"    body \u003d {\u0027dynamic\u0027: \u0027strict\u0027,"},{"line_number":177,"context_line":"            \u0027_parent\u0027: {"},{"line_number":178,"context_line":"                \u0027type\u0027: \u0027never_used_parent\u0027},"},{"line_number":179,"context_line":"            \u0027properties\u0027: {"},{"line_number":180,"context_line":"                \u0027never_used_field\u0027: {\u0027type\u0027: \u0027string\u0027}"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a122d0e_13d00d53","line":177,"range":{"start_line":177,"start_character":13,"end_line":177,"end_character":20},"in_reply_to":"1a122d0e_2231790c","updated":"2016-04-15 21:05:35.000000000","message":"You\u0027ll need it for types that have parents, but it shouldn\u0027t be necessary for those that don\u0027t","commit_id":"c87e3c12b7eb8ae539e616e428664d78e0df7598"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"ce9a881124b32c5e2b6825a0c8c86031a1888c6f","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    # has a \"_parent\" field for the \"has_parent\" queries. Make sure that the"},{"line_number":175,"context_line":"    # the \"_parent\" field is not used anywhere else."},{"line_number":176,"context_line":"    body \u003d {\u0027dynamic\u0027: \u0027strict\u0027,"},{"line_number":177,"context_line":"            \u0027_parent\u0027: {"},{"line_number":178,"context_line":"                \u0027type\u0027: \u0027never_used_parent\u0027},"},{"line_number":179,"context_line":"            \u0027properties\u0027: {"},{"line_number":180,"context_line":"                \u0027never_used_field\u0027: {\u0027type\u0027: \u0027string\u0027}"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a122d0e_2231790c","line":177,"range":{"start_line":177,"start_character":13,"end_line":177,"end_character":20},"in_reply_to":"1a122d0e_3f44f572","updated":"2016-04-15 19:02:48.000000000","message":"When I was initially playing with ElasticSearch, I thought this was the case. But when I tried this:\n\n% searchlight-api --config etc/searchlight.conf \u0026\n% curl -s -H \"X-AUTH-Token: ${TOKEN}\" http://0.0.0.0:9393/v1/search -d\u0027{\"query\":{\"match_all\":{}}}\u0027\n\nIt would fail with a parent-type error. That is why I went back and added the \"_parent\" field.\n\nBTW the actual query that is generated by the little \"match_all\" is breath-taking in scope!\n\nTo limit this, we could check the doc_type here and only include the \"_parent\" field if there is a parent-child relationship in the type.","commit_id":"c87e3c12b7eb8ae539e616e428664d78e0df7598"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"bee5b98799395dcfc32722dc0a7c830e98ad85e0","unresolved":false,"context_lines":[{"line_number":176,"context_line":"    body \u003d {\u0027dynamic\u0027: \u0027strict\u0027,"},{"line_number":177,"context_line":"            \u0027_parent\u0027: {"},{"line_number":178,"context_line":"                \u0027type\u0027: \u0027never_used_parent\u0027},"},{"line_number":179,"context_line":"            \u0027properties\u0027: {"},{"line_number":180,"context_line":"                \u0027never_used_field\u0027: {\u0027type\u0027: \u0027string\u0027}"},{"line_number":181,"context_line":"            }}"},{"line_number":182,"context_line":"    for doc_type in doc_types:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a122d0e_4ecf84b0","line":179,"range":{"start_line":179,"start_character":13,"end_line":179,"end_character":23},"updated":"2016-04-15 17:09:03.000000000","message":"We actually don\u0027t need to set any properties at all for things to work (empty properties is fine). However, i am concerned about queries passing sort params; I think we may need to create a base set of fields (liek created_at, name, id) that are commonly used for sorting.","commit_id":"c87e3c12b7eb8ae539e616e428664d78e0df7598"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"64357084666e9a2b835dd4bf7d55c6f41c2d366c","unresolved":false,"context_lines":[{"line_number":176,"context_line":"    body \u003d {\u0027dynamic\u0027: \u0027strict\u0027,"},{"line_number":177,"context_line":"            \u0027_parent\u0027: {"},{"line_number":178,"context_line":"                \u0027type\u0027: \u0027never_used_parent\u0027},"},{"line_number":179,"context_line":"            \u0027properties\u0027: {"},{"line_number":180,"context_line":"                \u0027never_used_field\u0027: {\u0027type\u0027: \u0027string\u0027}"},{"line_number":181,"context_line":"            }}"},{"line_number":182,"context_line":"    for doc_type in doc_types:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a122d0e_d7ca004f","line":179,"range":{"start_line":179,"start_character":13,"end_line":179,"end_character":23},"in_reply_to":"1a122d0e_3d2518ab","updated":"2016-04-15 21:05:35.000000000","message":"Try it :)  \n\n{\"query\": {\"match_all\": {}}, \"sort\": \"created_at\"}\n\nThere is an option to define behavior on missing fields, and maybe that\u0027s enough (https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#_missing_values)\n\nIs there a disadvantage to applying the actual mapping? That would mean not having special cases or core fields.","commit_id":"c87e3c12b7eb8ae539e616e428664d78e0df7598"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"ce9a881124b32c5e2b6825a0c8c86031a1888c6f","unresolved":false,"context_lines":[{"line_number":176,"context_line":"    body \u003d {\u0027dynamic\u0027: \u0027strict\u0027,"},{"line_number":177,"context_line":"            \u0027_parent\u0027: {"},{"line_number":178,"context_line":"                \u0027type\u0027: \u0027never_used_parent\u0027},"},{"line_number":179,"context_line":"            \u0027properties\u0027: {"},{"line_number":180,"context_line":"                \u0027never_used_field\u0027: {\u0027type\u0027: \u0027string\u0027}"},{"line_number":181,"context_line":"            }}"},{"line_number":182,"context_line":"    for doc_type in doc_types:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a122d0e_3d2518ab","line":179,"range":{"start_line":179,"start_character":13,"end_line":179,"end_character":23},"in_reply_to":"1a122d0e_4ecf84b0","updated":"2016-04-15 19:02:48.000000000","message":"If this is the case, we need to refactor the code so that the common fields are in one place and accessed by everyone there. Otherwise we will have a hard-to-find implicit dependency which will bite us in the future when we add a new field to the \"base set\" for sorting.","commit_id":"c87e3c12b7eb8ae539e616e428664d78e0df7598"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"886ce5c68b635c9b48e567189f9c46591a633e1f","unresolved":false,"context_lines":[{"line_number":176,"context_line":"    body \u003d {\u0027dynamic\u0027: \u0027strict\u0027,"},{"line_number":177,"context_line":"            \u0027_parent\u0027: {"},{"line_number":178,"context_line":"                \u0027type\u0027: \u0027never_used_parent\u0027},"},{"line_number":179,"context_line":"            \u0027properties\u0027: {"},{"line_number":180,"context_line":"                \u0027never_used_field\u0027: {\u0027type\u0027: \u0027string\u0027}"},{"line_number":181,"context_line":"            }}"},{"line_number":182,"context_line":"    for doc_type in doc_types:"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a122d0e_aa238e04","line":179,"range":{"start_line":179,"start_character":13,"end_line":179,"end_character":23},"in_reply_to":"1a122d0e_d7ca004f","updated":"2016-04-17 02:58:13.000000000","message":"Sorting the query looks like it works. I\u0027m assuming that the sort is applied after the query has returned documents. SInce there are no documents in these \"phantom\" doc_types, there is nothing for the sort to choke on.","commit_id":"c87e3c12b7eb8ae539e616e428664d78e0df7598"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"62f889cee1c515f65f910376d507209b9b384e0f","unresolved":false,"context_lines":[{"line_number":187,"context_line":"    for doc_type, has_parent in doc_type_info:"},{"line_number":188,"context_line":"        body \u003d {\u0027dynamic\u0027: \u0027strict\u0027,"},{"line_number":189,"context_line":"                \u0027properties\u0027: {"},{"line_number":190,"context_line":"                }}"},{"line_number":191,"context_line":"        if has_parent:"},{"line_number":192,"context_line":"            body[\u0027_parent\u0027] \u003d {\u0027type\u0027: \u0027never_used_parent\u0027}"},{"line_number":193,"context_line":"        if not es_engine.indices.exists_type(index\u003dindex_name,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_a589ce28","line":190,"range":{"start_line":190,"start_character":16,"end_line":190,"end_character":18},"updated":"2016-04-18 19:22:16.000000000","message":"It is possible to create queries that\u0027ll make this work inconsistently; if you index such that Servers and Networks are on separate indices, and run this:\n  {\"match_all\": {}, \"type\": [\"OS::Nova::Server\", \"OS::Neutron::Net\"], \"sort\": \"created\"}\n\nYou\u0027ll get a partial failure \"Parse Failure [No mapping found for [created] in order to sort on]]\". This appears in the results sent back to the client. \n\nThere is an option for \u0027unmapped fields\u0027 (https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#_ignoring_unmapped_fields) which either the client could be required to add, or the server could add.\n\nThis case is a little unusual which is why I\u0027m not sure it justifies changing the behavior. Thoughts?","commit_id":"ef9e5750261ba1b96fdba8d93d98419dea92fa83"},{"author":{"_account_id":16150,"name":"Lei Zhang","email":"lei.a.zhang@intel.com","username":"leizhang"},"change_message_id":"aa40fa263919b55a0d086dfcbd48f2c978506825","unresolved":false,"context_lines":[{"line_number":187,"context_line":"    for doc_type, has_parent in doc_type_info:"},{"line_number":188,"context_line":"        body \u003d {\u0027dynamic\u0027: \u0027strict\u0027,"},{"line_number":189,"context_line":"                \u0027properties\u0027: {"},{"line_number":190,"context_line":"                }}"},{"line_number":191,"context_line":"        if has_parent:"},{"line_number":192,"context_line":"            body[\u0027_parent\u0027] \u003d {\u0027type\u0027: \u0027never_used_parent\u0027}"},{"line_number":193,"context_line":"        if not es_engine.indices.exists_type(index\u003dindex_name,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_31221201","line":190,"range":{"start_line":190,"start_character":16,"end_line":190,"end_character":18},"in_reply_to":"1a122d0e_a589ce28","updated":"2016-04-19 04:13:54.000000000","message":"Yes, but that\u0027s because created doesn\u0027t exist, works fine with \u0027created_at\u0027. We cannot prevent this to happen by setting unmapped fields.","commit_id":"ef9e5750261ba1b96fdba8d93d98419dea92fa83"}]}
