Forum Discussion

cike's avatar
cike
Champion
9 years ago

Empty result list using date range on consversation.last_post_time

Hi,

 

im trying to filter my messages with the following query:

 

SELECT count(*) FROM messages WHERE depth = 0 AND conversation.style IN ('forum', 'group') AND tags.text MATCHES ('Zugangstechnik') AND conversation.last_post_time > 1454167508396 AND conversation.last_post_time < 1456845908396

The query should return all messages, where the last post time is within the last 30 days and today.

The count value is always 0, but the last post within this converstion was made on 2016-02-29.

 

If I remove the lower date range and send the query again, I get all messages until today.

 

SELECT count(*) FROM messages WHERE depth = 0 AND conversation.style IN ('forum', 'group') AND tags.text MATCHES ('Zugangstechnik') AND conversation.last_post_time < 1456845908396

 

For another use case I use a similiar query, but don't filter by a specific tag. This query also returns a correct result list

 

Could somebody help?

 

Thanks and kind regards,

Christian

  • Applying the topic message filter and-connected to the date time and tag filter works for me. I assume the problem in your community might be related to your tag-problem discussed in https://community.lithium.com/t5/Support-Forum/Error-using-LIQL-query-like-quot-tags-text-test-quot-or-quot/m-p/215814#M10315 ?

    But just to double check I understood your query correctly:
    You are looking for all topic starting messages, that were tagged with a certain tag. NB: The tag has to be applied to the topic starting message. The filter won't match if the tag was applied to a reply within that topic.
    • cike's avatar
      cike
      Champion

      Claudius You are right.

       

      The result list should only contain topic starting messages that were tagged with a certain tag. If I start a new topic and tag it with a certain tag, the filter will return this new topic. But if I reply to an existing topic (where the topic starting message is tagged) this topic is not returned by my query. The conversation.last_post_time is set correctly.