From 5a9111fcebe94b0447f9aa3acbc5bc0a83e5a1fd Mon Sep 17 00:00:00 2001 From: Alexander Koval Date: Thu, 4 May 2023 17:38:58 +0300 Subject: [PATCH] Update samples --- samples/src/commonMain/kotlin/samples/docsource/UserDoc.kt | 5 ++--- .../commonMain/kotlin/samples/document/nested/Nested.kt | 7 +++---- .../commonMain/kotlin/samples/document/object/Object.kt | 5 ++--- samples/src/commonMain/kotlin/samples/querying/Nodes.kt | 5 ++--- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/samples/src/commonMain/kotlin/samples/docsource/UserDoc.kt b/samples/src/commonMain/kotlin/samples/docsource/UserDoc.kt index 152a44aad0..bcc86d8453 100644 --- a/samples/src/commonMain/kotlin/samples/docsource/UserDoc.kt +++ b/samples/src/commonMain/kotlin/samples/docsource/UserDoc.kt @@ -1,11 +1,10 @@ package samples.docsource -import dev.evo.elasticmagic.doc.BaseDocSource -import dev.evo.elasticmagic.doc.BoundField import dev.evo.elasticmagic.doc.Document +import dev.evo.elasticmagic.doc.ObjectBoundField import dev.evo.elasticmagic.doc.SubDocument -class RoleDoc(field: BoundField) : SubDocument(field) { +class RoleDoc(field: ObjectBoundField) : SubDocument(field) { val name by keyword() val permissions by keyword() } diff --git a/samples/src/commonMain/kotlin/samples/document/nested/Nested.kt b/samples/src/commonMain/kotlin/samples/document/nested/Nested.kt index e4d79543ad..0b32f30e7c 100644 --- a/samples/src/commonMain/kotlin/samples/document/nested/Nested.kt +++ b/samples/src/commonMain/kotlin/samples/document/nested/Nested.kt @@ -1,14 +1,13 @@ package samples.document.nested -import dev.evo.elasticmagic.doc.BaseDocSource import dev.evo.elasticmagic.query.Bool -import dev.evo.elasticmagic.doc.BoundField import dev.evo.elasticmagic.doc.Document +import dev.evo.elasticmagic.doc.ObjectBoundField import dev.evo.elasticmagic.query.Nested import dev.evo.elasticmagic.SearchQuery import dev.evo.elasticmagic.doc.SubDocument -class RoleDoc(field: BoundField) : SubDocument(field) { +class RoleDoc(field: ObjectBoundField) : SubDocument(field) { val name by keyword() val permissions by keyword() } @@ -27,4 +26,4 @@ val moderators = SearchQuery() UserDoc.roles.permissions.eq("order"), ) ) - ) \ No newline at end of file + ) diff --git a/samples/src/commonMain/kotlin/samples/document/object/Object.kt b/samples/src/commonMain/kotlin/samples/document/object/Object.kt index 55b2f6da6b..6a857e1a06 100644 --- a/samples/src/commonMain/kotlin/samples/document/object/Object.kt +++ b/samples/src/commonMain/kotlin/samples/document/object/Object.kt @@ -1,12 +1,11 @@ package samples.document.`object` -import dev.evo.elasticmagic.doc.BaseDocSource -import dev.evo.elasticmagic.doc.BoundField import dev.evo.elasticmagic.doc.Document +import dev.evo.elasticmagic.doc.ObjectBoundField import dev.evo.elasticmagic.SearchQuery import dev.evo.elasticmagic.doc.SubDocument -class GroupDoc(field: BoundField) : SubDocument(field) { +class GroupDoc(field: ObjectBoundField) : SubDocument(field) { val id by int() val name by keyword() } diff --git a/samples/src/commonMain/kotlin/samples/querying/Nodes.kt b/samples/src/commonMain/kotlin/samples/querying/Nodes.kt index 9d02abe7f6..d2bb2f5c22 100644 --- a/samples/src/commonMain/kotlin/samples/querying/Nodes.kt +++ b/samples/src/commonMain/kotlin/samples/querying/Nodes.kt @@ -1,10 +1,9 @@ package samples.querying import dev.evo.elasticmagic.SearchQuery -import dev.evo.elasticmagic.doc.BaseDocSource -import dev.evo.elasticmagic.doc.BoundField import dev.evo.elasticmagic.doc.Document import dev.evo.elasticmagic.doc.MappingField +import dev.evo.elasticmagic.doc.ObjectBoundField import dev.evo.elasticmagic.doc.SubDocument import dev.evo.elasticmagic.query.Bool import dev.evo.elasticmagic.query.DisMax @@ -15,7 +14,7 @@ import dev.evo.elasticmagic.query.QueryExpressionNode import kotlin.random.Random -class TranslationDoc(field: BoundField) : SubDocument(field) { +class TranslationDoc(field: ObjectBoundField) : SubDocument(field) { val en by text() val de by text() val ru by text()