# Does Point-in-time (PIT) API available in OpenSearch 1.3.x?

**URL:** <https://forum.opensearch.org/t/does-point-in-time-pit-api-available-in-opensearch-1-3-x/14394>\
**Category:** OpenSearch\
**Tags:** discuss\
**Created:** [May 18, 2023, 10:23am UTC](https://forum.opensearch.org/t/does-point-in-time-pit-api-available-in-opensearch-1-3-x/14394 "2023-05-18T10:23:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrMigles](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/mrmigles/32/5359_2.png) [@mrMigles](https://forum.opensearch.org/u/mrMigles)\
**Post date:** [May 18, 2023, 10:23am UTC](https://forum.opensearch.org/t/does-point-in-time-pit-api-available-in-opensearch-1-3-x/14394/1 "2023-05-18T10:23:20Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser):  
OpenSearch 1.3.x

**Describe the issue** :

The guide [Point in Time API - OpenSearch documentation](https://opensearch.org/docs/1.3/search-plugins/point-in-time-api/) says that OpenSearch 1.3.x has API for PIT, but release notes says - no, it available start from 2.4.0.

Is it documentation bug? Or 1.3 really has PIT feature.

**Configuration** :

**Relevant Logs or Screenshots** :

---

<div class="post-metadata">

**Author:** ![gaobinlong](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gaobinlong/32/5242_2.png) [@gaobinlong](https://forum.opensearch.org/u/gaobinlong)\
**Post date:** [June 2, 2023, 2:42am UTC](https://forum.opensearch.org/t/does-point-in-time-pit-api-available-in-opensearch-1-3-x/14394/2 "2023-06-02T02:42:50Z")

</div>

It’s a documentation bug, PIT is not available in 1.3.

---

<div class="post-metadata">

**Author:** ![bing](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@bing](https://forum.opensearch.org/u/bing)\
**Post date:** [March 29, 2024, 10:13am UTC](https://forum.opensearch.org/t/does-point-in-time-pit-api-available-in-opensearch-1-3-x/14394/3 "2024-03-29T10:13:36Z")

</div>

hello gaobinlong，from the elasticsearch 7.10.x documentation, we see that pit and search after are used together.

You can see the use of search after in the opensearch 1.3 document. The pit function was released in 2.4. Is it possible to use the search after function normally in opensearch 1.3 according to the document?Or is this also a documentation bug?

---

<div class="post-metadata">

**Author:** ![gaobinlong](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gaobinlong/32/5242_2.png) [@gaobinlong](https://forum.opensearch.org/u/gaobinlong)\
**Post date:** [March 30, 2024, 10:50am UTC](https://forum.opensearch.org/t/does-point-in-time-pit-api-available-in-opensearch-1-3-x/14394/4 "2024-03-30T10:50:21Z")

</div>

Search after can be used in all versions of OpenSearch because it was inherited from es 7.10, you see es’s 7.10 documentation contains PIT, that’s because PIT was a x-pack feature in es so OpenSearch didn’t have it in 1.x and re-implemented and released the feature in 2.4.

---

<div class="post-metadata">

**Author:** ![bing](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@bing](https://forum.opensearch.org/u/bing)\
**Post date:** [April 1, 2024, 1:03am UTC](https://forum.opensearch.org/t/does-point-in-time-pit-api-available-in-opensearch-1-3-x/14394/5 "2024-04-01T01:03:56Z")

</div>

Thank you for your reply. I would like to ask another question. I saw in the documentation of es 7.10.x about the role of pit.

“If a refresh occurs between these requests, the order of your results may change, causing inconsistent results across pages. To prevent this, you can create a point in time (PIT) to preserve the current index state over your searches.”

> **[Paginate search results | Elasticsearch Guide \[7.10\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.10/paginate-search-results.html#search-after)**

If I use search after in an opensearch 1.3 production environment, but without the pit function, will there be the above problem, or can I use search after in production?

---

<div class="post-metadata">

**Author:** ![gaobinlong](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gaobinlong/32/5242_2.png) [@gaobinlong](https://forum.opensearch.org/u/gaobinlong)\
**Post date:** [April 1, 2024, 2:22am UTC](https://forum.opensearch.org/t/does-point-in-time-pit-api-available-in-opensearch-1-3-x/14394/6 "2024-04-01T02:22:23Z")

</div>

Yeah, using search after without pit will have that problem, but if the unstable search results are acceptable or you are sure that there will be no change in the index(no index and update operation), you can use search after in production, the performance is better than scroll and resource consumption is lower than scroll.

---

<div class="post-metadata">

**Author:** ![bing](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@bing](https://forum.opensearch.org/u/bing)\
**Post date:** [April 2, 2024, 2:06am UTC](https://forum.opensearch.org/t/does-point-in-time-pit-api-available-in-opensearch-1-3-x/14394/7 "2024-04-02T02:06:47Z")

</div>

There is another question, I plan to use opensearch 1.3 search\_after in the production environment, the dsl statement is as follows, @timestamp is the data time, \_id is the index unique identifier.

```auto
GET my-test/_search
{
   "size": 3,
   "query": {
     "match_all": {}
   },
   "sort": [
     {
       "@timestamp": "desc"
     },
     {
       "_id": "desc"
     }
   ],
   "search_after": [
     1712020085226,
     "my_test_raw+0+123126514"
   ]
}

```

I’m a little confused now about this usage:

1. Is it possible not to use tie\_breaker\_id
2. Whether \_id can be used as tie\_breaker\_id？Because I saw in the documentation that it is not recommended to use \_id as tiebreak in versions before es 7.10.x. I didn’t see it in es 7.10.x. Is it possible to use \_id as tiebreak?

---

<div class="post-metadata">

**Author:** ![gaobinlong](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gaobinlong/32/5242_2.png) [@gaobinlong](https://forum.opensearch.org/u/gaobinlong)\
**Post date:** [April 2, 2024, 5:30am UTC](https://forum.opensearch.org/t/does-point-in-time-pit-api-available-in-opensearch-1-3-x/14394/8 "2024-04-02T05:30:53Z")

</div>

1. If you are sure that the field `@timestamp` in different documents are also different, then a tiebreaker field is not required, if not, it’s better to include a tiebreaker field in the `sort` to avoid unexpected results.
2. `_id` is still not recommended to be used for sorting because of too much memory consumption, you can choose another field which contain a unique value for each document to be a tiebreaker field.

---

<div class="post-metadata">

**Author:** ![bing](https://avatars.discourse-cdn.com/v4/letter/b/839c29/32.png) [@bing](https://forum.opensearch.org/u/bing)\
**Post date:** [April 2, 2024, 5:36am UTC](https://forum.opensearch.org/t/does-point-in-time-pit-api-available-in-opensearch-1-3-x/14394/9 "2024-04-02T05:36:38Z")

</div>

Thank you very much for your patient reply.
