title: OpenSearch Query Not Matching
body: <p>I am trying to create a query that matches based off a file extension that is part of a key.</p>
  <p>I know the following record exists in OpenSearch:</p>
  <pre><code>{
    '_index': 'the_index',
    '_type': 'some_type',
    '_id': 'id',
    '_score': 1,
    '_routing': 'routing',
    '_parent': 'parent',
    '_source': {
      'files': [
        {
          'bucket': 'a_bucket',
          'fileName': 'a_file_name.dat.gz',
          'size': 9001,
          'source': 's3://a_bucket/some_path/a_file_name.dat.gz',
          'key': 'some_path/a_file_name.dat.gz'
        },
        {
          'bucket': 'b_bucket',
          'fileName': 'a_file_name.dat.gz.ext.json',
          'size': 9001,
          'source': 's3://b_bucket/some_path/a_file_name.dat.gz.ext.json',
          'type': 'metadata',
          'key': 'some_path/a_file_name.dat.gz.ext.json'
        }
      ],
      'collectionId': 'collectionId',
      'status': 'completed',
      'timestamp': 1,
      'updatedAt': 1
    }
  }
  </code></pre>
  <p>I can search files.key:</p>
  <pre><code>{
    &quot;query&quot;: {
      &quot;bool&quot;: {
        &quot;should&quot;: [
          {
            &quot;match_phrase&quot;: {
              &quot;files.key&quot;: {
                &quot;query&quot;: &quot;some_path/a_file_name.dat.gz.ext.json&quot;
              }
            }
          }
        ]
      }
    }
  }
  </code></pre>
  <p>and it works correctly. If I remove any characters from the front it no longer returns results. So I tried a regex query:</p>
  <pre><code>{
    &quot;query&quot;: {
      &quot;regexp&quot;: {
        &quot;files.key&quot;: &quot;.*.ext.json&quot;
      }
    }
  }
  </code></pre>
  <p>Also returns no results.</p>
  <p>What am I missing here? Some files.key values will start with s3://bucketname and some will end with ext.json and I need to find all of these records.</p>