Files
mixtape/zero.Core/Database/Indexes/Backoffice_Search.cs
T

23 lines
594 B
C#
Raw Normal View History

2021-09-02 22:44:20 +02:00
using Raven.Client.Documents;
using zero.Core.Options;
2021-08-27 11:46:50 +02:00
namespace zero.Core.Database.Indexes
{
2021-09-02 22:44:20 +02:00
public class Backoffice_Search : ZeroJavascriptIndex
2021-08-27 11:46:50 +02:00
{
2021-09-02 22:44:20 +02:00
public override void Setup(IZeroOptions options, IDocumentStore store)
2021-08-27 11:46:50 +02:00
{
2021-09-02 22:44:20 +02:00
// TODO index.Conventions is null, but needed for collection name retrieval
2021-08-27 11:46:50 +02:00
2021-09-02 22:44:20 +02:00
foreach (var map in options.Search.GetAllItems())
2021-08-27 11:46:50 +02:00
{
2021-09-03 00:23:39 +02:00
Maps.Add(map.BuildInstruction(store));
2021-09-02 22:44:20 +02:00
}
2021-08-27 11:46:50 +02:00
2021-09-02 22:44:20 +02:00
//Index(nameof(SearchIndexResult.Name), FieldIndexing.Search);
//Index(nameof(SearchIndexResult.Fields), FieldIndexing.Search);
2021-08-27 11:46:50 +02:00
}
}
}