Analyze array of strings and not just one string

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Analyze array of strings and not just one string

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);

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!


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 [hidden email].
To view this discussion on the web visit
For more options, visit