Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Batch delete for items older than an expiration date.
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Miguel Ludert  
View profile  
 More options May 4 2012, 12:56 pm
From: Miguel Ludert <mig...@thinkingsitesinc.com>
Date: Fri, 4 May 2012 09:56:44 -0700 (PDT)
Local: Fri, May 4 2012 12:56 pm
Subject: Batch delete for items older than an expiration date.

I'm still working to get the hang of Lucene and am not sure how to
structure this query.

I'm trying to delete all items older than a certain date.  It seems I have
to do a range query, yes?  What format do I use for the dates?

            _Session.Advanced.DatabaseCommands.DeleteByIndex(
                typeof(AssetsByExpirationDate).Name,
                new IndexQuery()
                {
                    Query =
string.Format("ExpirationDate:[\"{0:MM/dd/yyyy}\" TO \"{1:MM/dd/yyyy}\"]",
DateTime.MinValue, new DateTime(2012,6,1))
                });

Any guidance on this topic would be appreciated.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.