Forum Discussion

fuenteso's avatar
fuenteso
Leader
9 years ago

Getting results that don't meet the constraints

Hi!

 

I'm working on a semi-automated archiving component, and for this, I need to get posts older than X amount of time. I'm using API v2.0 but the results I'm getting have some posts out of the time range I established on the query.

 

For example, if I use this: 

SELECT id, conversation.last_post_time, post_time from messages WHERE conversation.last_post_time >= 2014-08-01T22:29:11-07:00 AND conversation.last_post_time < 2015-07-01T22:29:11-07:00 AND depth = 0 ORDER BY conversation.last_post_time DESC

 

I get this:

 

Am I missing something? The weird thing is that I'm always getting between 2 and 8 results like this on each query regardless of the time range I use, the rest of the results are correct.

 

I know I can fix this glitch by validating the dates on each result item before doing any archiving, but it bothers me that the API is returning results that do not meet the constraints on the query. Are there other things affecting the results?

 

I'm not using time ranges greater than a year because I read it could degrade the accuracy of the results.

 

Any ideas?

 

Thanks!

 

    • Wendy_S's avatar
      Wendy_S
      Boss

      Maybe ClaudiusH could share some wisdom..or pull someone else in now that he is a you know....Li guy ;-)

      • PaoloT's avatar
        PaoloT
        Lithium Alumni (Retired)

        Hi fuenteso

         

        by the looks of it - it might be a bug. Have you raised it with our support department?

         

        Thanks,