Announcement Announcement Module
Collapse
No announcement yet.
Creating TTL collection in mongodb Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating TTL collection in mongodb

    Hi,

    I am trying to create a TTL based collection, intoduced in version 2.2, of MongoDB. I am using version version 1.0.1.RELEASE version of spring-data-mongodb. The mongo docs suggest that I have to specify "expireAfterSeconds" option to the ensureIndex. I have explored the @Indexed annotation as well as looking at the MongoTemplate.indexOps(Domain.class).ensureIndex() method, but can't find any support. Is there any alternative to make use of the TTL collection? Is there a version of spring-data-mongodb which supports this?

    Kind Regards,

  • #2
    Have you had a look when the latest version of Spring Data MongoDB was released and when MongoDB was released? Non of the new features in Mongo 2.2.0 are supported yet. Feel free to open a ticket if you think there's something that should be added.

    Comment


    • #3
      Originally posted by Oliver Gierke View Post
      Have you had a look when the latest version of Spring Data MongoDB was released and when MongoDB was released? Non of the new features in Mongo 2.2.0 are supported yet. Feel free to open a ticket if you think there's something that should be added.
      Hi Oliver,

      Thanks for coming back.

      Yes, the last version which is 1.0.2.GA was released about mid June, if I am not wrong. The latest version of mongoDB was released a week back. I do understand that the latest features are not supported out of the box, but was wondering if there was any way to pass the information to the underlying Mongo instance to be able to use the new features? Also wanted to know if any there are any plans to support them and if so when can it be expected? Is there a specific process to raise the ticket?

      Kind Regards,

      Comment


      • #4
        The last version was 1.0.4.RELEASE about a week ago. The JIRA is at jira.springsource.org. We're pretty much constrained by what the driver offers. So if that does not expose ne functionality yet, we cannot do anything about it.

        Comment


        • #5
          Originally posted by Oliver Gierke View Post
          The last version was 1.0.4.RELEASE about a week ago. The JIRA is at jira.springsource.org. We're pretty much constrained by what the driver offers. So if that does not expose ne functionality yet, we cannot do anything about it.

          Thanks Oliver.

          I checked with the mongodb team, apparently the driver does support this, I am trying the solution currently, will update with the result. if the solution does work, would be better if we can support it via the Indexed annotation.

          Comment


          • #6
            Cool, feel free to open a ticket to propose the new feature alongside your findings.

            Comment


            • #7
              Originally posted by Oliver Gierke View Post
              Cool, feel free to open a ticket to propose the new feature alongside your findings.
              have raised jira DATAMONGO-544 for the same. Kindly let me know if I need to add anything to it?

              Comment

              Working...
              X