title: Diacritic insensitive search on LoopbackJS
body: <p>This question refers to: <a href="https://stackoverflow.com/questions/33480431/diacritic-case-insensitive-search-loopback">Diacritic Case-Insensitive search Loopback</a></p>
  
  <p>I tried to add the following indexes - <code>firstname</code> and <code>lastname</code> of my <code>NsUser</code> model like @Markus_W_Mahlberg suggested - the loopback way.</p>
  
  <pre><code>    {
        "name": "NsUser",
        "base": "User",
        "idInjection": true,
        "options": {
          "validateUpsert": true
        },
        "indexes": {
          "firstname": "text" ,
          "lastname": "text"
        },
        "properties": {
          "firstname": {
            "type": "string"
          },
         "lastname": {
            "type": "string"
          }
         …
       }
       …
      }
  </code></pre>
  
  <p>I also use an auto-update script in my server.js to make sure indexes are working like suggested here: <a href="https://github.com/strongloop/loopback-connector-mongodb/issues/103" rel="nofollow noreferrer">https://github.com/strongloop/loopback-connector-mongodb/issues/103</a></p>
  
  <p>My MongoDB shell version is: 3.2.3</p>
  
  <p>Still it is not working. Any ideas?</p>
  
  <p><strong>EDIT:</strong>
  To answer to Pawan -
  When I display my Indexes in Mongo using:</p>
  
  <pre><code>&gt; db.NsUser.getIndexes()
  [
      {
          "v" : 1,
          "key" : {
              "_id" : 1
          },
          "name" : "_id_",
          "ns" : "needsporty_DB.NsUser"
      },
      {
          "v" : 1,
          "key" : {
              "text" : 1
          },
          "name" : "firstname",
          "ns" : "needsporty_DB.NsUser"
      },
      {
          "v" : 1,
          "key" : {
              "_fts" : "text",
              "_ftsx" : 1
          },
          "name" : "diatrics_insensitive_keys",
          "ns" : "needsporty_DB.NsUser",
          "weights" : {
              "firstname" : 1,
              "lastname" : 1
          },
          "default_language" : "english",
          "language_override" : "language",
          "textIndexVersion" : 3
      }
  ]
  </code></pre>