)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"9c9128b78ea3da049d65a77c9cd7a12aaa99b909","unresolved":false,"context_lines":[{"line_number":17,"context_line":"dirty. Items a user has directly acted on will now be \"live\" until they"},{"line_number":18,"context_line":"are no longer dirty...even when the overall search is paused."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I1b2cbb86f8151b1b5dbbbc48f6063627abc2995f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"3ac371cc_9885ecae","line":20,"updated":"2016-08-16 21:44:16.000000000","message":"Add blueprint","commit_id":"a828d061e80aaf884dd231c8971c72e0d1918234"}],"searchlight_ui/static/searchlight-ui/settings/search-settings.service.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"e4676b38530d74c108c3cd571e616f214a1fc505","unresolved":false,"context_lines":[{"line_number":83,"context_line":"          enabled: true,"},{"line_number":84,"context_line":"          interval: 10, //seconds"},{"line_number":85,"context_line":"          getIntervalInMs: getIntervalInMs,"},{"line_number":86,"context_line":"          interval_min: 1,"},{"line_number":87,"context_line":"          interval_max: 300,"},{"line_number":88,"context_line":"          dirtyItemInterval: 2 // seconds"},{"line_number":89,"context_line":"        },"},{"line_number":90,"context_line":"        cache: {"}],"source_content_type":"text/javascript","patch_set":5,"id":"9ad45d7e_ea6ede2d","line":87,"range":{"start_line":86,"start_character":0,"end_line":87,"end_character":28},"updated":"2016-08-09 23:52:34.000000000","message":"ugh, not your fault, good chance mine... but these two should be camelCase. Don\u0027t need to change here, but could...","commit_id":"fb3f2de897de993da34505e76fa7c3618a7f776e"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"3065fd5716e26f7ebe8299d6d14f84bdf0cc84cb","unresolved":false,"context_lines":[{"line_number":200,"context_line":"     * @param query - if set, will update the last used query in the persisted settings"},{"line_number":201,"context_line":"     * If undefined, will return the current last used query from persisted settings"},{"line_number":202,"context_line":"     */"},{"line_number":203,"context_line":"    function lastUsedQuery(query) {"},{"line_number":204,"context_line":"      if (query) {"},{"line_number":205,"context_line":"        service.settings.queries.lastUsedQuery \u003d query;"},{"line_number":206,"context_line":"        saveSettings();"}],"source_content_type":"text/javascript","patch_set":17,"id":"1ac06dbe_f35360e0","line":203,"updated":"2016-08-22 18:00:57.000000000","message":"I supposed this might be okay for the moment... but I was thinking that the last search query should be for a given context and have a name.  We can chat","commit_id":"df0d16a0d3f581c7d0c5d01e3be19b381655224a"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"d9c6cc44f197fa4ca16ff51d23712130da26c90b","unresolved":false,"context_lines":[{"line_number":200,"context_line":"     * @param query - if set, will update the last used query in the persisted settings"},{"line_number":201,"context_line":"     * If undefined, will return the current last used query from persisted settings"},{"line_number":202,"context_line":"     */"},{"line_number":203,"context_line":"    function lastUsedQuery(query) {"},{"line_number":204,"context_line":"      if (query) {"},{"line_number":205,"context_line":"        service.settings.queries.lastUsedQuery \u003d query;"},{"line_number":206,"context_line":"        saveSettings();"}],"source_content_type":"text/javascript","patch_set":17,"id":"1ac06dbe_b74cf5c8","line":203,"in_reply_to":"1ac06dbe_f35360e0","updated":"2016-08-23 23:39:38.000000000","message":"As we discussed, it would potentially be better for the whole settings service to be handled via a factory and looked up by name. So, that can come later.","commit_id":"df0d16a0d3f581c7d0c5d01e3be19b381655224a"}],"searchlight_ui/static/searchlight-ui/table/search-table.controller.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"34e41cde8404dfbdf6d01277041eeea3426173c4","unresolved":false,"context_lines":[{"line_number":93,"context_line":"      ctrl.searchSettings.initScope($scope);"},{"line_number":94,"context_line":"      searchlightFacetUtils.initScope($scope);"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"      if (currentSearch) {"},{"line_number":97,"context_line":"        ctrl.searchFacets \u003d currentSearch.searchFacets;"},{"line_number":98,"context_line":"        if (currentSearch.queryString) {"},{"line_number":99,"context_line":"          $timeout(setInput(currentSearch.queryString));"},{"line_number":100,"context_line":"        }"},{"line_number":101,"context_line":"      } else {"},{"line_number":102,"context_line":"        ctrl.searchFacets \u003d ctrl.defaultFacets;"}],"source_content_type":"text/javascript","patch_set":14,"id":"3ac371cc_69a8f677","line":99,"range":{"start_line":96,"start_character":0,"end_line":99,"end_character":56},"updated":"2016-08-17 16:30:25.000000000","message":"This loses the search context (retained search query) when you navigate into a an angular routed detail page and come back.  The controller is destroyed and recreated when you go to the image and come back. Maybe there is a better way, but the reason we put the options into the service is that they are still available when you come back in.\n\nSelect: Type: Image.  Enter some search text.  Leave and come back:\n\nhttp://imgur.com/a/ez2Gf\n\nNote: Search context is always lost when going to django routed detail pages because the whole page and all JS is reloaded.  The way around this would probably be to make use of local storage.\n\nSee my comments on the helper service as well.  I might take a stab at offering an alternate solution to this which doesn\u0027t push everything back into the controller which I worked to get out of the controller.","commit_id":"54d3fb6f3bcdea1e97140e92b975a4fe510f8428"},{"author":{"_account_id":14307,"name":"Tyr Johanson","email":"tyr@hpe.com","username":"tyr"},"change_message_id":"22f2327806efcc1099917686e5d58dffc13fac18","unresolved":false,"context_lines":[{"line_number":93,"context_line":"      ctrl.searchSettings.initScope($scope);"},{"line_number":94,"context_line":"      searchlightFacetUtils.initScope($scope);"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"      if (currentSearch) {"},{"line_number":97,"context_line":"        ctrl.searchFacets \u003d currentSearch.searchFacets;"},{"line_number":98,"context_line":"        if (currentSearch.queryString) {"},{"line_number":99,"context_line":"          $timeout(setInput(currentSearch.queryString));"},{"line_number":100,"context_line":"        }"},{"line_number":101,"context_line":"      } else {"},{"line_number":102,"context_line":"        ctrl.searchFacets \u003d ctrl.defaultFacets;"}],"source_content_type":"text/javascript","patch_set":14,"id":"3ac371cc_7eaf032a","line":99,"range":{"start_line":96,"start_character":0,"end_line":99,"end_character":56},"in_reply_to":"3ac371cc_69a8f677","updated":"2016-08-17 17:38:00.000000000","message":"Good catch. I missed that part.\n\nSaving searches into local storage is a good idea. Alternatively, perhaps the search-helper provides a dictionary service to save searches.\n\nMoving polling logic into the controller was a very deliberate choice as the two polling systems interact with each other and in response to user input.  They are a very specific behavior to this view.  I\u0027m not opposed to isolating them in some kind of module, but I don\u0027t think they fit any longer into a generic search-helper service.","commit_id":"54d3fb6f3bcdea1e97140e92b975a4fe510f8428"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"34e41cde8404dfbdf6d01277041eeea3426173c4","unresolved":false,"context_lines":[{"line_number":159,"context_line":"      }"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"      function performSearch() {"},{"line_number":162,"context_line":"        fullTextSearchTimeout \u003d undefined;"},{"line_number":163,"context_line":"        search(searchData);"},{"line_number":164,"context_line":"      }"},{"line_number":165,"context_line":""}],"source_content_type":"text/javascript","patch_set":14,"id":"3ac371cc_4acd29b6","line":162,"updated":"2016-08-17 16:30:25.000000000","message":"? I believe this results in a lint warning.","commit_id":"54d3fb6f3bcdea1e97140e92b975a4fe510f8428"},{"author":{"_account_id":14307,"name":"Tyr Johanson","email":"tyr@hpe.com","username":"tyr"},"change_message_id":"15db9ba84b5d4b2d6030bc68a2f431e350455656","unresolved":false,"context_lines":[{"line_number":159,"context_line":"      }"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"      function performSearch() {"},{"line_number":162,"context_line":"        fullTextSearchTimeout \u003d undefined;"},{"line_number":163,"context_line":"        search(searchData);"},{"line_number":164,"context_line":"      }"},{"line_number":165,"context_line":""}],"source_content_type":"text/javascript","patch_set":14,"id":"3ac371cc_1984295c","line":162,"in_reply_to":"3ac371cc_4acd29b6","updated":"2016-08-17 17:43:55.000000000","message":"Oops. Will fix.","commit_id":"54d3fb6f3bcdea1e97140e92b975a4fe510f8428"}],"searchlight_ui/static/searchlight-ui/util/searchlight-query-generator.service.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"11951c2fd5c60e446f76a6450ca85449e940a344","unresolved":false,"context_lines":[{"line_number":152,"context_line":"     * @returns {*} - an object that can be used as the searchlight query"},{"line_number":153,"context_line":"     */"},{"line_number":154,"context_line":"    function generateItems(items) {"},{"line_number":155,"context_line":"      var queryOptions \u003d {"},{"line_number":156,"context_line":"        \"query\": {"},{"line_number":157,"context_line":"          \"terms\" : {"},{"line_number":158,"context_line":"            \"_uid\" : items.map(function(item) {"}],"source_content_type":"text/javascript","patch_set":12,"id":"3ac371cc_572d0845","line":155,"updated":"2016-08-16 21:32:40.000000000","message":"We should use a filter request. It is faster.\n\nhttps://www.elastic.co/guide/en/elasticsearch/guide/current/_queries_and_filters.html\n\nhttps://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html\n\nSo: For example:\n\n {\n\t\"query\": {\n\t\t\"filtered\": {\n\t\t\t\"filter\": {\n\t\t\t\t\"terms\": {\n\t\t\t\t\t\"_uid\": [\"OS::Glance::Image#181b0cce-5166-4a52-85a7-c53ad020e123\", \"OS::Glance::Image#676e910a-96cc-4f5a-80b7-1f2bacd949dd\"]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n }","commit_id":"a828d061e80aaf884dd231c8971c72e0d1918234"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"023a83edef50a15450a2b342a04f09692f01d986","unresolved":false,"context_lines":[{"line_number":152,"context_line":"     * @returns {*} - an object that can be used as the searchlight query"},{"line_number":153,"context_line":"     */"},{"line_number":154,"context_line":"    function generateItems(items) {"},{"line_number":155,"context_line":"      var queryOptions \u003d {"},{"line_number":156,"context_line":"        \"query\": {"},{"line_number":157,"context_line":"          \"filtered\": {"},{"line_number":158,"context_line":"            \"filter\": {"}],"source_content_type":"text/javascript","patch_set":14,"id":"3ac371cc_7650b832","line":155,"updated":"2016-08-18 00:56:23.000000000","message":"Ok, so there is actually what I think is a rather large implication with this query.\n\nWhen you don\u0027t limit the resource type, Searchlight will end up creating a query that searches across ALL types and indices.  Searchlight has a top level \"type\" field that can be set. When that isn\u0027t set, Searchlight\u0027s RBAC injection must create a very large OR statement applying this query to every single resource type.  When you specify the resource types, searchlight will limit the RBAC injection to ensure that only the requested resource types are searched.  If a deployer were to configure searchlight to use difference indices for every resource type, this can get rather problematic and defeat the purpose.\n\nThis query (when done for just images) in its current state will cause searchlight to actually send the following query to ElasticSearch:\n\n (310 lines) http://paste.openstack.org/show/560283/\n\nIf you alter this query to at the very top include type of just glance, the resulting query to ES is:\n\n (51 lines) http://paste.openstack.org/show/560285/\n\nThe example query for the second result is below.  Note that \"type\" is a list of ALL types.  So, if there is more than one type you add it.\n\n  {\n    \"type\": [\"OS::Glance::Image\"],\n\t\"query\": {\n\t\t\"filtered\": {\n\t\t\t\"filter\": {\n\t\t\t\t\"terms\": {\n\t\t\t\t\t\"_uid\": [\"OS::Glance::Image#daad2a7c-b7d6-4386-8e7d-6adffc225fef\"]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n  }\n\nAdding \"type\" to the queries is what the searchlight UI does now when you select from the Type drop down. This should follow suit.\n\nThe ids query (rather than term _uid) with the inclusion of type would probably end up being better, but still should include the top level \"type\" property with the list of resource types. This is because the top level type actually influences searchlight rbac injection and that inner one doesn\u0027t.  I know this is a little confusing, but it is what it is.  I think that the best thing would be to use the top level \u0027type\u0027 AND the ids query with type specified, but I think we could get away with the _uid term query adding a top level type for now.  This whole discussion has actually made me think that searchlight should change the top level \"type\" to resourceType (but that is a different discussion).","commit_id":"54d3fb6f3bcdea1e97140e92b975a4fe510f8428"}],"searchlight_ui/static/searchlight-ui/util/searchlight-search-helper.service.js":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"34e41cde8404dfbdf6d01277041eeea3426173c4","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    var service \u003d {"},{"line_number":54,"context_line":"      search: search,"},{"line_number":55,"context_line":"      searchItems: searchItems"},{"line_number":56,"context_line":"    };"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    return service;"}],"source_content_type":"text/javascript","patch_set":14,"id":"3ac371cc_2488e3c4","line":55,"updated":"2016-08-17 16:30:25.000000000","message":"Well, this service has become nearly pointless and the controller now contains almost all the logic making it un-reusable / completely binding all of that logic to the view.\n\nI\u0027d really much have preferred to see the logic in the service as much as possible.","commit_id":"54d3fb6f3bcdea1e97140e92b975a4fe510f8428"},{"author":{"_account_id":14307,"name":"Tyr Johanson","email":"tyr@hpe.com","username":"tyr"},"change_message_id":"22f2327806efcc1099917686e5d58dffc13fac18","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    var service \u003d {"},{"line_number":54,"context_line":"      search: search,"},{"line_number":55,"context_line":"      searchItems: searchItems"},{"line_number":56,"context_line":"    };"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    return service;"}],"source_content_type":"text/javascript","patch_set":14,"id":"3ac371cc_de743737","line":55,"in_reply_to":"3ac371cc_2488e3c4","updated":"2016-08-17 17:38:00.000000000","message":"I don\u0027t think it is pointless.  This service offers a simple interface to search that handles building the full search query, including things like \"_version\", and amending search results with things like id.\n\nHaving the polling logic in this service turned out to be awkward with the introduction of searchItems.  The view controller is the place that knows which poll to run at any given time.  It also is the place that knows any specific items that may need to be polled.\n\nThis service is very useful to any component interested in doing searches, beyond just the single search table.  I don\u0027t expect other components will share search table\u0027s particular polling and saved search strategy, nor will they share search queries.","commit_id":"54d3fb6f3bcdea1e97140e92b975a4fe510f8428"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"71d2eb85ad051eb1c7d58fa9312d2a6af9644b4a","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    var service \u003d {"},{"line_number":54,"context_line":"      search: search,"},{"line_number":55,"context_line":"      searchItems: searchItems"},{"line_number":56,"context_line":"    };"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    return service;"}],"source_content_type":"text/javascript","patch_set":14,"id":"3ac371cc_746c3f35","line":55,"in_reply_to":"3ac371cc_99d01921","updated":"2016-08-17 19:17:34.000000000","message":"Although, cookies don\u0027t make much sense since it is sent to the server... probably should be local storage.  So something like this\n\nif ($window.localStorage)\n   $window.localStorage.setItem(\n\u0026\n $window.localStorage.getItem","commit_id":"54d3fb6f3bcdea1e97140e92b975a4fe510f8428"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"00f60ba2902280f4c0d027b55e2f2b1b7d4f1a70","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    var service \u003d {"},{"line_number":54,"context_line":"      search: search,"},{"line_number":55,"context_line":"      searchItems: searchItems"},{"line_number":56,"context_line":"    };"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    return service;"}],"source_content_type":"text/javascript","patch_set":14,"id":"3ac371cc_99d01921","line":55,"in_reply_to":"3ac371cc_de743737","updated":"2016-08-17 17:49:41.000000000","message":"I thinking search helper could provide a home for storing search queries. Maybe using cookies with something like:\n\n    function getQueryKey(name) {\n      return \u0027searchlightQuery-\u0027 + name;\n    }\n\n    function setQuery(name, queryOptions) {\n      var query \u003d {\n        magicSearchQuery: queryOptions.magicSearchQuery || \u0027\u0027,\n        queryString: queryOptions.queryString || \u0027\u0027,\n        queryStringChanged: queryOptions.queryStringChanged || false\n      };\n\n      $cookies.put(getQueryKey(name), angular.toJson(query));\n    }\n\n    function getQuery(name) {\n      return $cookies.getObject(getQueryKey(name));\n    }","commit_id":"54d3fb6f3bcdea1e97140e92b975a4fe510f8428"}]}
