# Changing Indexed file does not apply

**URL:** <https://discuss.elastic.co/t/changing-indexed-file-does-not-apply/61130>\
**Category:** Elasticsearch\
**Created:** [September 21, 2016, 12:36pm UTC](https://discuss.elastic.co/t/changing-indexed-file-does-not-apply/61130 "2016-09-21T12:36:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ilvalin](https://avatars.discourse-cdn.com/v4/letter/i/9f8e36/32.png) [@ilvalin](https://discuss.elastic.co/u/ilvalin)\
**Post date:** [September 21, 2016, 12:36pm UTC](https://discuss.elastic.co/t/changing-indexed-file-does-not-apply/61130/1 "2016-09-21T12:36:00Z")

</div>

Hello!  
First of all, I am Elasticsearch newbie. I am currently working on project which was developed by somebody else. I am developing this project on Laravel 4.2, and it uses Elasticsearch. Long story short, currently all search results are sorted by RULE A (file .../Searchers/Books). The rule itself is defined in .../Indexers/BookIndexer.

What is need is to add another RULE B. I added it by the same pattern - defined it in BookIndexer and mentioned right after RULE A.

```
return [
          'ruleA' => 'desc',
          'ruleB' => 'desc',
        ];

```

That turned into error with _mithril_:

> mithril.js:2106 Uncaught SyntaxError: Unexpected token \< in JSON at position 0

Tried

```
return [
          'ruleA' => 'desc',
        ];

```

but with changed RULE A query, and found out that Elasticsearch still indexes by the old RULE A, not the modified RULE A.

As far as I understand, one does not simply change indexes. They need to be reset or something like that?  
Of course, I did try googling it. All of the solutions used CURL.  
I do not know how Elastic search is usually used, but it me confused and I am not sure what to do.

Any help will be appreciated

---

<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:** [July 5, 2017, 10:18pm UTC](https://discuss.elastic.co/t/changing-indexed-file-does-not-apply/61130/3 "2017-07-05T22:18:18Z")

</div>

Closed on July 5, 2017, 10:18pm UTC


