title: Problems with Full Text Search in Postgresql & .Net Core 2.1
body: <p>I post this question because I dont found similar issue yet. I'm trying to ensure Full Text Search in .net core app, and according to <a href="http://www.npgsql.org/efcore/mapping/full-text-search.html" rel="nofollow noreferrer">npgsql</a> documentation I have:
  1) Model</p>
  
  <pre><code> public class User
      {
          public int Id { get; set; }
          public string Name { get; set; }
          public string Surname { get; set; }
          public long License { get; set; }
          public NpgsqlTsVector SearchVector { get; set; }
      }
  </code></pre>
  
  <p>2) DatabaseContext:</p>
  
  <pre><code>  modelBuilder.Entity&lt;User&gt;()
         .HasIndex(p =&gt; p.SearchVector)
         .ForNpgsqlHasMethod("GIN");
  </code></pre>
  
  <p>3) Migrations:</p>
  
  <pre><code> migrationBuilder.Sql(
              @"CREATE TRIGGER user_search_vector_update BEFORE INSERT OR UPDATE 
              ON ""Users"" FOR EACH ROW EXECUTE PROCEDURE
              ts`enter code here`vector_update_trigger(""SearchVector"", 'pg_catalog.english', ""Name"", ""Surname"");");
  </code></pre>
  
  <p>Now, I'm trying use FTS in my app, where method Search gets from header 'phase' (string).</p>
  
  <pre><code>[HttpGet]
      public async Task&lt;IActionResult&gt; Search([FromHeader] string phase)
      {
          NpgsqlTsQuery tsVestor = EF.Functions.ToTsQuery("english", phase);
          var response = Ok(_context.Users.Where(c =&gt; c.SearchVector.Matches(phase)).ToList());
          return response;
      }
  </code></pre>
  
  <p>I got:</p>
  
  <p>NotSupportedException: Specified method is not supported.
  Microsoft.EntityFrameworkCore.NpgsqlFullTextSearchDbFunctionsExtensions.ToTsQuery(DbFunctions _, string config, string query) in NpgsqlFullTextSearchDbFunctionsExtensions.cs</p>
  
  <p>I also tried send by Header lexeme and comment line:</p>
  
  <pre><code>NpgsqlTsQuery tsVestor = EF.Functions.ToTsQuery("english", phase);
  </code></pre>
  
  <p>but i got: PostgresException: 42883: operator does not exist: tsvector @@ text</p>
  
  <p>Does anyone have any idea what I'm doing wrong?</p>
  
  <p>EDIT ---- :</p>
  
  <p>Ok, I found answer on my question. Converting from string to NpgsqlTsQuery must be inside Matches method:</p>
  
  <pre><code> public async Task&lt;IActionResult&gt; SearchUsers([FromHeader] string phase)
      {
          return Ok(_context.Users.Where(c =&gt; c.SearchVector.Matches(EF.Functions.ToTsQuery(phase))));
      }
  </code></pre>
  
  <p>Placing this convertion outside Matches method threw "NotSupportedException", and putting plain text as function argument threw 42883 Exeception.</p>
  
  <p>Now, it's clear what I was doing wrong.</p>