{"action":"created","comment":{"url":"https://api.github.com/repos/atrites/lounge/pulls/comments/79666250","id":79666250,"diff_hunk":"@@ -208,20 +203,18 @@ export default class Schema {\n         });\n         indexName = indexName.join('_and_');\n       }\n-\n-      this.indexes[indexName] = {path: prop, name: indexName, indexType: indexType, compound: true};\n+      compound = true;\n     } else {\n-      if (!this.descriptor[prop]){\n-        throw new Error('Descriptor not found for this field');\n-      }\n-\n-      this.descriptor[prop].index = true;\n-      this.descriptor[prop] = _.extend(this.descriptor[prop], options);\n+      if (!indexName) {\n+        indexName = prop\n+        if (trailingDigitReg.test(indexName)) {\n+          indexName = indexName[indexName.length - 2];","path":"lib/schema.js","position":41,"original_position":41,"commit_id":"24053a1991d56fe50fb47ac0866117a737ec8156","original_commit_id":"24053a1991d56fe50fb47ac0866117a737ec8156","user":{"login":"jcurtis","id":206295,"avatar_url":"https://avatars.githubusercontent.com/u/206295?v=3","gravatar_id":"","url":"https://api.github.com/users/jcurtis","html_url":"https://github.com/jcurtis","followers_url":"https://api.github.com/users/jcurtis/followers","following_url":"https://api.github.com/users/jcurtis/following{/other_user}","gists_url":"https://api.github.com/users/jcurtis/gists{/gist_id}","starred_url":"https://api.github.com/users/jcurtis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcurtis/subscriptions","organizations_url":"https://api.github.com/users/jcurtis/orgs","repos_url":"https://api.github.com/users/jcurtis/repos","events_url":"https://api.github.com/users/jcurtis/events{/privacy}","received_events_url":"https://api.github.com/users/jcurtis/received_events","type":"User","site_admin":false},"body":"What's going on here? ","created_at":"2016-09-20T17:25:59Z","updated_at":"2016-09-20T17:25:59Z","html_url":"https://github.com/atrites/lounge/pull/4#discussion_r79666250","pull_request_url":"https://api.github.com/repos/atrites/lounge/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/atrites/lounge/pulls/comments/79666250"},"html":{"href":"https://github.com/atrites/lounge/pull/4#discussion_r79666250"},"pull_request":{"href":"https://api.github.com/repos/atrites/lounge/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/atrites/lounge/pulls/4","id":86018364,"html_url":"https://github.com/atrites/lounge/pull/4","diff_url":"https://github.com/atrites/lounge/pull/4.diff","patch_url":"https://github.com/atrites/lounge/pull/4.patch","issue_url":"https://api.github.com/repos/atrites/lounge/issues/4","number":4,"state":"open","locked":false,"title":"Fixing how nested values are handled in the index() function","user":{"login":"atrites","id":2098911,"avatar_url":"https://avatars.githubusercontent.com/u/2098911?v=3","gravatar_id":"","url":"https://api.github.com/users/atrites","html_url":"https://github.com/atrites","followers_url":"https://api.github.com/users/atrites/followers","following_url":"https://api.github.com/users/atrites/following{/other_user}","gists_url":"https://api.github.com/users/atrites/gists{/gist_id}","starred_url":"https://api.github.com/users/atrites/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atrites/subscriptions","organizations_url":"https://api.github.com/users/atrites/orgs","repos_url":"https://api.github.com/users/atrites/repos","events_url":"https://api.github.com/users/atrites/events{/privacy}","received_events_url":"https://api.github.com/users/atrites/received_events","type":"User","site_admin":false},"body":"We needed to remove the check in the index function as nested values were not being validated properly. Should create a task to populate the descriptor properly for nested values (not sure how to do this yet). In any case this will still work just as it does through the in schema index definition. \r\n\r\nAlso added a test for indexing nested values in an array. This will be added in a future PR. \r\n","created_at":"2016-09-20T17:14:43Z","updated_at":"2016-09-20T17:25:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e01ac6140582b7bd5db820369416ff2da2fcc772","assignee":{"login":"atrites","id":2098911,"avatar_url":"https://avatars.githubusercontent.com/u/2098911?v=3","gravatar_id":"","url":"https://api.github.com/users/atrites","html_url":"https://github.com/atrites","followers_url":"https://api.github.com/users/atrites/followers","following_url":"https://api.github.com/users/atrites/following{/other_user}","gists_url":"https://api.github.com/users/atrites/gists{/gist_id}","starred_url":"https://api.github.com/users/atrites/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atrites/subscriptions","organizations_url":"https://api.github.com/users/atrites/orgs","repos_url":"https://api.github.com/users/atrites/repos","events_url":"https://api.github.com/users/atrites/events{/privacy}","received_events_url":"https://api.github.com/users/atrites/received_events","type":"User","site_admin":false},"assignees":[{"login":"atrites","id":2098911,"avatar_url":"https://avatars.githubusercontent.com/u/2098911?v=3","gravatar_id":"","url":"https://api.github.com/users/atrites","html_url":"https://github.com/atrites","followers_url":"https://api.github.com/users/atrites/followers","following_url":"https://api.github.com/users/atrites/following{/other_user}","gists_url":"https://api.github.com/users/atrites/gists{/gist_id}","starred_url":"https://api.github.com/users/atrites/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atrites/subscriptions","organizations_url":"https://api.github.com/users/atrites/orgs","repos_url":"https://api.github.com/users/atrites/repos","events_url":"https://api.github.com/users/atrites/events{/privacy}","received_events_url":"https://api.github.com/users/atrites/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/atrites/lounge/pulls/4/commits","review_comments_url":"https://api.github.com/repos/atrites/lounge/pulls/4/comments","review_comment_url":"https://api.github.com/repos/atrites/lounge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atrites/lounge/issues/4/comments","statuses_url":"https://api.github.com/repos/atrites/lounge/statuses/24053a1991d56fe50fb47ac0866117a737ec8156","head":{"label":"atrites:fix/nested_values","ref":"fix/nested_values","sha":"24053a1991d56fe50fb47ac0866117a737ec8156","user":{"login":"atrites","id":2098911,"avatar_url":"https://avatars.githubusercontent.com/u/2098911?v=3","gravatar_id":"","url":"https://api.github.com/users/atrites","html_url":"https://github.com/atrites","followers_url":"https://api.github.com/users/atrites/followers","following_url":"https://api.github.com/users/atrites/following{/other_user}","gists_url":"https://api.github.com/users/atrites/gists{/gist_id}","starred_url":"https://api.github.com/users/atrites/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atrites/subscriptions","organizations_url":"https://api.github.com/users/atrites/orgs","repos_url":"https://api.github.com/users/atrites/repos","events_url":"https://api.github.com/users/atrites/events{/privacy}","received_events_url":"https://api.github.com/users/atrites/received_events","type":"User","site_admin":false},"repo":{"id":66298705,"name":"lounge","full_name":"atrites/lounge","owner":{"login":"atrites","id":2098911,"avatar_url":"https://avatars.githubusercontent.com/u/2098911?v=3","gravatar_id":"","url":"https://api.github.com/users/atrites","html_url":"https://github.com/atrites","followers_url":"https://api.github.com/users/atrites/followers","following_url":"https://api.github.com/users/atrites/following{/other_user}","gists_url":"https://api.github.com/users/atrites/gists{/gist_id}","starred_url":"https://api.github.com/users/atrites/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atrites/subscriptions","organizations_url":"https://api.github.com/users/atrites/orgs","repos_url":"https://api.github.com/users/atrites/repos","events_url":"https://api.github.com/users/atrites/events{/privacy}","received_events_url":"https://api.github.com/users/atrites/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/atrites/lounge","description":"Simple Mongoose-inspired ODM for Couchbase.","fork":true,"url":"https://api.github.com/repos/atrites/lounge","forks_url":"https://api.github.com/repos/atrites/lounge/forks","keys_url":"https://api.github.com/repos/atrites/lounge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atrites/lounge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atrites/lounge/teams","hooks_url":"https://api.github.com/repos/atrites/lounge/hooks","issue_events_url":"https://api.github.com/repos/atrites/lounge/issues/events{/number}","events_url":"https://api.github.com/repos/atrites/lounge/events","assignees_url":"https://api.github.com/repos/atrites/lounge/assignees{/user}","branches_url":"https://api.github.com/repos/atrites/lounge/branches{/branch}","tags_url":"https://api.github.com/repos/atrites/lounge/tags","blobs_url":"https://api.github.com/repos/atrites/lounge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atrites/lounge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atrites/lounge/git/refs{/sha}","trees_url":"https://api.github.com/repos/atrites/lounge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atrites/lounge/statuses/{sha}","languages_url":"https://api.github.com/repos/atrites/lounge/languages","stargazers_url":"https://api.github.com/repos/atrites/lounge/stargazers","contributors_url":"https://api.github.com/repos/atrites/lounge/contributors","subscribers_url":"https://api.github.com/repos/atrites/lounge/subscribers","subscription_url":"https://api.github.com/repos/atrites/lounge/subscription","commits_url":"https://api.github.com/repos/atrites/lounge/commits{/sha}","git_commits_url":"https://api.github.com/repos/atrites/lounge/git/commits{/sha}","comments_url":"https://api.github.com/repos/atrites/lounge/comments{/number}","issue_comment_url":"https://api.github.com/repos/atrites/lounge/issues/comments{/number}","contents_url":"https://api.github.com/repos/atrites/lounge/contents/{+path}","compare_url":"https://api.github.com/repos/atrites/lounge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atrites/lounge/merges","archive_url":"https://api.github.com/repos/atrites/lounge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atrites/lounge/downloads","issues_url":"https://api.github.com/repos/atrites/lounge/issues{/number}","pulls_url":"https://api.github.com/repos/atrites/lounge/pulls{/number}","milestones_url":"https://api.github.com/repos/atrites/lounge/milestones{/number}","notifications_url":"https://api.github.com/repos/atrites/lounge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atrites/lounge/labels{/name}","releases_url":"https://api.github.com/repos/atrites/lounge/releases{/id}","deployments_url":"https://api.github.com/repos/atrites/lounge/deployments","created_at":"2016-08-22T18:42:02Z","updated_at":"2016-08-22T18:42:03Z","pushed_at":"2016-09-20T17:14:43Z","git_url":"git://github.com/atrites/lounge.git","ssh_url":"git@github.com:atrites/lounge.git","clone_url":"https://github.com/atrites/lounge.git","svn_url":"https://github.com/atrites/lounge","homepage":"http://bojand.github.io/lounge","size":2219,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"atrites:master","ref":"master","sha":"21547499cd4f692213457ad67227a503c8842081","user":{"login":"atrites","id":2098911,"avatar_url":"https://avatars.githubusercontent.com/u/2098911?v=3","gravatar_id":"","url":"https://api.github.com/users/atrites","html_url":"https://github.com/atrites","followers_url":"https://api.github.com/users/atrites/followers","following_url":"https://api.github.com/users/atrites/following{/other_user}","gists_url":"https://api.github.com/users/atrites/gists{/gist_id}","starred_url":"https://api.github.com/users/atrites/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atrites/subscriptions","organizations_url":"https://api.github.com/users/atrites/orgs","repos_url":"https://api.github.com/users/atrites/repos","events_url":"https://api.github.com/users/atrites/events{/privacy}","received_events_url":"https://api.github.com/users/atrites/received_events","type":"User","site_admin":false},"repo":{"id":66298705,"name":"lounge","full_name":"atrites/lounge","owner":{"login":"atrites","id":2098911,"avatar_url":"https://avatars.githubusercontent.com/u/2098911?v=3","gravatar_id":"","url":"https://api.github.com/users/atrites","html_url":"https://github.com/atrites","followers_url":"https://api.github.com/users/atrites/followers","following_url":"https://api.github.com/users/atrites/following{/other_user}","gists_url":"https://api.github.com/users/atrites/gists{/gist_id}","starred_url":"https://api.github.com/users/atrites/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atrites/subscriptions","organizations_url":"https://api.github.com/users/atrites/orgs","repos_url":"https://api.github.com/users/atrites/repos","events_url":"https://api.github.com/users/atrites/events{/privacy}","received_events_url":"https://api.github.com/users/atrites/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/atrites/lounge","description":"Simple Mongoose-inspired ODM for Couchbase.","fork":true,"url":"https://api.github.com/repos/atrites/lounge","forks_url":"https://api.github.com/repos/atrites/lounge/forks","keys_url":"https://api.github.com/repos/atrites/lounge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atrites/lounge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atrites/lounge/teams","hooks_url":"https://api.github.com/repos/atrites/lounge/hooks","issue_events_url":"https://api.github.com/repos/atrites/lounge/issues/events{/number}","events_url":"https://api.github.com/repos/atrites/lounge/events","assignees_url":"https://api.github.com/repos/atrites/lounge/assignees{/user}","branches_url":"https://api.github.com/repos/atrites/lounge/branches{/branch}","tags_url":"https://api.github.com/repos/atrites/lounge/tags","blobs_url":"https://api.github.com/repos/atrites/lounge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atrites/lounge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atrites/lounge/git/refs{/sha}","trees_url":"https://api.github.com/repos/atrites/lounge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atrites/lounge/statuses/{sha}","languages_url":"https://api.github.com/repos/atrites/lounge/languages","stargazers_url":"https://api.github.com/repos/atrites/lounge/stargazers","contributors_url":"https://api.github.com/repos/atrites/lounge/contributors","subscribers_url":"https://api.github.com/repos/atrites/lounge/subscribers","subscription_url":"https://api.github.com/repos/atrites/lounge/subscription","commits_url":"https://api.github.com/repos/atrites/lounge/commits{/sha}","git_commits_url":"https://api.github.com/repos/atrites/lounge/git/commits{/sha}","comments_url":"https://api.github.com/repos/atrites/lounge/comments{/number}","issue_comment_url":"https://api.github.com/repos/atrites/lounge/issues/comments{/number}","contents_url":"https://api.github.com/repos/atrites/lounge/contents/{+path}","compare_url":"https://api.github.com/repos/atrites/lounge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atrites/lounge/merges","archive_url":"https://api.github.com/repos/atrites/lounge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atrites/lounge/downloads","issues_url":"https://api.github.com/repos/atrites/lounge/issues{/number}","pulls_url":"https://api.github.com/repos/atrites/lounge/pulls{/number}","milestones_url":"https://api.github.com/repos/atrites/lounge/milestones{/number}","notifications_url":"https://api.github.com/repos/atrites/lounge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atrites/lounge/labels{/name}","releases_url":"https://api.github.com/repos/atrites/lounge/releases{/id}","deployments_url":"https://api.github.com/repos/atrites/lounge/deployments","created_at":"2016-08-22T18:42:02Z","updated_at":"2016-08-22T18:42:03Z","pushed_at":"2016-09-20T17:14:43Z","git_url":"git://github.com/atrites/lounge.git","ssh_url":"git@github.com:atrites/lounge.git","clone_url":"https://github.com/atrites/lounge.git","svn_url":"https://github.com/atrites/lounge","homepage":"http://bojand.github.io/lounge","size":2219,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atrites/lounge/pulls/4"},"html":{"href":"https://github.com/atrites/lounge/pull/4"},"issue":{"href":"https://api.github.com/repos/atrites/lounge/issues/4"},"comments":{"href":"https://api.github.com/repos/atrites/lounge/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/atrites/lounge/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/atrites/lounge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atrites/lounge/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/atrites/lounge/statuses/24053a1991d56fe50fb47ac0866117a737ec8156"}}}}
{"actor":{"display_login":"jcurtis"}}