{"action":"closed","number":15,"pull_request":{"url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/pulls/15","id":146816124,"html_url":"https://github.com/bestit/commercetools-filter-bundle/pull/15","diff_url":"https://github.com/bestit/commercetools-filter-bundle/pull/15.diff","patch_url":"https://github.com/bestit/commercetools-filter-bundle/pull/15.patch","issue_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/issues/15","number":15,"state":"closed","locked":false,"title":"Add new term normalizer handling with tags / add new config for categ…","user":{"login":"migo315","id":13180135,"avatar_url":"https://avatars2.githubusercontent.com/u/13180135?v=4","gravatar_id":"","url":"https://api.github.com/users/migo315","html_url":"https://github.com/migo315","followers_url":"https://api.github.com/users/migo315/followers","following_url":"https://api.github.com/users/migo315/following{/other_user}","gists_url":"https://api.github.com/users/migo315/gists{/gist_id}","starred_url":"https://api.github.com/users/migo315/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/migo315/subscriptions","organizations_url":"https://api.github.com/users/migo315/orgs","repos_url":"https://api.github.com/users/migo315/repos","events_url":"https://api.github.com/users/migo315/events{/privacy}","received_events_url":"https://api.github.com/users/migo315/received_events","type":"User","site_admin":false},"body":"### Die Problematik\r\nWenn ich im Listing (nicht Suche!) bin, möchte ich ggfs. auch Unterkategorien als Filtermöglichkeit anbieten. Dies kann ich auch bequem über den aktuellen FacetProvider lösen. Allerdings gibt uns CommerceTools dann als Filtermöglichkeit nicht nur die Unterkategorien zurück - sondern alle Kategorien in denen die gefundenen Produkte zugewiesen sind. Dies können dann auch komplett andere Hauptkategorien sein, wenn der Artikel mehreren Kategorien zugeordnet ist (zb. in Kategorie \"Laptop\" und gleichzeitig in der Kategorie \"Restposten\").\r\n\r\n### Die Lösung\r\nIn der Config kann ich ein \"Filter Typ\" definieren, der ggfs. die Auswahlmöglichkeit einschränkt. Dies führt dann der CategoryNormalizer durch - somit sparen wir uns weitere Requests an CommerceTools. Je nach ausgewählten Typ werden dann nur direkte Unterkategorien bzw. alle Unterkategorien der aktuellen Kategorie angezeigt, sofern dort Artikel gefunden wurden. Wahlweise kann aber auch \"none\" ausgewählt werden, wenn dies nicht erwünscht ist.\r\n\r\n### Das Resultat\r\nDie ganze Term Normalisierung habe ich refactored, was mich selber ärgert. Aber das vorherige Konstrukt hat sich als unflexibel erwiesen. Beispiele:\r\n\r\n- In der Config ein `normalizer_id` zur Verfügung zu stellen war uncool. Wenn ich dort einen eigenen Service definiere, können alle anderen Konfiguration zum Normalizer obsolet sein, da ich ja nicht verpflichtet bin diese zu injected und zu beachten (oder vll sogar nicht beachten kann). Dann hat man da eine Konfiguration stehen die zum Teil nicht gilt.\r\n\r\n- Hätte ich einen dritten zusätzlich Normalizer benötigt, hätte ich vorher einen Listener schreiben müssen der den Normalizer implementiert. Eins von beiden ist also überflüssig. Ich habe mich gegen den Listener entschieden.\r\n\r\nDes Weiteren habe ich ein weiteren Config Parameter `base_category_query` implementiert. Dort kann man optional eine Query definieren, womit die Hauptkategorie gefunden wird. Das FilterBundle beschränkt dann die Suche auf die Hauptkategorie. Bisher hatte das FilterBundle immer im ganzen CommerceTools Projekt gesucht.","created_at":"2017-10-16T15:31:25Z","updated_at":"2017-11-03T13:30:27Z","closed_at":"2017-11-03T13:30:27Z","merged_at":"2017-11-03T13:30:27Z","merge_commit_sha":"15ff58ab98117af13bc7f2004a070dd7eedd5a33","assignee":{"login":"migo315","id":13180135,"avatar_url":"https://avatars2.githubusercontent.com/u/13180135?v=4","gravatar_id":"","url":"https://api.github.com/users/migo315","html_url":"https://github.com/migo315","followers_url":"https://api.github.com/users/migo315/followers","following_url":"https://api.github.com/users/migo315/following{/other_user}","gists_url":"https://api.github.com/users/migo315/gists{/gist_id}","starred_url":"https://api.github.com/users/migo315/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/migo315/subscriptions","organizations_url":"https://api.github.com/users/migo315/orgs","repos_url":"https://api.github.com/users/migo315/repos","events_url":"https://api.github.com/users/migo315/events{/privacy}","received_events_url":"https://api.github.com/users/migo315/received_events","type":"User","site_admin":false},"assignees":[{"login":"migo315","id":13180135,"avatar_url":"https://avatars2.githubusercontent.com/u/13180135?v=4","gravatar_id":"","url":"https://api.github.com/users/migo315","html_url":"https://github.com/migo315","followers_url":"https://api.github.com/users/migo315/followers","following_url":"https://api.github.com/users/migo315/following{/other_user}","gists_url":"https://api.github.com/users/migo315/gists{/gist_id}","starred_url":"https://api.github.com/users/migo315/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/migo315/subscriptions","organizations_url":"https://api.github.com/users/migo315/orgs","repos_url":"https://api.github.com/users/migo315/repos","events_url":"https://api.github.com/users/migo315/events{/privacy}","received_events_url":"https://api.github.com/users/migo315/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"nhardeweg","id":16148081,"avatar_url":"https://avatars2.githubusercontent.com/u/16148081?v=4","gravatar_id":"","url":"https://api.github.com/users/nhardeweg","html_url":"https://github.com/nhardeweg","followers_url":"https://api.github.com/users/nhardeweg/followers","following_url":"https://api.github.com/users/nhardeweg/following{/other_user}","gists_url":"https://api.github.com/users/nhardeweg/gists{/gist_id}","starred_url":"https://api.github.com/users/nhardeweg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhardeweg/subscriptions","organizations_url":"https://api.github.com/users/nhardeweg/orgs","repos_url":"https://api.github.com/users/nhardeweg/repos","events_url":"https://api.github.com/users/nhardeweg/events{/privacy}","received_events_url":"https://api.github.com/users/nhardeweg/received_events","type":"User","site_admin":false},{"login":"bestit-lubisch","id":20165267,"avatar_url":"https://avatars3.githubusercontent.com/u/20165267?v=4","gravatar_id":"","url":"https://api.github.com/users/bestit-lubisch","html_url":"https://github.com/bestit-lubisch","followers_url":"https://api.github.com/users/bestit-lubisch/followers","following_url":"https://api.github.com/users/bestit-lubisch/following{/other_user}","gists_url":"https://api.github.com/users/bestit-lubisch/gists{/gist_id}","starred_url":"https://api.github.com/users/bestit-lubisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bestit-lubisch/subscriptions","organizations_url":"https://api.github.com/users/bestit-lubisch/orgs","repos_url":"https://api.github.com/users/bestit-lubisch/repos","events_url":"https://api.github.com/users/bestit-lubisch/events{/privacy}","received_events_url":"https://api.github.com/users/bestit-lubisch/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/pulls/15/commits","review_comments_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/pulls/15/comments","review_comment_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/issues/15/comments","statuses_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/statuses/9826b9156159ef5c8b7797561046bbefc9c92ad0","head":{"label":"bestit:feature/child-category-filtering","ref":"feature/child-category-filtering","sha":"9826b9156159ef5c8b7797561046bbefc9c92ad0","user":{"login":"bestit","id":5992562,"avatar_url":"https://avatars3.githubusercontent.com/u/5992562?v=4","gravatar_id":"","url":"https://api.github.com/users/bestit","html_url":"https://github.com/bestit","followers_url":"https://api.github.com/users/bestit/followers","following_url":"https://api.github.com/users/bestit/following{/other_user}","gists_url":"https://api.github.com/users/bestit/gists{/gist_id}","starred_url":"https://api.github.com/users/bestit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bestit/subscriptions","organizations_url":"https://api.github.com/users/bestit/orgs","repos_url":"https://api.github.com/users/bestit/repos","events_url":"https://api.github.com/users/bestit/events{/privacy}","received_events_url":"https://api.github.com/users/bestit/received_events","type":"Organization","site_admin":false},"repo":{"id":96461901,"name":"commercetools-filter-bundle","full_name":"bestit/commercetools-filter-bundle","owner":{"login":"bestit","id":5992562,"avatar_url":"https://avatars3.githubusercontent.com/u/5992562?v=4","gravatar_id":"","url":"https://api.github.com/users/bestit","html_url":"https://github.com/bestit","followers_url":"https://api.github.com/users/bestit/followers","following_url":"https://api.github.com/users/bestit/following{/other_user}","gists_url":"https://api.github.com/users/bestit/gists{/gist_id}","starred_url":"https://api.github.com/users/bestit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bestit/subscriptions","organizations_url":"https://api.github.com/users/bestit/orgs","repos_url":"https://api.github.com/users/bestit/repos","events_url":"https://api.github.com/users/bestit/events{/privacy}","received_events_url":"https://api.github.com/users/bestit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bestit/commercetools-filter-bundle","description":"Commercetools filter and search implementation","fork":false,"url":"https://api.github.com/repos/bestit/commercetools-filter-bundle","forks_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/forks","keys_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/teams","hooks_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/hooks","issue_events_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/issues/events{/number}","events_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/events","assignees_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/assignees{/user}","branches_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/branches{/branch}","tags_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/tags","blobs_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/statuses/{sha}","languages_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/languages","stargazers_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/stargazers","contributors_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/contributors","subscribers_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/subscribers","subscription_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/subscription","commits_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/contents/{+path}","compare_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/merges","archive_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/downloads","issues_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/issues{/number}","pulls_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/pulls{/number}","milestones_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/milestones{/number}","notifications_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/labels{/name}","releases_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/releases{/id}","deployments_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/deployments","created_at":"2017-07-06T18:47:56Z","updated_at":"2017-10-08T18:47:28Z","pushed_at":"2017-11-03T13:30:27Z","git_url":"git://github.com/bestit/commercetools-filter-bundle.git","ssh_url":"git@github.com:bestit/commercetools-filter-bundle.git","clone_url":"https://github.com/bestit/commercetools-filter-bundle.git","svn_url":"https://github.com/bestit/commercetools-filter-bundle","homepage":null,"size":183,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":3,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"bestit:master","ref":"master","sha":"effd1fffc5b30f32732ed219b26ad033b94eb7ef","user":{"login":"bestit","id":5992562,"avatar_url":"https://avatars3.githubusercontent.com/u/5992562?v=4","gravatar_id":"","url":"https://api.github.com/users/bestit","html_url":"https://github.com/bestit","followers_url":"https://api.github.com/users/bestit/followers","following_url":"https://api.github.com/users/bestit/following{/other_user}","gists_url":"https://api.github.com/users/bestit/gists{/gist_id}","starred_url":"https://api.github.com/users/bestit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bestit/subscriptions","organizations_url":"https://api.github.com/users/bestit/orgs","repos_url":"https://api.github.com/users/bestit/repos","events_url":"https://api.github.com/users/bestit/events{/privacy}","received_events_url":"https://api.github.com/users/bestit/received_events","type":"Organization","site_admin":false},"repo":{"id":96461901,"name":"commercetools-filter-bundle","full_name":"bestit/commercetools-filter-bundle","owner":{"login":"bestit","id":5992562,"avatar_url":"https://avatars3.githubusercontent.com/u/5992562?v=4","gravatar_id":"","url":"https://api.github.com/users/bestit","html_url":"https://github.com/bestit","followers_url":"https://api.github.com/users/bestit/followers","following_url":"https://api.github.com/users/bestit/following{/other_user}","gists_url":"https://api.github.com/users/bestit/gists{/gist_id}","starred_url":"https://api.github.com/users/bestit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bestit/subscriptions","organizations_url":"https://api.github.com/users/bestit/orgs","repos_url":"https://api.github.com/users/bestit/repos","events_url":"https://api.github.com/users/bestit/events{/privacy}","received_events_url":"https://api.github.com/users/bestit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bestit/commercetools-filter-bundle","description":"Commercetools filter and search implementation","fork":false,"url":"https://api.github.com/repos/bestit/commercetools-filter-bundle","forks_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/forks","keys_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/teams","hooks_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/hooks","issue_events_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/issues/events{/number}","events_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/events","assignees_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/assignees{/user}","branches_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/branches{/branch}","tags_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/tags","blobs_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/statuses/{sha}","languages_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/languages","stargazers_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/stargazers","contributors_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/contributors","subscribers_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/subscribers","subscription_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/subscription","commits_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/contents/{+path}","compare_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/merges","archive_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/downloads","issues_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/issues{/number}","pulls_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/pulls{/number}","milestones_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/milestones{/number}","notifications_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/labels{/name}","releases_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/releases{/id}","deployments_url":"https://api.github.com/repos/bestit/commercetools-filter-bundle/deployments","created_at":"2017-07-06T18:47:56Z","updated_at":"2017-10-08T18:47:28Z","pushed_at":"2017-11-03T13:30:27Z","git_url":"git://github.com/bestit/commercetools-filter-bundle.git","ssh_url":"git@github.com:bestit/commercetools-filter-bundle.git","clone_url":"https://github.com/bestit/commercetools-filter-bundle.git","svn_url":"https://github.com/bestit/commercetools-filter-bundle","homepage":null,"size":183,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":3,"open_issues":0,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bestit/commercetools-filter-bundle/pulls/15"},"html":{"href":"https://github.com/bestit/commercetools-filter-bundle/pull/15"},"issue":{"href":"https://api.github.com/repos/bestit/commercetools-filter-bundle/issues/15"},"comments":{"href":"https://api.github.com/repos/bestit/commercetools-filter-bundle/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/bestit/commercetools-filter-bundle/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/bestit/commercetools-filter-bundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bestit/commercetools-filter-bundle/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/bestit/commercetools-filter-bundle/statuses/9826b9156159ef5c8b7797561046bbefc9c92ad0"}},"author_association":"COLLABORATOR","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"migo315","id":13180135,"avatar_url":"https://avatars2.githubusercontent.com/u/13180135?v=4","gravatar_id":"","url":"https://api.github.com/users/migo315","html_url":"https://github.com/migo315","followers_url":"https://api.github.com/users/migo315/followers","following_url":"https://api.github.com/users/migo315/following{/other_user}","gists_url":"https://api.github.com/users/migo315/gists{/gist_id}","starred_url":"https://api.github.com/users/migo315/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/migo315/subscriptions","organizations_url":"https://api.github.com/users/migo315/orgs","repos_url":"https://api.github.com/users/migo315/repos","events_url":"https://api.github.com/users/migo315/events{/privacy}","received_events_url":"https://api.github.com/users/migo315/received_events","type":"User","site_admin":false},"comments":0,"review_comments":12,"maintainer_can_modify":false,"commits":1,"additions":654,"deletions":414,"changed_files":32}}
{"actor":{"display_login":"migo315"}}