Last active
August 29, 2015 14:17
-
-
Save gbellmann/d36babea303f2775a483 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void CreateIndex(SearchServiceClient searchServiceClient) | |
{ | |
var index = new Index | |
{ | |
Name = "peliculas", | |
Fields = new [] | |
{ | |
new Field("peliculaId", DataType.String) { IsKey = true }, | |
new Field("titulo", DataType.String) { IsSearchable = true, IsFilterable = true }, | |
new Field("director", DataType.String) { IsSearchable = true, IsFilterable = true, IsFacetable = true }, | |
new Field("actores", DataType.Collection(DataType.String)) { IsSearchable = true, IsFilterable = true, IsFacetable = true }, | |
new Field("genero", DataType.String) { IsFilterable = true, IsSortable = true, IsFacetable = true }, | |
new Field("rating", DataType.Int32) { IsFilterable = true, IsSortable = true, IsFacetable = true }, | |
new Field("fechaEstreno", DataType.DateTimeOffset) { IsFilterable = true, IsSortable = true, IsFacetable = true } | |
} | |
}; | |
serviceClient.Indexes.Create(index); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment