{"action":"created","comment":{"url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/pulls/comments/23067493","id":23067493,"diff_hunk":"@@ -0,0 +1,231 @@\n+Indexed suggesters\n+==================\n+\n+Indexed suggesters require special mapping and documented data to work,\n+this includes two suggesters: completion and context.\n+\n+Mapping\n+-------\n+\n+Completion\n+~~~~~~~~~~\n+\n+Starting with a more simple example, completion suggester. Completion suggester is a simple field which you would just define in a document or an object using a special annotation for suggesters. Available mapping parameters can be found `here`_. For example:\n+\n+.. code:: php\n+\n+    <?php\n+\n+    namespace Acme\\DemoBundle\\Document;\n+\n+    use ONGR\\ElasticsearchBundle\\Annotation as ES;\n+\n+    /**\n+     * Product document.\n+     *\n+     * @ES\\Document(type=\"product\")\n+     */\n+    class Product implements DocumentInterface\n+    {\n+        /**\n+         * @var CompletionSuggesting\n+         *\n+         * @ES\\Suggester\\CompletionSuggesterProperty(\n+         *  name = \"completion_suggesting\",\n+         *  objectName = \"AcmeDemoBundle:CompletionSuggesting\",\n+         *  index_analyzer = \"simple\",\n+         *  search_analyzer = \"simple\",\n+         *  payloads = false,\n+         *  )\n+         */\n+        public $completionSuggesting;\n+    }\n+\n+As you can see we need to define an object for it, so we can store and retrieve its data objectively.\n+In order to do that, we can just use a trait already prepared in ESB.","path":"Resources/doc/suggesters/indexed_suggesters.rst","position":45,"original_position":45,"commit_id":"30d07e023318d6fc0ede006bb2e370943023ccb3","original_commit_id":"30d07e023318d6fc0ede006bb2e370943023ccb3","user":{"login":"mindaugasbarysas","id":9528837,"avatar_url":"https://avatars.githubusercontent.com/u/9528837?v=3","gravatar_id":"","url":"https://api.github.com/users/mindaugasbarysas","html_url":"https://github.com/mindaugasbarysas","followers_url":"https://api.github.com/users/mindaugasbarysas/followers","following_url":"https://api.github.com/users/mindaugasbarysas/following{/other_user}","gists_url":"https://api.github.com/users/mindaugasbarysas/gists{/gist_id}","starred_url":"https://api.github.com/users/mindaugasbarysas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mindaugasbarysas/subscriptions","organizations_url":"https://api.github.com/users/mindaugasbarysas/orgs","repos_url":"https://api.github.com/users/mindaugasbarysas/repos","events_url":"https://api.github.com/users/mindaugasbarysas/events{/privacy}","received_events_url":"https://api.github.com/users/mindaugasbarysas/received_events","type":"User","site_admin":false},"body":"To do that, we can just use a trait already prepared in ESB.","created_at":"2015-01-16T08:18:40Z","updated_at":"2015-01-16T08:18:40Z","html_url":"https://github.com/ongr-io/ElasticsearchBundle/pull/131#discussion_r23067493","pull_request_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/pulls/131","_links":{"self":{"href":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/pulls/comments/23067493"},"html":{"href":"https://github.com/ongr-io/ElasticsearchBundle/pull/131#discussion_r23067493"},"pull_request":{"href":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/pulls/131"}}},"pull_request":{"url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/pulls/131","id":27455639,"html_url":"https://github.com/ongr-io/ElasticsearchBundle/pull/131","diff_url":"https://github.com/ongr-io/ElasticsearchBundle/pull/131.diff","patch_url":"https://github.com/ongr-io/ElasticsearchBundle/pull/131.patch","issue_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/issues/131","number":131,"state":"open","locked":false,"title":"Converting documentation to RST format","user":{"login":"tautrimas","id":364223,"avatar_url":"https://avatars.githubusercontent.com/u/364223?v=3","gravatar_id":"","url":"https://api.github.com/users/tautrimas","html_url":"https://github.com/tautrimas","followers_url":"https://api.github.com/users/tautrimas/followers","following_url":"https://api.github.com/users/tautrimas/following{/other_user}","gists_url":"https://api.github.com/users/tautrimas/gists{/gist_id}","starred_url":"https://api.github.com/users/tautrimas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tautrimas/subscriptions","organizations_url":"https://api.github.com/users/tautrimas/orgs","repos_url":"https://api.github.com/users/tautrimas/repos","events_url":"https://api.github.com/users/tautrimas/events{/privacy}","received_events_url":"https://api.github.com/users/tautrimas/received_events","type":"User","site_admin":false},"body":"![screen shot 2015-01-15 at 21 34 30](https://cloud.githubusercontent.com/assets/364223/5764975/9c6236bc-9cfe-11e4-9d18-40752c279117.png)\r\n","created_at":"2015-01-15T19:37:50Z","updated_at":"2015-01-16T08:18:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bfcbc1657153407ed77d4dfe0cd0b63e0a25e8d7","assignee":{"login":"tautrimas","id":364223,"avatar_url":"https://avatars.githubusercontent.com/u/364223?v=3","gravatar_id":"","url":"https://api.github.com/users/tautrimas","html_url":"https://github.com/tautrimas","followers_url":"https://api.github.com/users/tautrimas/followers","following_url":"https://api.github.com/users/tautrimas/following{/other_user}","gists_url":"https://api.github.com/users/tautrimas/gists{/gist_id}","starred_url":"https://api.github.com/users/tautrimas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tautrimas/subscriptions","organizations_url":"https://api.github.com/users/tautrimas/orgs","repos_url":"https://api.github.com/users/tautrimas/repos","events_url":"https://api.github.com/users/tautrimas/events{/privacy}","received_events_url":"https://api.github.com/users/tautrimas/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/pulls/131/commits","review_comments_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/pulls/131/comments","review_comment_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/issues/131/comments","statuses_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/statuses/30d07e023318d6fc0ede006bb2e370943023ccb3","head":{"label":"tautrimas:rst","ref":"rst","sha":"30d07e023318d6fc0ede006bb2e370943023ccb3","user":{"login":"tautrimas","id":364223,"avatar_url":"https://avatars.githubusercontent.com/u/364223?v=3","gravatar_id":"","url":"https://api.github.com/users/tautrimas","html_url":"https://github.com/tautrimas","followers_url":"https://api.github.com/users/tautrimas/followers","following_url":"https://api.github.com/users/tautrimas/following{/other_user}","gists_url":"https://api.github.com/users/tautrimas/gists{/gist_id}","starred_url":"https://api.github.com/users/tautrimas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tautrimas/subscriptions","organizations_url":"https://api.github.com/users/tautrimas/orgs","repos_url":"https://api.github.com/users/tautrimas/repos","events_url":"https://api.github.com/users/tautrimas/events{/privacy}","received_events_url":"https://api.github.com/users/tautrimas/received_events","type":"User","site_admin":false},"repo":{"id":26019991,"name":"ElasticsearchBundle","full_name":"tautrimas/ElasticsearchBundle","owner":{"login":"tautrimas","id":364223,"avatar_url":"https://avatars.githubusercontent.com/u/364223?v=3","gravatar_id":"","url":"https://api.github.com/users/tautrimas","html_url":"https://github.com/tautrimas","followers_url":"https://api.github.com/users/tautrimas/followers","following_url":"https://api.github.com/users/tautrimas/following{/other_user}","gists_url":"https://api.github.com/users/tautrimas/gists{/gist_id}","starred_url":"https://api.github.com/users/tautrimas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tautrimas/subscriptions","organizations_url":"https://api.github.com/users/tautrimas/orgs","repos_url":"https://api.github.com/users/tautrimas/repos","events_url":"https://api.github.com/users/tautrimas/events{/privacy}","received_events_url":"https://api.github.com/users/tautrimas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tautrimas/ElasticsearchBundle","description":"Symfony2 bundle for elasticsearch","fork":true,"url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle","forks_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/forks","keys_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/teams","hooks_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/hooks","issue_events_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/issues/events{/number}","events_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/events","assignees_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/assignees{/user}","branches_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/branches{/branch}","tags_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/tags","blobs_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/languages","stargazers_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/stargazers","contributors_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/contributors","subscribers_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/subscribers","subscription_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/subscription","commits_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/issues/comments/{number}","contents_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/contents/{+path}","compare_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/merges","archive_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/downloads","issues_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/issues{/number}","pulls_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/labels{/name}","releases_url":"https://api.github.com/repos/tautrimas/ElasticsearchBundle/releases{/id}","created_at":"2014-10-31T14:43:08Z","updated_at":"2014-10-31T12:55:02Z","pushed_at":"2015-01-15T20:12:42Z","git_url":"git://github.com/tautrimas/ElasticsearchBundle.git","ssh_url":"git@github.com:tautrimas/ElasticsearchBundle.git","clone_url":"https://github.com/tautrimas/ElasticsearchBundle.git","svn_url":"https://github.com/tautrimas/ElasticsearchBundle","homepage":"","size":699,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ongr-io:master","ref":"master","sha":"b895c9b01662216af212fea962a6a7b77e13d467","user":{"login":"ongr-io","id":8971056,"avatar_url":"https://avatars.githubusercontent.com/u/8971056?v=3","gravatar_id":"","url":"https://api.github.com/users/ongr-io","html_url":"https://github.com/ongr-io","followers_url":"https://api.github.com/users/ongr-io/followers","following_url":"https://api.github.com/users/ongr-io/following{/other_user}","gists_url":"https://api.github.com/users/ongr-io/gists{/gist_id}","starred_url":"https://api.github.com/users/ongr-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ongr-io/subscriptions","organizations_url":"https://api.github.com/users/ongr-io/orgs","repos_url":"https://api.github.com/users/ongr-io/repos","events_url":"https://api.github.com/users/ongr-io/events{/privacy}","received_events_url":"https://api.github.com/users/ongr-io/received_events","type":"Organization","site_admin":false},"repo":{"id":25922479,"name":"ElasticsearchBundle","full_name":"ongr-io/ElasticsearchBundle","owner":{"login":"ongr-io","id":8971056,"avatar_url":"https://avatars.githubusercontent.com/u/8971056?v=3","gravatar_id":"","url":"https://api.github.com/users/ongr-io","html_url":"https://github.com/ongr-io","followers_url":"https://api.github.com/users/ongr-io/followers","following_url":"https://api.github.com/users/ongr-io/following{/other_user}","gists_url":"https://api.github.com/users/ongr-io/gists{/gist_id}","starred_url":"https://api.github.com/users/ongr-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ongr-io/subscriptions","organizations_url":"https://api.github.com/users/ongr-io/orgs","repos_url":"https://api.github.com/users/ongr-io/repos","events_url":"https://api.github.com/users/ongr-io/events{/privacy}","received_events_url":"https://api.github.com/users/ongr-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ongr-io/ElasticsearchBundle","description":"Symfony2 bundle for elasticsearch","fork":false,"url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle","forks_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/forks","keys_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/teams","hooks_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/hooks","issue_events_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/issues/events{/number}","events_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/events","assignees_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/assignees{/user}","branches_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/branches{/branch}","tags_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/tags","blobs_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/statuses/{sha}","languages_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/languages","stargazers_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/stargazers","contributors_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/contributors","subscribers_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/subscribers","subscription_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/subscription","commits_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/issues/comments/{number}","contents_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/contents/{+path}","compare_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/merges","archive_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/downloads","issues_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/issues{/number}","pulls_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/pulls{/number}","milestones_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/milestones{/number}","notifications_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/labels{/name}","releases_url":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/releases{/id}","created_at":"2014-10-29T13:37:30Z","updated_at":"2015-01-15T13:02:50Z","pushed_at":"2015-01-15T13:02:50Z","git_url":"git://github.com/ongr-io/ElasticsearchBundle.git","ssh_url":"git@github.com:ongr-io/ElasticsearchBundle.git","clone_url":"https://github.com/ongr-io/ElasticsearchBundle.git","svn_url":"https://github.com/ongr-io/ElasticsearchBundle","homepage":"","size":1576,"stargazers_count":68,"watchers_count":68,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":26,"forks":23,"open_issues":26,"watchers":68,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/pulls/131"},"html":{"href":"https://github.com/ongr-io/ElasticsearchBundle/pull/131"},"issue":{"href":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/issues/131"},"comments":{"href":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/issues/131/comments"},"review_comments":{"href":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/pulls/131/comments"},"review_comment":{"href":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/pulls/131/commits"},"statuses":{"href":"https://api.github.com/repos/ongr-io/ElasticsearchBundle/statuses/30d07e023318d6fc0ede006bb2e370943023ccb3"}}}}