{"action":"created","comment":{"url":"https://api.github.com/repos/hibernate/hibernate-search/pulls/comments/37086107","id":37086107,"diff_hunk":"@@ -24,6 +41,9 @@\n \n \tprivate static final Log log = LoggerFactory.make();\n \n+\tprivate static final Class<?>[] NUMERIC_JAVA_TIME_TYPES = { Year.class, Instant.class, LocalDate.class, LocalDateTime.class, YearMonth.class,","path":"engine/src/main/java/org/hibernate/search/bridge/util/impl/NumericFieldUtils.java","position":33,"original_position":33,"commit_id":"096d8841d9ff6ce8e44595a3bf724780347da25d","original_commit_id":"096d8841d9ff6ce8e44595a3bf724780347da25d","user":{"login":"DavideD","id":559221,"avatar_url":"https://avatars.githubusercontent.com/u/559221?v=3","gravatar_id":"","url":"https://api.github.com/users/DavideD","html_url":"https://github.com/DavideD","followers_url":"https://api.github.com/users/DavideD/followers","following_url":"https://api.github.com/users/DavideD/following{/other_user}","gists_url":"https://api.github.com/users/DavideD/gists{/gist_id}","starred_url":"https://api.github.com/users/DavideD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavideD/subscriptions","organizations_url":"https://api.github.com/users/DavideD/orgs","repos_url":"https://api.github.com/users/DavideD/repos","events_url":"https://api.github.com/users/DavideD/events{/privacy}","received_events_url":"https://api.github.com/users/DavideD/received_events","type":"User","site_admin":false},"body":"Right, I was making confusion.\r\n\r\nI didn't build it with JDK 7","created_at":"2015-08-14T15:14:26Z","updated_at":"2015-08-14T15:14:26Z","html_url":"https://github.com/hibernate/hibernate-search/pull/887#discussion_r37086107","pull_request_url":"https://api.github.com/repos/hibernate/hibernate-search/pulls/887","_links":{"self":{"href":"https://api.github.com/repos/hibernate/hibernate-search/pulls/comments/37086107"},"html":{"href":"https://github.com/hibernate/hibernate-search/pull/887#discussion_r37086107"},"pull_request":{"href":"https://api.github.com/repos/hibernate/hibernate-search/pulls/887"}}},"pull_request":{"url":"https://api.github.com/repos/hibernate/hibernate-search/pulls/887","id":42154127,"html_url":"https://github.com/hibernate/hibernate-search/pull/887","diff_url":"https://github.com/hibernate/hibernate-search/pull/887.diff","patch_url":"https://github.com/hibernate/hibernate-search/pull/887.patch","issue_url":"https://api.github.com/repos/hibernate/hibernate-search/issues/887","number":887,"state":"open","locked":false,"title":"HSEARCH-1947 Java 8 Date and Time","user":{"login":"DavideD","id":559221,"avatar_url":"https://avatars.githubusercontent.com/u/559221?v=3","gravatar_id":"","url":"https://api.github.com/users/DavideD","html_url":"https://github.com/DavideD","followers_url":"https://api.github.com/users/DavideD/followers","following_url":"https://api.github.com/users/DavideD/following{/other_user}","gists_url":"https://api.github.com/users/DavideD/gists{/gist_id}","starred_url":"https://api.github.com/users/DavideD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavideD/subscriptions","organizations_url":"https://api.github.com/users/DavideD/orgs","repos_url":"https://api.github.com/users/DavideD/repos","events_url":"https://api.github.com/users/DavideD/events{/privacy}","received_events_url":"https://api.github.com/users/DavideD/received_events","type":"User","site_admin":false},"body":"https://hibernate.atlassian.net/browse/HSEARCH-1947\r\n\r\nThis patch will enforce the use of JDK 8 for the build and add the new bridges under the package:\r\n`org.hibernate.search.bridge.builtin.time.impl`\r\n\r\nAfter the discussion on the mailing list ,and off-line with @Sanne I've created bridges for:\r\n\r\n* `LocalDate`, `LocalTime`, `Year`, `YearMonth`, `MonthDay`:\r\n  they get stored as numeric fields where the digits represents the year, month or day of the date.\r\n  For example, 2012-12-1 becomes the long 20121201\r\n* `Instant`, `LocalDateTime`: they are stored as number of milliseconds from epoch.\r\n* `Duration`: duration in milliseconds\r\n* `ZoneId` and `ZoneOffset`: they get store as string \r\n\r\nNote that the precision for `Duration`, `LocalDateTime` and `Instant` is the millisecond.\r\nThis should cover most cases.\r\n\r\nNone of this bridges support `@DateBridge`. It seems there  is no real need for the user to select the encoding, and the new java api provides methods and classes for date and time truncation. Maybe it could be useful for the time to have a @TimeBridge annotation to set the resolution using `java.time.temporal.ChronoUnit`. A user can always create a custom bridge or we can add feature if they are requested.\r\n\r\nWe decided to not create a bridge for OffsetDateTime, OffsetTime, ZonedDateTIme and so on.\r\nProbably the most useful way to store the offset and the zone is in separte fields, but with the current bridges the user can store these information as separate properties of the entity.\r\n\r\n\r\n\r\n\r\n","created_at":"2015-08-11T17:18:45Z","updated_at":"2015-08-14T15:14:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7473b7a83c62edbf70a653014b382597d2a13ef2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hibernate/hibernate-search/pulls/887/commits","review_comments_url":"https://api.github.com/repos/hibernate/hibernate-search/pulls/887/comments","review_comment_url":"https://api.github.com/repos/hibernate/hibernate-search/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hibernate/hibernate-search/issues/887/comments","statuses_url":"https://api.github.com/repos/hibernate/hibernate-search/statuses/096d8841d9ff6ce8e44595a3bf724780347da25d","head":{"label":"DavideD:HSEARCH-1947-Java8-datetime","ref":"HSEARCH-1947-Java8-datetime","sha":"096d8841d9ff6ce8e44595a3bf724780347da25d","user":{"login":"DavideD","id":559221,"avatar_url":"https://avatars.githubusercontent.com/u/559221?v=3","gravatar_id":"","url":"https://api.github.com/users/DavideD","html_url":"https://github.com/DavideD","followers_url":"https://api.github.com/users/DavideD/followers","following_url":"https://api.github.com/users/DavideD/following{/other_user}","gists_url":"https://api.github.com/users/DavideD/gists{/gist_id}","starred_url":"https://api.github.com/users/DavideD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavideD/subscriptions","organizations_url":"https://api.github.com/users/DavideD/orgs","repos_url":"https://api.github.com/users/DavideD/repos","events_url":"https://api.github.com/users/DavideD/events{/privacy}","received_events_url":"https://api.github.com/users/DavideD/received_events","type":"User","site_admin":false},"repo":{"id":1535851,"name":"hibernate-search","full_name":"DavideD/hibernate-search","owner":{"login":"DavideD","id":559221,"avatar_url":"https://avatars.githubusercontent.com/u/559221?v=3","gravatar_id":"","url":"https://api.github.com/users/DavideD","html_url":"https://github.com/DavideD","followers_url":"https://api.github.com/users/DavideD/followers","following_url":"https://api.github.com/users/DavideD/following{/other_user}","gists_url":"https://api.github.com/users/DavideD/gists{/gist_id}","starred_url":"https://api.github.com/users/DavideD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavideD/subscriptions","organizations_url":"https://api.github.com/users/DavideD/orgs","repos_url":"https://api.github.com/users/DavideD/repos","events_url":"https://api.github.com/users/DavideD/events{/privacy}","received_events_url":"https://api.github.com/users/DavideD/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DavideD/hibernate-search","description":"Hibernate Search: full-text search for domain model","fork":true,"url":"https://api.github.com/repos/DavideD/hibernate-search","forks_url":"https://api.github.com/repos/DavideD/hibernate-search/forks","keys_url":"https://api.github.com/repos/DavideD/hibernate-search/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DavideD/hibernate-search/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DavideD/hibernate-search/teams","hooks_url":"https://api.github.com/repos/DavideD/hibernate-search/hooks","issue_events_url":"https://api.github.com/repos/DavideD/hibernate-search/issues/events{/number}","events_url":"https://api.github.com/repos/DavideD/hibernate-search/events","assignees_url":"https://api.github.com/repos/DavideD/hibernate-search/assignees{/user}","branches_url":"https://api.github.com/repos/DavideD/hibernate-search/branches{/branch}","tags_url":"https://api.github.com/repos/DavideD/hibernate-search/tags","blobs_url":"https://api.github.com/repos/DavideD/hibernate-search/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DavideD/hibernate-search/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DavideD/hibernate-search/git/refs{/sha}","trees_url":"https://api.github.com/repos/DavideD/hibernate-search/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DavideD/hibernate-search/statuses/{sha}","languages_url":"https://api.github.com/repos/DavideD/hibernate-search/languages","stargazers_url":"https://api.github.com/repos/DavideD/hibernate-search/stargazers","contributors_url":"https://api.github.com/repos/DavideD/hibernate-search/contributors","subscribers_url":"https://api.github.com/repos/DavideD/hibernate-search/subscribers","subscription_url":"https://api.github.com/repos/DavideD/hibernate-search/subscription","commits_url":"https://api.github.com/repos/DavideD/hibernate-search/commits{/sha}","git_commits_url":"https://api.github.com/repos/DavideD/hibernate-search/git/commits{/sha}","comments_url":"https://api.github.com/repos/DavideD/hibernate-search/comments{/number}","issue_comment_url":"https://api.github.com/repos/DavideD/hibernate-search/issues/comments{/number}","contents_url":"https://api.github.com/repos/DavideD/hibernate-search/contents/{+path}","compare_url":"https://api.github.com/repos/DavideD/hibernate-search/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DavideD/hibernate-search/merges","archive_url":"https://api.github.com/repos/DavideD/hibernate-search/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DavideD/hibernate-search/downloads","issues_url":"https://api.github.com/repos/DavideD/hibernate-search/issues{/number}","pulls_url":"https://api.github.com/repos/DavideD/hibernate-search/pulls{/number}","milestones_url":"https://api.github.com/repos/DavideD/hibernate-search/milestones{/number}","notifications_url":"https://api.github.com/repos/DavideD/hibernate-search/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DavideD/hibernate-search/labels{/name}","releases_url":"https://api.github.com/repos/DavideD/hibernate-search/releases{/id}","created_at":"2011-03-28T08:59:44Z","updated_at":"2015-02-06T15:28:56Z","pushed_at":"2015-08-14T11:42:40Z","git_url":"git://github.com/DavideD/hibernate-search.git","ssh_url":"git@github.com:DavideD/hibernate-search.git","clone_url":"https://github.com/DavideD/hibernate-search.git","svn_url":"https://github.com/DavideD/hibernate-search","homepage":"http://search.hibernate.org","size":57767,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"hibernate:master","ref":"master","sha":"7007f94fa446415e68d8a1b19167b51464c7ef5d","user":{"login":"hibernate","id":348262,"avatar_url":"https://avatars.githubusercontent.com/u/348262?v=3","gravatar_id":"","url":"https://api.github.com/users/hibernate","html_url":"https://github.com/hibernate","followers_url":"https://api.github.com/users/hibernate/followers","following_url":"https://api.github.com/users/hibernate/following{/other_user}","gists_url":"https://api.github.com/users/hibernate/gists{/gist_id}","starred_url":"https://api.github.com/users/hibernate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hibernate/subscriptions","organizations_url":"https://api.github.com/users/hibernate/orgs","repos_url":"https://api.github.com/users/hibernate/repos","events_url":"https://api.github.com/users/hibernate/events{/privacy}","received_events_url":"https://api.github.com/users/hibernate/received_events","type":"Organization","site_admin":false},"repo":{"id":990281,"name":"hibernate-search","full_name":"hibernate/hibernate-search","owner":{"login":"hibernate","id":348262,"avatar_url":"https://avatars.githubusercontent.com/u/348262?v=3","gravatar_id":"","url":"https://api.github.com/users/hibernate","html_url":"https://github.com/hibernate","followers_url":"https://api.github.com/users/hibernate/followers","following_url":"https://api.github.com/users/hibernate/following{/other_user}","gists_url":"https://api.github.com/users/hibernate/gists{/gist_id}","starred_url":"https://api.github.com/users/hibernate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hibernate/subscriptions","organizations_url":"https://api.github.com/users/hibernate/orgs","repos_url":"https://api.github.com/users/hibernate/repos","events_url":"https://api.github.com/users/hibernate/events{/privacy}","received_events_url":"https://api.github.com/users/hibernate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hibernate/hibernate-search","description":"Hibernate Search: full-text search for domain model","fork":false,"url":"https://api.github.com/repos/hibernate/hibernate-search","forks_url":"https://api.github.com/repos/hibernate/hibernate-search/forks","keys_url":"https://api.github.com/repos/hibernate/hibernate-search/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hibernate/hibernate-search/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hibernate/hibernate-search/teams","hooks_url":"https://api.github.com/repos/hibernate/hibernate-search/hooks","issue_events_url":"https://api.github.com/repos/hibernate/hibernate-search/issues/events{/number}","events_url":"https://api.github.com/repos/hibernate/hibernate-search/events","assignees_url":"https://api.github.com/repos/hibernate/hibernate-search/assignees{/user}","branches_url":"https://api.github.com/repos/hibernate/hibernate-search/branches{/branch}","tags_url":"https://api.github.com/repos/hibernate/hibernate-search/tags","blobs_url":"https://api.github.com/repos/hibernate/hibernate-search/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hibernate/hibernate-search/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hibernate/hibernate-search/git/refs{/sha}","trees_url":"https://api.github.com/repos/hibernate/hibernate-search/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hibernate/hibernate-search/statuses/{sha}","languages_url":"https://api.github.com/repos/hibernate/hibernate-search/languages","stargazers_url":"https://api.github.com/repos/hibernate/hibernate-search/stargazers","contributors_url":"https://api.github.com/repos/hibernate/hibernate-search/contributors","subscribers_url":"https://api.github.com/repos/hibernate/hibernate-search/subscribers","subscription_url":"https://api.github.com/repos/hibernate/hibernate-search/subscription","commits_url":"https://api.github.com/repos/hibernate/hibernate-search/commits{/sha}","git_commits_url":"https://api.github.com/repos/hibernate/hibernate-search/git/commits{/sha}","comments_url":"https://api.github.com/repos/hibernate/hibernate-search/comments{/number}","issue_comment_url":"https://api.github.com/repos/hibernate/hibernate-search/issues/comments{/number}","contents_url":"https://api.github.com/repos/hibernate/hibernate-search/contents/{+path}","compare_url":"https://api.github.com/repos/hibernate/hibernate-search/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hibernate/hibernate-search/merges","archive_url":"https://api.github.com/repos/hibernate/hibernate-search/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hibernate/hibernate-search/downloads","issues_url":"https://api.github.com/repos/hibernate/hibernate-search/issues{/number}","pulls_url":"https://api.github.com/repos/hibernate/hibernate-search/pulls{/number}","milestones_url":"https://api.github.com/repos/hibernate/hibernate-search/milestones{/number}","notifications_url":"https://api.github.com/repos/hibernate/hibernate-search/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hibernate/hibernate-search/labels{/name}","releases_url":"https://api.github.com/repos/hibernate/hibernate-search/releases{/id}","created_at":"2010-10-15T15:55:09Z","updated_at":"2015-08-13T02:22:42Z","pushed_at":"2015-08-14T13:27:37Z","git_url":"git://github.com/hibernate/hibernate-search.git","ssh_url":"git@github.com:hibernate/hibernate-search.git","clone_url":"https://github.com/hibernate/hibernate-search.git","svn_url":"https://github.com/hibernate/hibernate-search","homepage":"http://search.hibernate.org","size":67631,"stargazers_count":148,"watchers_count":148,"language":"Java","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":107,"mirror_url":null,"open_issues_count":4,"forks":107,"open_issues":4,"watchers":148,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hibernate/hibernate-search/pulls/887"},"html":{"href":"https://github.com/hibernate/hibernate-search/pull/887"},"issue":{"href":"https://api.github.com/repos/hibernate/hibernate-search/issues/887"},"comments":{"href":"https://api.github.com/repos/hibernate/hibernate-search/issues/887/comments"},"review_comments":{"href":"https://api.github.com/repos/hibernate/hibernate-search/pulls/887/comments"},"review_comment":{"href":"https://api.github.com/repos/hibernate/hibernate-search/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hibernate/hibernate-search/pulls/887/commits"},"statuses":{"href":"https://api.github.com/repos/hibernate/hibernate-search/statuses/096d8841d9ff6ce8e44595a3bf724780347da25d"}}}}