title: Maximum number of fields support to be included in _source.includes in Elastic search for _search api?
body: <p>While querying an index with more than 1500 fields included inside _source.includes, I'm getting following error from ES.</p>
  <p><strong>Error Log:</strong></p>
  <pre><code>{
    &quot;took&quot;: 154,
    &quot;timed_out&quot;: false,
    &quot;_shards&quot;: {
      &quot;total&quot;: 28,
      &quot;successful&quot;: 15,
      &quot;skipped&quot;: 0,
      &quot;failed&quot;: 13,
      &quot;failures&quot;: [
        {
          &quot;shard&quot;: 0,
          &quot;index&quot;: &quot;index123&quot;,
          &quot;node&quot;: &quot;...&quot;,
          &quot;reason&quot;: {
            &quot;type&quot;: &quot;too_complex_to_determinize_exception&quot;,
            &quot;reason&quot;: &quot;too_complex_to_determinize_exception: Determinizing automaton with 52903 states and 54499 transitions would result in more than 10000 states.&quot;
          }
        }
      ]
    },....
  </code></pre>
  <p>Here is the sample query I'm trying to execute.</p>
  <p><strong>Query Sample:</strong></p>
  <pre><code>{
      &quot;explain&quot;: false,
      &quot;size&quot;: 20,
      &quot;query&quot;: {
          &quot;bool&quot;: {
              &quot;filter&quot;: [
                  {
                      &quot;bool&quot;: {
                          &quot;adjust_pure_negative&quot;: true,
                          &quot;must&quot;: [
                              {
                                  &quot;terms&quot;: {
                                      &quot;boost&quot;: 1,
                                      &quot;type&quot;: [
                                          &quot;University&quot;
                                      ]
                                  }
                              }
                          ],
                          &quot;boost&quot;: 1
                      }
                  }
              ],
              &quot;adjust_pure_negative&quot;: true,
              &quot;boost&quot;: 1
          }
      },
      &quot;from&quot;: 0,
      &quot;_source&quot;: {
          &quot;excludes&quot;: [
              
          ],
          &quot;includes&quot;: [
              --1579 fields included --
          ]
      }
      
  }
  </code></pre>
  <p><strong>Note</strong>: When tried lowering number of fields to around 1440 inside <em>_source.includes</em>, ES was able to give response with no error.</p>
  <p>I was wondering if there is any hard limit on number fields that can be added inside _source or any config settings to increase that limit.</p>
  <p>It would also be helpful, if there's any alternative to get such high number fields to be included and returned from ES.</p>
  <p>Thanks in advance!</p>