Tag Archives: elk

[Solved] C# Access Mongodb Database Error: command find failed: Command find requires authentication

The error reports are as follows:

error reason analysis:
literally means that the user name and password authentication are missing, so the database cannot be accessed
solution steps:
1 Add the user name and password to the configuration file connecting to mogondb

run the program again

over

ES Error: Alternatively, set fielddata=true on [How to Solve]

Es reports an error when executing aggregate query: alternately, set fielddata = true on

GET /megacorp/employee/_search
{
  "aggs": {
    "all_interests": {
      "terms": { "field": "interests" }
    }
  }
}

Execute the following command to start fielddata

PUT /your_index_name/_mapping?pretty
{
  "properties": {
    "your_field_name": { 
      "type": "text",
      "fielddata": true
    }
  }
}