{"action":"created","comment":{"url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/pulls/comments/241515728","pull_request_review_id":184808584,"id":241515728,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTUxNTcyOA==","diff_hunk":"@@ -162,5 +168,30 @@ protected virtual void AddParentOrganizations(IndexDocument document, ICollectio\n             document.AddFilterableValues(\"ParentOrganizations\", nonEmptyValues);\n             document.AddFilterableValue(\"HasParentOrganizations\", nonEmptyValues?.Any() ?? false);\n         }\n+\n+        protected virtual void IndexDynamicProperty(IndexDocument document, DynamicObjectProperty property)\n+        {\n+            var propertyName = property.Name?.ToLowerInvariant();\n+            if (!string.IsNullOrEmpty(propertyName))\n+            {\n+                var isCollection = property.IsDictionary || property.IsArray;\n+                var values = new List<object>();\n+\n+                if (property.IsDictionary)\n+                {\n+                    //add all locales in dictionary to searchIndex\n+                    values.AddRange(property.Values.Select(x => x.Value)\n+                                                    .Cast<DynamicPropertyDictionaryItem>()\n+                                                    .Where(x => !string.IsNullOrEmpty(x.Name))\n+                                                    .Select(x => x.Name));\n+                }\n+                else\n+                {\n+                    values.AddRange(property.Values.Where(x => x.Value != null)","path":"VirtoCommerce.CustomerModule.Data/Search/Indexing/MemberDocumentBuilder.cs","position":48,"original_position":48,"commit_id":"c25188cc3fbbe34a92ff1763695ec73c895db8d9","original_commit_id":"c25188cc3fbbe34a92ff1763695ec73c895db8d9","user":{"login":"artem-dudarev","id":8775253,"node_id":"MDQ6VXNlcjg3NzUyNTM=","avatar_url":"https://avatars0.githubusercontent.com/u/8775253?v=4","gravatar_id":"","url":"https://api.github.com/users/artem-dudarev","html_url":"https://github.com/artem-dudarev","followers_url":"https://api.github.com/users/artem-dudarev/followers","following_url":"https://api.github.com/users/artem-dudarev/following{/other_user}","gists_url":"https://api.github.com/users/artem-dudarev/gists{/gist_id}","starred_url":"https://api.github.com/users/artem-dudarev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artem-dudarev/subscriptions","organizations_url":"https://api.github.com/users/artem-dudarev/orgs","repos_url":"https://api.github.com/users/artem-dudarev/repos","events_url":"https://api.github.com/users/artem-dudarev/events{/privacy}","received_events_url":"https://api.github.com/users/artem-dudarev/received_events","type":"User","site_admin":false},"body":"replace with `values = property.Values.Select(...).ToList();`","created_at":"2018-12-13T18:39:09Z","updated_at":"2018-12-13T18:39:45Z","html_url":"https://github.com/VirtoCommerce/vc-module-customer/pull/48#discussion_r241515728","pull_request_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/pulls/48","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/pulls/comments/241515728"},"html":{"href":"https://github.com/VirtoCommerce/vc-module-customer/pull/48#discussion_r241515728"},"pull_request":{"href":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/pulls/48","id":237343170,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3MzQzMTcw","html_url":"https://github.com/VirtoCommerce/vc-module-customer/pull/48","diff_url":"https://github.com/VirtoCommerce/vc-module-customer/pull/48.diff","patch_url":"https://github.com/VirtoCommerce/vc-module-customer/pull/48.patch","issue_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/issues/48","number":48,"state":"open","locked":false,"title":"Fix/44 add dynamic properties to search index","user":{"login":"dvs39","id":2816674,"node_id":"MDQ6VXNlcjI4MTY2NzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2816674?v=4","gravatar_id":"","url":"https://api.github.com/users/dvs39","html_url":"https://github.com/dvs39","followers_url":"https://api.github.com/users/dvs39/followers","following_url":"https://api.github.com/users/dvs39/following{/other_user}","gists_url":"https://api.github.com/users/dvs39/gists{/gist_id}","starred_url":"https://api.github.com/users/dvs39/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvs39/subscriptions","organizations_url":"https://api.github.com/users/dvs39/orgs","repos_url":"https://api.github.com/users/dvs39/repos","events_url":"https://api.github.com/users/dvs39/events{/privacy}","received_events_url":"https://api.github.com/users/dvs39/received_events","type":"User","site_admin":false},"body":"![adddynamicproperties](https://user-images.githubusercontent.com/2816674/49739134-d0518780-fc99-11e8-98d4-3af922231675.gif)\r\n\r\n- Add DynamicProperties to SearchIndex\r\n- Add Emails from Customer Entity to SearchIndex","created_at":"2018-12-10T14:39:21Z","updated_at":"2018-12-13T18:39:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec45bf33adee637b5d91bf7b1aab82262ea50cd0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/pulls/48/commits","review_comments_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/pulls/48/comments","review_comment_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/issues/48/comments","statuses_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/statuses/c25188cc3fbbe34a92ff1763695ec73c895db8d9","head":{"label":"dvs39:fix/44-add-dynamic-properties-to-searchIndex","ref":"fix/44-add-dynamic-properties-to-searchIndex","sha":"c25188cc3fbbe34a92ff1763695ec73c895db8d9","user":{"login":"dvs39","id":2816674,"node_id":"MDQ6VXNlcjI4MTY2NzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2816674?v=4","gravatar_id":"","url":"https://api.github.com/users/dvs39","html_url":"https://github.com/dvs39","followers_url":"https://api.github.com/users/dvs39/followers","following_url":"https://api.github.com/users/dvs39/following{/other_user}","gists_url":"https://api.github.com/users/dvs39/gists{/gist_id}","starred_url":"https://api.github.com/users/dvs39/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvs39/subscriptions","organizations_url":"https://api.github.com/users/dvs39/orgs","repos_url":"https://api.github.com/users/dvs39/repos","events_url":"https://api.github.com/users/dvs39/events{/privacy}","received_events_url":"https://api.github.com/users/dvs39/received_events","type":"User","site_admin":false},"repo":{"id":160820870,"node_id":"MDEwOlJlcG9zaXRvcnkxNjA4MjA4NzA=","name":"vc-module-customer","full_name":"dvs39/vc-module-customer","private":false,"owner":{"login":"dvs39","id":2816674,"node_id":"MDQ6VXNlcjI4MTY2NzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/2816674?v=4","gravatar_id":"","url":"https://api.github.com/users/dvs39","html_url":"https://github.com/dvs39","followers_url":"https://api.github.com/users/dvs39/followers","following_url":"https://api.github.com/users/dvs39/following{/other_user}","gists_url":"https://api.github.com/users/dvs39/gists{/gist_id}","starred_url":"https://api.github.com/users/dvs39/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvs39/subscriptions","organizations_url":"https://api.github.com/users/dvs39/orgs","repos_url":"https://api.github.com/users/dvs39/repos","events_url":"https://api.github.com/users/dvs39/events{/privacy}","received_events_url":"https://api.github.com/users/dvs39/received_events","type":"User","site_admin":false},"html_url":"https://github.com/dvs39/vc-module-customer","description":" Contacts management module","fork":true,"url":"https://api.github.com/repos/dvs39/vc-module-customer","forks_url":"https://api.github.com/repos/dvs39/vc-module-customer/forks","keys_url":"https://api.github.com/repos/dvs39/vc-module-customer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dvs39/vc-module-customer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dvs39/vc-module-customer/teams","hooks_url":"https://api.github.com/repos/dvs39/vc-module-customer/hooks","issue_events_url":"https://api.github.com/repos/dvs39/vc-module-customer/issues/events{/number}","events_url":"https://api.github.com/repos/dvs39/vc-module-customer/events","assignees_url":"https://api.github.com/repos/dvs39/vc-module-customer/assignees{/user}","branches_url":"https://api.github.com/repos/dvs39/vc-module-customer/branches{/branch}","tags_url":"https://api.github.com/repos/dvs39/vc-module-customer/tags","blobs_url":"https://api.github.com/repos/dvs39/vc-module-customer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dvs39/vc-module-customer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dvs39/vc-module-customer/git/refs{/sha}","trees_url":"https://api.github.com/repos/dvs39/vc-module-customer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dvs39/vc-module-customer/statuses/{sha}","languages_url":"https://api.github.com/repos/dvs39/vc-module-customer/languages","stargazers_url":"https://api.github.com/repos/dvs39/vc-module-customer/stargazers","contributors_url":"https://api.github.com/repos/dvs39/vc-module-customer/contributors","subscribers_url":"https://api.github.com/repos/dvs39/vc-module-customer/subscribers","subscription_url":"https://api.github.com/repos/dvs39/vc-module-customer/subscription","commits_url":"https://api.github.com/repos/dvs39/vc-module-customer/commits{/sha}","git_commits_url":"https://api.github.com/repos/dvs39/vc-module-customer/git/commits{/sha}","comments_url":"https://api.github.com/repos/dvs39/vc-module-customer/comments{/number}","issue_comment_url":"https://api.github.com/repos/dvs39/vc-module-customer/issues/comments{/number}","contents_url":"https://api.github.com/repos/dvs39/vc-module-customer/contents/{+path}","compare_url":"https://api.github.com/repos/dvs39/vc-module-customer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dvs39/vc-module-customer/merges","archive_url":"https://api.github.com/repos/dvs39/vc-module-customer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dvs39/vc-module-customer/downloads","issues_url":"https://api.github.com/repos/dvs39/vc-module-customer/issues{/number}","pulls_url":"https://api.github.com/repos/dvs39/vc-module-customer/pulls{/number}","milestones_url":"https://api.github.com/repos/dvs39/vc-module-customer/milestones{/number}","notifications_url":"https://api.github.com/repos/dvs39/vc-module-customer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dvs39/vc-module-customer/labels{/name}","releases_url":"https://api.github.com/repos/dvs39/vc-module-customer/releases{/id}","deployments_url":"https://api.github.com/repos/dvs39/vc-module-customer/deployments","created_at":"2018-12-07T12:27:21Z","updated_at":"2018-12-07T12:27:23Z","pushed_at":"2018-12-13T12:21:33Z","git_url":"git://github.com/dvs39/vc-module-customer.git","ssh_url":"git@github.com:dvs39/vc-module-customer.git","clone_url":"https://github.com/dvs39/vc-module-customer.git","svn_url":"https://github.com/dvs39/vc-module-customer","homepage":"","size":775,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"VirtoCommerce:dev","ref":"dev","sha":"1b9e8c5ee298cc85c818e375011bcbd94de75427","user":{"login":"VirtoCommerce","id":5762443,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3NjI0NDM=","avatar_url":"https://avatars2.githubusercontent.com/u/5762443?v=4","gravatar_id":"","url":"https://api.github.com/users/VirtoCommerce","html_url":"https://github.com/VirtoCommerce","followers_url":"https://api.github.com/users/VirtoCommerce/followers","following_url":"https://api.github.com/users/VirtoCommerce/following{/other_user}","gists_url":"https://api.github.com/users/VirtoCommerce/gists{/gist_id}","starred_url":"https://api.github.com/users/VirtoCommerce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VirtoCommerce/subscriptions","organizations_url":"https://api.github.com/users/VirtoCommerce/orgs","repos_url":"https://api.github.com/users/VirtoCommerce/repos","events_url":"https://api.github.com/users/VirtoCommerce/events{/privacy}","received_events_url":"https://api.github.com/users/VirtoCommerce/received_events","type":"Organization","site_admin":false},"repo":{"id":58745539,"node_id":"MDEwOlJlcG9zaXRvcnk1ODc0NTUzOQ==","name":"vc-module-customer","full_name":"VirtoCommerce/vc-module-customer","private":false,"owner":{"login":"VirtoCommerce","id":5762443,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU3NjI0NDM=","avatar_url":"https://avatars2.githubusercontent.com/u/5762443?v=4","gravatar_id":"","url":"https://api.github.com/users/VirtoCommerce","html_url":"https://github.com/VirtoCommerce","followers_url":"https://api.github.com/users/VirtoCommerce/followers","following_url":"https://api.github.com/users/VirtoCommerce/following{/other_user}","gists_url":"https://api.github.com/users/VirtoCommerce/gists{/gist_id}","starred_url":"https://api.github.com/users/VirtoCommerce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VirtoCommerce/subscriptions","organizations_url":"https://api.github.com/users/VirtoCommerce/orgs","repos_url":"https://api.github.com/users/VirtoCommerce/repos","events_url":"https://api.github.com/users/VirtoCommerce/events{/privacy}","received_events_url":"https://api.github.com/users/VirtoCommerce/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/VirtoCommerce/vc-module-customer","description":" Contacts management module","fork":false,"url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer","forks_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/forks","keys_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/teams","hooks_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/hooks","issue_events_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/issues/events{/number}","events_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/events","assignees_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/assignees{/user}","branches_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/branches{/branch}","tags_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/tags","blobs_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/git/refs{/sha}","trees_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/statuses/{sha}","languages_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/languages","stargazers_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/stargazers","contributors_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/contributors","subscribers_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/subscribers","subscription_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/subscription","commits_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/commits{/sha}","git_commits_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/git/commits{/sha}","comments_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/comments{/number}","issue_comment_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/issues/comments{/number}","contents_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/contents/{+path}","compare_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/merges","archive_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/downloads","issues_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/issues{/number}","pulls_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/pulls{/number}","milestones_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/milestones{/number}","notifications_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/labels{/name}","releases_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/releases{/id}","deployments_url":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/deployments","created_at":"2016-05-13T14:06:52Z","updated_at":"2018-08-16T07:55:27Z","pushed_at":"2018-12-13T12:21:35Z","git_url":"git://github.com/VirtoCommerce/vc-module-customer.git","ssh_url":"git@github.com:VirtoCommerce/vc-module-customer.git","clone_url":"https://github.com/VirtoCommerce/vc-module-customer.git","svn_url":"https://github.com/VirtoCommerce/vc-module-customer","homepage":"","size":770,"stargazers_count":2,"watchers_count":2,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":8,"open_issues":8,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/pulls/48"},"html":{"href":"https://github.com/VirtoCommerce/vc-module-customer/pull/48"},"issue":{"href":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/issues/48"},"comments":{"href":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/VirtoCommerce/vc-module-customer/statuses/c25188cc3fbbe34a92ff1763695ec73c895db8d9"}},"author_association":"NONE"}}
{"actor":{"display_login":"artem-dudarev"}}