# Duplicate Product in Search After PATCHing ID via AdminAPI

**URL:** <https://forum.litium.com/t/duplicate-product-in-search-after-patching-id-via-adminapi/3521>\
**Category:** Questions\
**Tags:** litium-8\
**Created:** [September 2, 2025, 12:47pm UTC](https://forum.litium.com/t/duplicate-product-in-search-after-patching-id-via-adminapi/3521 "2025-09-02T12:47:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Berg.Daniel](https://avatars.discourse-cdn.com/v4/letter/b/e5b9ba/32.png) [@Berg.Daniel](https://forum.litium.com/u/Berg.Daniel)\
**Post date:** [September 2, 2025, 12:47pm UTC](https://forum.litium.com/t/duplicate-product-in-search-after-patching-id-via-adminapi/3521/1 "2025-09-02T12:47:50Z")

</div>

We occasionally update a product’s ID via the AdminAPI using a PATCH request like this:

```auto
Example:
PATCH {basurl}/Litium/api/admin/products/variants/{systemId}
[
    {
        "op": "replace",
        "path": "id",
        "value": "1337"
    }
]

```

After we do this the product shows up twice in the search product search on the site.

Rebuilding product index removes the duplicate.

Is there a way to re-index just the affected product (or remove the duplicate from the index) programmatically?

Litium version: _8.22.2_

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [September 30, 2025, 12:48pm UTC](https://forum.litium.com/t/duplicate-product-in-search-after-patching-id-via-adminapi/3521/2 "2025-09-30T12:48:00Z")

</div>

Closed on September 30, 2025, 12:48pm UTC

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