Not able to search in attached content using Nest c# client

Hi, I have the an issue that I cannot search from the attached document using NEST client
My mapping is

 {
   "mydocs": {
 "mappings": {
 "indexdocument": {
    "properties": {
       "docLocation": {
          "type": "string",
          "index": "not_analyzed",
          "store": true
       },
       "documentType": {
          "type": "string",
          "store": true
       },
       "file": {
          "type": "attachment",
          "fields": {
             "content": {
                "type": "string",
               "term_vector": "with_positions_offsets",
                "analyzer": "full"
             },
             "author": {
                "type": "string"
             },
             "title": {
                "type": "string",
                "term_vector": "with_positions_offsets",
                "analyzer": "full"
             },
             "name": {
                "type": "string"
             },
             "date": {
                "type": "date",
                "format": "strict_date_optional_time||epoch_millis"
             },
             "keywords": {
                "type": "string"
             },
             "content_type": {
                "type": "string"
             },
             "content_length": {
                "type": "integer"
             },
             "language": {
                "type": "string"
             }
          }
       },
       "filePermissionInfo": {
          "properties": {
             "accessControlType": {
                "type": "string",
                "store": true
             },
             "accountValue": {
                "type": "string",
                "store": true
             },
             "fileSystemRights": {
                "type": "string",
                "store": true
             },
             "isInherited": {
                "type": "string",
                "store": true
             }
          }
       },
       "id": {
          "type": "double",
          "store": true
       },
       "lastModifiedDate": {
          "type": "date",
          "store": true,
          "format": "strict_date_optional_time||epoch_millis"
       },
       "otherDetails": {
          "type": "string"
       },
       "title": {
          "type": "string",
          "store": true,
          "term_vector": "with_positions_offsets"
       }
    }
 }
}
 }
}

My Post query is working fine

POST /mydocs/_search
{
"query" : {
"bool" : {
    "must" : [
       
        { "match" : { "filePermissionInfo.accountValue" : "S-1-5-18"}} ,
       { "match":{"otherDetails":"xyz"}},
        { "match":{"file.content":"abc"}}              
       
    ]
}
}
}

But when I convert it to C#, Its not working. If I remove the ' m.Match(mt1 => mt1.Field(f1 => f1.File.Content).Query(queryTerm))' from the Nest query , it returns a resultset. So I think the problem is with the attachment field. It is base64 encoded

 var queryResult = client.Search<IndexDocument>(s => s
                        .Index("mydocs")
                        .Query(q => q
                        .Bool(b => b
                        .Must(m =>
                             m.Match(mt1 => mt1.Field(f1 => f1.DocumentType).Query(queryTerm)) &&
                             m.Match(mt2 => mt2.Field(f2 => f2.FilePermissionInfo.First().AccountValue).Query(accountName)) &&
                             m.Match(mt3 => mt3.Field(f3 => f3.OtherDetails).Query(other))
                         ))) );

Anyone please help.

Moved to #development list.

What's the value of queryResult.IsValid? That will tell you whether the query was properly parsed and executed by Elasticsearch.

You can also poke around the properties on queryResult to find the json payload generated from your client.Search request.

queryResult.IsValid is true

What does the request JSON look like? I can't remember where it's stored off the top of my head, but if you expand that base class you've got highlighted in the screenshot it should be somewhere in there.

I cannot find any JSON in the base class.I searched in most of the nodes under base.
But in DebugInformation

 Successful low level call on POST: /mydocs/indexdocument/_search
# Audit trail of this API call:
 - HealthyResponse: Node: http://es_admin:Test1234@localhost:9200/ Took: 00:00:01.7965481
# Request:
<Request stream not captured or already read to completion by serializer. Set       DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.>
# Response:

<Response stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.>

Will it make any sense.?

So it's saying that your request isn't malformed, so it's probably not generating the json you'd expect.

Try following that recommendation to disable direct streaming and see if it turns up then.