# Custom index rules for Salesforce not updating the index

**URL:** <https://discuss.elastic.co/t/custom-index-rules-for-salesforce-not-updating-the-index/330377>\
**Category:** Elastic Search\
**Tags:** elastic-workplace-search\
**Created:** [April 20, 2023, 9:56am UTC](https://discuss.elastic.co/t/custom-index-rules-for-salesforce-not-updating-the-index/330377 "2023-04-20T09:56:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheNooby](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thenooby/32/120030_2.png) [@TheNooby](https://discuss.elastic.co/u/TheNooby)\
**Post date:** [April 20, 2023, 9:56am UTC](https://discuss.elastic.co/t/custom-index-rules-for-salesforce-not-updating-the-index/330377/1 "2023-04-20T09:56:00Z")

</div>

I have specified custom indexing rules for my Salesforce content source as such:

```auto
"include": "Product2",
 "filter_type": "object_type",
 "fields": [
      {
          "remote": "Name",
          "target": "title"
      }
 ]

```

Doing this as the first thing after creating the connection to the content source, succesfully adds all product2 items to the index with the _title_ field containing it's name.

When i try to update the index rules with the following, it doesn't actually update the index. This means the items in the index still contains the _title_ field, but none of the new fields.

```auto
"include": "Product2",
 "filter_type": "object_type",
 "fields": [
    {
        "remote": "Name",
        "target": "title"
    },
    {
        "remote": "Description",
        "target": "desc"
    },
    {
        "remote": "ProductCode",
        "target": "sku"
    },
    {
        "remote": "ImageURL__c",
        "target": "img_url"
    }
]
...
"schema": [
   ...
   "desc": "text",
   "sku": "text",
   "img_url: "text"
]

```

Updating the indexing rules seems to be inconsistent in general, as even if i exclude _Product2_ it doesn't remove the items from the index.

The problem doesn't seem to anything to do with ProductCode and Description, as I have been able to index them before.

I have tried:

- "product2" instead of "Product2"
- Removing the content source and connecting again
- Targeting fields already in the schema

---

<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 18, 2023, 9:56am UTC](https://discuss.elastic.co/t/custom-index-rules-for-salesforce-not-updating-the-index/330377/2 "2023-05-18T09:56:31Z")

</div>

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