Browse Source

Fix

pull/349/head
Sebastian Stehle 7 years ago
parent
commit
4f608ce775
  1. 3
      src/Squidex.Domain.Apps.Entities/Contents/Text/GrainTextIndexer.cs
  2. 3
      src/Squidex.Domain.Apps.Entities/Contents/Text/SearchContext.cs
  3. 2
      src/Squidex.Domain.Apps.Entities/Contents/Text/TextIndexerGrain.cs
  4. 2
      tests/Squidex.Domain.Apps.Entities.Tests/Contents/Text/TextIndexerGrainTests.cs

3
src/Squidex.Domain.Apps.Entities/Contents/Text/GrainTextIndexer.cs

@ -64,9 +64,8 @@ namespace Squidex.Domain.Apps.Entities.Contents.Text
var context = new SearchContext var context = new SearchContext
{ {
AppVersion = app.Version, AppVersion = app.Version,
Schema = schema.SchemaDef, AppLanguages = languages,
SchemaVersion = schema.Version, SchemaVersion = schema.Version,
Languages = languages,
IsDraft = useDraft IsDraft = useDraft
}; };

3
src/Squidex.Domain.Apps.Entities/Contents/Text/SearchContext.cs

@ -6,7 +6,6 @@
// ========================================================================== // ==========================================================================
using System.Collections.Generic; using System.Collections.Generic;
using Squidex.Domain.Apps.Core.Schemas;
namespace Squidex.Domain.Apps.Entities.Contents.Text namespace Squidex.Domain.Apps.Entities.Contents.Text
{ {
@ -18,6 +17,6 @@ namespace Squidex.Domain.Apps.Entities.Contents.Text
public long SchemaVersion { get; set; } public long SchemaVersion { get; set; }
public List<string> Languages { get; set; } public List<string> AppLanguages { get; set; }
} }
} }

2
src/Squidex.Domain.Apps.Entities/Contents/Text/TextIndexerGrain.cs

@ -186,7 +186,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.Text
{ {
if (queryParser == null || currentAppVersion != context.AppVersion || currentSchemaVersion != context.SchemaVersion) if (queryParser == null || currentAppVersion != context.AppVersion || currentSchemaVersion != context.SchemaVersion)
{ {
var fields = context.Languages.Select(BuildFieldName).ToArray(); var fields = context.AppLanguages.Select(BuildFieldName).ToArray();
queryParser = new MultiFieldQueryParser(Version, fields, Analyzer); queryParser = new MultiFieldQueryParser(Version, fields, Analyzer);

2
tests/Squidex.Domain.Apps.Entities.Tests/Contents/Text/TextIndexerGrainTests.cs

@ -36,7 +36,7 @@ namespace Squidex.Domain.Apps.Entities.Contents.Text
AppVersion = 1, AppVersion = 1,
Schema = schema, Schema = schema,
SchemaVersion = 1, SchemaVersion = 1,
Languages = new List<string> { "de", "en" } AppLanguages = new List<string> { "de", "en" }
}; };
sut = new TextIndexerGrain(assetStore); sut = new TextIndexerGrain(assetStore);

Loading…
Cancel
Save