# Span\_first and array of strings

**URL:** <https://discuss.elastic.co/t/span-first-and-array-of-strings/50580>\
**Category:** Elasticsearch\
**Created:** [May 20, 2016, 4:03pm UTC](https://discuss.elastic.co/t/span-first-and-array-of-strings/50580 "2016-05-20T16:03:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcuelenaere](https://avatars.discourse-cdn.com/v4/letter/m/d78d45/32.png) [@mcuelenaere](https://discuss.elastic.co/u/mcuelenaere)\
**Post date:** [May 20, 2016, 4:03pm UTC](https://discuss.elastic.co/t/span-first-and-array-of-strings/50580/1 "2016-05-20T16:03:40Z")

</div>

Hi,

I have an array of strings to which I'd like to apply the span\_first query. Unfortunately, due to [position\_increment\_gap](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/position-increment-gap.html) this seems to be quite hard to accomplish. Is there an alternative way to do this?

An example can be found at [https://www.found.no/play/gist/5f69f3eea73502a78d407764f7dbb23b](https://www.found.no/play/gist/5f69f3eea73502a78d407764f7dbb23b)

---

<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:50pm UTC](https://discuss.elastic.co/t/span-first-and-array-of-strings/50580/2 "2017-07-05T22:50:06Z")

</div>

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


