# Error searching with double quotes: IllegalStateException\[field "title" was indexed without position data; cannot run PhraseQuery

**URL:** <https://discuss.elastic.co/t/error-searching-with-double-quotes-illegalstateexception-field-title-was-indexed-without-position-data-cannot-run-phrasequery/175>\
**Category:** Elasticsearch\
**Created:** [May 5, 2015, 4:21am UTC](https://discuss.elastic.co/t/error-searching-with-double-quotes-illegalstateexception-field-title-was-indexed-without-position-data-cannot-run-phrasequery/175 "2015-05-05T04:21:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ponki\_d\_monkey](https://avatars.discourse-cdn.com/v4/letter/p/f04885/32.png) [@ponki\_d\_monkey](https://discuss.elastic.co/u/ponki_d_monkey)\
**Post date:** [May 5, 2015, 4:21am UTC](https://discuss.elastic.co/t/error-searching-with-double-quotes-illegalstateexception-field-title-was-indexed-without-position-data-cannot-run-phrasequery/175/1 "2015-05-05T04:21:44Z")

</div>

Hi,

I'm quite new to Elasticsearch. I'm trying to do an "exact match" search using double quotes and based on this article it is possible: [http://www.elastic.co/guide/en/elasticsearch/reference/1.x/query-dsl-query-string-query.html](http://www.elastic.co/guide/en/elasticsearch/reference/1.x/query-dsl-query-string-query.html)

However, I always get this error: **IllegalStateException[field "title" was indexed without position data; cannot run PhraseQuery**. It works fine with single quotes, but not double quotes.

How do I solve this issue?

Thanks!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 5, 2015, 5:02am UTC](https://discuss.elastic.co/t/error-searching-with-double-quotes-illegalstateexception-field-title-was-indexed-without-position-data-cannot-run-phrasequery/175/2 "2015-05-05T05:02:27Z")

</div>

What does your mapping look like?

---

<div class="post-metadata">

**Author:** ![ponki\_d\_monkey](https://avatars.discourse-cdn.com/v4/letter/p/f04885/32.png) [@ponki\_d\_monkey](https://discuss.elastic.co/u/ponki_d_monkey)\
**Post date:** [May 5, 2015, 6:01am UTC](https://discuss.elastic.co/t/error-searching-with-double-quotes-illegalstateexception-field-title-was-indexed-without-position-data-cannot-run-phrasequery/175/3 "2015-05-05T06:01:28Z")

</div>

It has a MultiField mapping:

```
{
  "assets" : {
    "mappings" : {
      "asset" : {
        "properties" : {
          "assetReference" : {
            "type" : "string",
            "fields" : {
              "assetReference.raw" : {
                "type" : "string",
                "index" : "not_analyzed"
              }
            }
          },
          "id" : {
            "type" : "string",
            "index" : "not_analyzed"
          },
          "location" : {
            "type" : "geo_point"
          },
          "modified" : {
            "type" : "date",
            "format" : "dateOptionalTime"
          },
          "modifiedBy" : {
            "type" : "string",
            "index" : "not_analyzed"
          },
          "title" : {
            "type" : "string",
            "fields" : {
              "title.raw" : {
                "type" : "string",
                "index" : "not_analyzed"
              }
            }
          }
        }
      }
    }
  }
}

```

I also tried without MultiFields, but I'm still getting the same error.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 5, 2015, 6:59am UTC](https://discuss.elastic.co/t/error-searching-with-double-quotes-illegalstateexception-field-title-was-indexed-without-position-data-cannot-run-phrasequery/175/4 "2015-05-05T06:59:10Z")

</div>

Is this the output of `GET /index/type/_mapping`?

If so, any chance you could reproduce this using a script?

---

<div class="post-metadata">

**Author:** ![ponki\_d\_monkey](https://avatars.discourse-cdn.com/v4/letter/p/f04885/32.png) [@ponki\_d\_monkey](https://discuss.elastic.co/u/ponki_d_monkey)\
**Post date:** [May 5, 2015, 7:19am UTC](https://discuss.elastic.co/t/error-searching-with-double-quotes-illegalstateexception-field-title-was-indexed-without-position-data-cannot-run-phrasequery/175/5 "2015-05-05T07:19:30Z")

</div>

Yes, that's the output of the \_mapping endpoint. Sorry, I'm not exactly sure what type of script you are looking for. And, I'm not sure how to convert that into a script. Is there a different information I can give you?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 5, 2015, 8:01am UTC](https://discuss.elastic.co/t/error-searching-with-double-quotes-illegalstateexception-field-title-was-indexed-without-position-data-cannot-run-phrasequery/175/6 "2015-05-05T08:01:36Z")

</div>

Something we can reproduce easily. Like:

```auto
DELETE index
PUT index/type/1
{
  "foo": "bar"
}
GET index/type/_search
{
  "query": {
    "match": {
      "foo": "bar"
    }
  }
}

```

---

<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 6, 2017, 12:15am UTC](https://discuss.elastic.co/t/error-searching-with-double-quotes-illegalstateexception-field-title-was-indexed-without-position-data-cannot-run-phrasequery/175/7 "2017-07-06T00:15:44Z")

</div>


