# Analyze array of strings and not just one string

**URL:** <https://discuss.elastic.co/t/analyze-array-of-strings-and-not-just-one-string/21492>\
**Category:** Elasticsearch\
**Created:** [January 5, 2015, 10:24pm UTC](https://discuss.elastic.co/t/analyze-array-of-strings-and-not-just-one-string/21492 "2015-01-05T22:24:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brian\_yoder](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@brian\_yoder](https://discuss.elastic.co/u/brian_yoder)\
**Post date:** [January 5, 2015, 10:24pm UTC](https://discuss.elastic.co/t/analyze-array-of-strings-and-not-just-one-string/21492/1 "2015-01-05T22:24:27Z")

</div>

I have a library (and also a test driver that uses it) that lets me explore  
the analysis of a text string and the tokens that are generated. The code  
excerpts are roughly:

static private IndicesAdminClient indicesClient = client.admin().indices();

AnalyzeRequestBuilder arb = indicesClient.prepareAnalyze(_textValue_);  
arb.setIndex(indexName);  
arb.setField(fieldName);

AnalyzeResponse response = arb.execute().actionGet();  
for (AnalyzeResponse.AnalyzeToken token : response.getTokens())  
{  
... // Show each token that is generated  
}

My question is: Can the IndicesAdminClient.prepareAnalyze() method be  
updated to accept an array of strings, as is the case with fields that  
contain an array of two or more values? Or is this logic embedded within  
the ES engine itself and not contained within, nor able to be exposed by,  
the IndicesAdminClient?

I ask because it would be helpful to be able to see the word position of  
each token exactly as it would be generated by ES when a document is  
indexed, and this would include the adjusted word positions based on the  
position offset gap, but as actually calculated by ES and not as guessed by  
me.

Thanks in advance!

Brian

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/54fa5558-bde3-48ac-961b-41107355a6f8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/54fa5558-bde3-48ac-961b-41107355a6f8%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:40am UTC](https://discuss.elastic.co/t/analyze-array-of-strings-and-not-just-one-string/21492/2 "2017-07-06T00:40:42Z")

</div>

Closed on July 6, 2017, 12:40am UTC


