Skip to content

Commit

Permalink
Fix index, was messed up
Browse files Browse the repository at this point in the history
  • Loading branch information
khalidabuhakmeh committed Sep 14, 2019
1 parent 3c5c3a8 commit b4dbf55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Models/Elasticsearch/CapitalSearchDocument.cs
Expand Up @@ -57,7 +57,7 @@ public CapitalSearchDocument(CapitalCityRecord record)
[Keyword]
public string City { get; set; }

[Object(Store = true, Enabled = false)]
[Object(Enabled = false)]
public CapitalCityRecord Data { get; set; }

// store location
Expand Down
3 changes: 2 additions & 1 deletion Pages/Index.cshtml.cs
Expand Up @@ -32,9 +32,10 @@ public void OnGet()
Search =
client.Search<CapitalSearchDocument>(s =>
s.Query(q => q
.MatchPhrasePrefix(m => m
.Match(m => m
.Field(f => f.Names)
.Query(Term)
.Fuzziness(Fuzziness.EditDistance(1))
)
)
.Take(10)
Expand Down

0 comments on commit b4dbf55

Please sign in to comment.