Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-3409

Add support for the Instant type in backends and use it to provide support for java.util.Date

    Details

      Description

      Essentially only expose support for Instant from backends, and use bridges in the mapper to add support for Date.

      See conversation on hipchat:

      [12:26 PM] Yoann Rodière: What I was suggesting yesterday was, we could take advantage of that and, for Dates, use a bridge that converts them to an Instant. That would spare us all the (rather verbose) task of implementing support for Date in the backend, and we will have to implement support for Instant at some point anyway.
      [12:28 PM] Yoann Rodière: essentially it works like that: entity ---[mapper]---> property value ----[bridge]---> value to index ----[indexManager]---> backend-specific value (Json or Lucene Field)
      Yes. Instead of this:
      
      entity ---[mapper]---> Date ----[bridge]---> Date ----[indexManager]---> backend-specific value (Json or Lucene Field)
      entity ---[mapper]---> Instant ----[bridge]---> Instant ----[indexManager]---> backend-specific value (Json or Lucene Field)
      
      We will have this:
      
      entity ---[mapper]---> Date ----[bridge]---> Instant ----[indexManager]---> backend-specific value (Json or Lucene Field)
      entity ---[mapper]---> Instant ----[bridge]---> Instant ----[indexManager]---> backend-specific value (Json or Lucene Field)
      

        Attachments

          Activity

            People

            • Assignee:
              yrodiere Yoann Rodière
              Reporter:
              yrodiere Yoann Rodière
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: