{"action":"created","issue":{"url":"https://api.github.com/repos/ezsystems/ezplatform-solr-search-engine/issues/46","repository_url":"https://api.github.com/repos/ezsystems/ezplatform-solr-search-engine","labels_url":"https://api.github.com/repos/ezsystems/ezplatform-solr-search-engine/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/ezsystems/ezplatform-solr-search-engine/issues/46/comments","events_url":"https://api.github.com/repos/ezsystems/ezplatform-solr-search-engine/issues/46/events","html_url":"https://github.com/ezsystems/ezplatform-solr-search-engine/pull/46","id":156697438,"number":46,"title":"[WIP] EZP-25792: Deleted location don't affect subitems","user":{"login":"galileo","id":39776,"avatar_url":"https://avatars.githubusercontent.com/u/39776?v=3","gravatar_id":"","url":"https://api.github.com/users/galileo","html_url":"https://github.com/galileo","followers_url":"https://api.github.com/users/galileo/followers","following_url":"https://api.github.com/users/galileo/following{/other_user}","gists_url":"https://api.github.com/users/galileo/gists{/gist_id}","starred_url":"https://api.github.com/users/galileo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/galileo/subscriptions","organizations_url":"https://api.github.com/users/galileo/orgs","repos_url":"https://api.github.com/users/galileo/repos","events_url":"https://api.github.com/users/galileo/events{/privacy}","received_events_url":"https://api.github.com/users/galileo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-25T08:58:58Z","updated_at":"2016-06-02T10:24:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ezsystems/ezplatform-solr-search-engine/pulls/46","html_url":"https://github.com/ezsystems/ezplatform-solr-search-engine/pull/46","diff_url":"https://github.com/ezsystems/ezplatform-solr-search-engine/pull/46.diff","patch_url":"https://github.com/ezsystems/ezplatform-solr-search-engine/pull/46.patch"},"body":"Issue: https://jira.ez.no/browse/EZP-25792\r\n\r\nExplanation: \r\n\r\nThe problem is that when we delete location we also want to delete all related sub location with related content, but if there is a content that have still another existing location that is out of the delete location subtree we just need to reindex this location instead of delete it.\r\n\r\nSolution:\r\n\r\nThe solution is to find first which location need to be reindexed and with then need to be deleted with the content. As solr is handling location that are within content block we need to reindex or delete content index data.\r\n\r\nTodo:\r\n\r\n- [x] - Create new `CustomFieldIn` that have plain field to value mapping without `\"%value%\"`\r\n- [x] - Determine why the solr queries are build differently for the second call\r\n "},"comment":{"url":"https://api.github.com/repos/ezsystems/ezplatform-solr-search-engine/issues/comments/223253451","html_url":"https://github.com/ezsystems/ezplatform-solr-search-engine/pull/46#issuecomment-223253451","issue_url":"https://api.github.com/repos/ezsystems/ezplatform-solr-search-engine/issues/46","id":223253451,"user":{"login":"ezrobot","id":681611,"avatar_url":"https://avatars.githubusercontent.com/u/681611?v=3","gravatar_id":"","url":"https://api.github.com/users/ezrobot","html_url":"https://github.com/ezrobot","followers_url":"https://api.github.com/users/ezrobot/followers","following_url":"https://api.github.com/users/ezrobot/following{/other_user}","gists_url":"https://api.github.com/users/ezrobot/gists{/gist_id}","starred_url":"https://api.github.com/users/ezrobot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezrobot/subscriptions","organizations_url":"https://api.github.com/users/ezrobot/orgs","repos_url":"https://api.github.com/users/ezrobot/repos","events_url":"https://api.github.com/users/ezrobot/events{/privacy}","received_events_url":"https://api.github.com/users/ezrobot/received_events","type":"User","site_admin":false},"created_at":"2016-06-02T10:24:40Z","updated_at":"2016-06-02T10:24:40Z","body":"This Pull Request does not respect [PSR-2 Coding Standards](http://www.php-fig.org/psr/psr-2/), please, see the suggested diff below:\n\n```diff\nLoaded config from \"/jenkins/jenkins.std/jobs/SolrSearchEngine-Pull-Request-checker/workspace/.php_cs\"\nF\nLegend: ?-unknown, I-invalid file syntax, file ignored, .-no changes, F-fixed, E-error\n   1) lib/Query/Content/CriterionVisitor/CustomField/CustomFieldIn.php (braces)\n      ---------- begin diff ----------\n      --- Original\n      +++ New\n      @@ @@\n       \n      -            if ($this->isRegExp($preparedValue)){\n      +            if ($this->isRegExp($preparedValue)) {\n                       $queries[] = $criterion->target . ':' . $preparedValue;\n                   } else {\n                       $queries[] = $criterion->target . ':\"' . $preparedValue . '\"';\n                   }\n               }\n       \n               return '(' . implode(' OR ', $queries) . ')';\n           }\n       \n           private function isRegExp($preparedValue)\n           {\n               return preg_match('#^/.*/$#', $preparedValue);\n           }\n       }\n       \n      \n      ---------- end diff ----------\n\nFixed all files in 0.543 seconds, 6.500 MB memory used\n```\n"}}
{"actor":{"display_login":"ezrobot"}}