# Collapse with point in time feature

**URL:** <https://discuss.elastic.co/t/collapse-with-point-in-time-feature/301535>\
**Category:** Elasticsearch\
**Tags:** point-in-time\
**Created:** [April 4, 2022, 3:24pm UTC](https://discuss.elastic.co/t/collapse-with-point-in-time-feature/301535 "2022-04-04T15:24:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nabhan\_karmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nabhan_karmi/32/103922_2.png) [@nabhan\_karmi](https://discuss.elastic.co/u/nabhan_karmi)\
**Post date:** [April 4, 2022, 3:24pm UTC](https://discuss.elastic.co/t/collapse-with-point-in-time-feature/301535/1 "2022-04-04T15:24:22Z")

</div>

I'm trying to use the collapse feature with the point in time, I successfully make the two features run together as per documentation, but the problem is with the result, in my case I have 3 documents has the same value for a specific field but each document has a different date for example:  
`doc1: { shared_key: "A1", doc_date: "2022-04-04" } doc2: { shared_key: "A1", doc_date: "2022-04-03" } doc3: { shared_key: "A1", doc_date: "2022-04-02" }`

When I run collapse with pagination using point in time I got doc3 which has old date, even when I used function\_score to raise the score for the latest document, it doesn't make any difference.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [April 7, 2022, 7:35am UTC](https://discuss.elastic.co/t/collapse-with-point-in-time-feature/301535/2 "2022-04-07T07:35:17Z")

</div>

Hey,

would it be possible to provide **full but minimal example** , that others can use to reproduce the issue in Kibana Dev Tools?

Also the Elasticsearch version you are using would help a lot!

Thanks!

--Alex

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 5, 2022, 7:35am UTC](https://discuss.elastic.co/t/collapse-with-point-in-time-feature/301535/3 "2022-05-05T07:35:18Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
