title: Call search_analyzer on text using elasticsearch java api
body: <p>I have the same question as this post but with one difference.  I need to analyze text using the elasticsearch api, but calling the <strong>search_analyzer</strong> for the field.</p>
  
  <p>(previous answer) <a href="https://stackoverflow.com/questions/35040625/how-to-analyze-text-in-elasticsearch-using-java-api">how to analyze text in elasticsearch using java api?</a></p>
  
  <p>The field that I care about has both an analyzer and a custom analyzer.  Like so:</p>
  
  <blockquote>
  <pre><code>       "body": {
            "type": "string",
            "fields": {"exact":{"type":"string"}},
           "analyzer" : "customfullTextUAX",
           "search_analyzer" : "customfullText"
         }
  </code></pre>
    
    <p>...</p>
  </blockquote>
  
  <p>The code i have been calling to analyze it uses the analyzer, and i cannot figure out any setting which would call the search_analyzer.</p>
  
  <p>Code I used:</p>
  
  <pre><code>AnalyzeRequest ac = new AnalyzeRequest(index).field(field).text(text).explain(true);
  DetailAnalyzeResponse dar = iac.analyze(ac).actionGet().detail();
  </code></pre>