diff --git a/ebean-api/src/main/java/io/ebean/Database.java b/ebean-api/src/main/java/io/ebean/Database.java
index 2cba17939..5000cde48 100644
--- a/ebean-api/src/main/java/io/ebean/Database.java
+++ b/ebean-api/src/main/java/io/ebean/Database.java
@@ -1321,11 +1321,6 @@ public interface Database {
*/
ScriptRunner script();
- /**
- * Return the Document store.
- */
- DocumentStore docStore();
-
/**
* Returns the set of properties/paths that are unknown (do not map to known properties or paths).
*
diff --git a/ebean-api/src/main/java/io/ebean/DocStoreQueueEntry.java b/ebean-api/src/main/java/io/ebean/DocStoreQueueEntry.java
deleted file mode 100644
index 9d631ce19..000000000
--- a/ebean-api/src/main/java/io/ebean/DocStoreQueueEntry.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package io.ebean;
-
-/**
- * Bean holding the details to update the document store.
- */
-public final class DocStoreQueueEntry {
-
- /**
- * Action to either update or delete a document from the index.
- */
- public enum Action {
-
- /**
- * Action is to update a document in the doc store.
- */
- INDEX(1),
-
- /**
- * Action is to delete a document from the doc store..
- */
- DELETE(2),
-
- /**
- * An update is required based on a change to a nested/embedded object at a given path.
- */
- NESTED(3);
-
- int value;
-
- Action(int value) {
- this.value = value;
- }
-
- /**
- * Return the value associated with this action type.
- */
- public int getValue() {
- return value;
- }
- }
-
- private final Action type;
-
- private final String queueId;
-
- private final String path;
-
- private final Object beanId;
-
- /**
- * Construct for an INDEX or DELETE action.
- */
- public DocStoreQueueEntry(Action type, String queueId, Object beanId) {
- this(type, queueId, null, beanId);
- }
-
- /**
- * Construct for an NESTED/embedded path invalidation action.
- */
- public DocStoreQueueEntry(Action type, String queueId, String path, Object beanId) {
- this.type = type;
- this.queueId = queueId;
- this.path = path;
- this.beanId = beanId;
- }
-
- /**
- * Return the event type.
- */
- public Action getType() {
- return type;
- }
-
- /**
- * Return the associate queueId.
- */
- public String getQueueId() {
- return queueId;
- }
-
- /**
- * Return the path if this is a nested update.
- */
- public String getPath() {
- return path;
- }
-
- /**
- * Return the bean id (which matches the document id).
- */
- public Object getBeanId() {
- return beanId;
- }
-}
diff --git a/ebean-api/src/main/java/io/ebean/DocumentStore.java b/ebean-api/src/main/java/io/ebean/DocumentStore.java
deleted file mode 100644
index 7b5a6c481..000000000
--- a/ebean-api/src/main/java/io/ebean/DocumentStore.java
+++ /dev/null
@@ -1,312 +0,0 @@
-package io.ebean;
-
-import io.avaje.lang.NonNullApi;
-import io.avaje.lang.Nullable;
-import io.ebean.docstore.DocQueryContext;
-import io.ebean.docstore.RawDoc;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-import java.util.function.Consumer;
-import java.util.function.Predicate;
-
-/**
- * Document storage operations.
- */
-@NonNullApi
-public interface DocumentStore {
-
- /**
- * Update the associated document store using the result of the query.
- *
- * This will execute the query against the database creating a document for each
- * bean graph and sending this to the document store.
- *
- *
- * Note that the select and fetch paths of the query is set for you to match the
- * document structure needed based on @DocStore and @DocStoreEmbedded
- * so what this query requires is the predicates only.
- *
- *
- * This query will be executed using findEach so it is safe to use a query
- * that will fetch a lot of beans. The default bulkBatchSize is used.
- *
- *
- * @param query The query that selects object to send to the document store.
- */
- void indexByQuery(Query query);
-
- /**
- * Update the associated document store index using the result of the query additionally specifying a
- * bulkBatchSize to use for sending the messages to ElasticSearch.
- *
- * @param query The query that selects object to send to the document store.
- * @param bulkBatchSize The batch size to use when bulk sending to the document store.
- */
- void indexByQuery(Query query, int bulkBatchSize);
-
- /**
- * Update the document store for all beans of this type.
- *
- * This is the same as indexByQuery where the query has no predicates and so fetches all rows.
- *
- */
- void indexAll(Class> beanType);
-
- /**
- * Return the bean by fetching it's content from the document store.
- * If the document is not found null is returned.
- *
- * Typically this is called indirectly by findOne() on the query.
- *
- */
- @Nullable
- T find(DocQueryContext request);
-
- /**
- * Execute the find list query. This request is prepared to execute secondary queries.
- *
- * Typically this is called indirectly by findList() on the query that has setUseDocStore(true).
- *
- */
- PagedList findPagedList(DocQueryContext request);
-
- /**
- * Execute the query against the document store with the expectation of a large set of results
- * that are processed in a scrolling resultSet fashion.
- *
- * For example, with the ElasticSearch doc store this uses SCROLL.
- *
- *
- * Typically this is called indirectly by findEach() on the query that has setUseDocStore(true).
- *
- */
- void findEach(DocQueryContext query, Consumer consumer);
-
- /**
- * Execute the query against the document store with the expectation of a large set of results
- * that are processed in a scrolling resultSet fashion.
- *
- * Unlike findEach() this provides the opportunity to stop iterating through the large query.
- *
- *
- * For example, with the ElasticSearch doc store this uses SCROLL.
- *
- *
- * Typically this is called indirectly by findEachWhile() on the query that has setUseDocStore(true).
- *
- */
- void findEachWhile(DocQueryContext query, Predicate consumer);
-
- /**
- * Find each processing raw documents.
- *
- * @param indexNameType The full index name and type
- * @param rawQuery The query to execute
- * @param consumer Consumer to process each document
- */
- void findEach(String indexNameType, String rawQuery, Consumer consumer);
-
- /**
- * Find each processing raw documents stopping when the predicate returns false.
- *
- * @param indexNameType The full index name and type
- * @param rawQuery The query to execute
- * @param consumer Consumer to process each document until false is returned
- */
- void findEachWhile(String indexNameType, String rawQuery, Predicate consumer);
-
- /**
- * Process the queue entries sending updates to the document store or queuing them for later processing.
- */
- long process(List queueEntries) throws IOException;
-
- /**
- * Drop the index from the document store (similar to DDL drop table).
- *
- */
- void dropIndex(String indexName);
-
- /**
- * Create an index given a mapping file as a resource in the classPath (similar to DDL create table).
- *
{@code
- *
- * DocumentStore documentStore = database.docStore();
- *
- * // uses product_copy.mapping.json resource
- * // ... to define mappings for the index
- *
- * documentStore.createIndex("product_copy", null);
- *
- * }
- *
- * @param indexName the name of the new index
- * @param alias the alias of the index
- */
- void createIndex(String indexName, String alias);
-
- /**
- * Modify the settings on an index.
- *
- * For example, this can be used be used to set elasticSearch refresh_interval
- * on an index before a bulk update.
- *
- *
- * @param indexName the name of the index to update settings on
- * @param settings the settings to set on the index
- */
- void indexSettings(String indexName, Map settings);
-
- /**
- * Copy the index to a new index.
- *
- * This copy process does not use the database but instead will copy from the source index to a destination index.
- *
- *
- * @param beanType The bean type of the source index
- * @param newIndex The name of the index to copy to
- * @return the number of documents copied to the new index
- */
- long copyIndex(Class> beanType, String newIndex);
-
- /**
- * Copy entries from an index to a new index but limiting to documents that have been
- * modified since the sinceEpochMillis time.
- *
- * To support this the document needs to have a @WhenModified property.
- *
- *
- * @param beanType The bean type of the source index
- * @param newIndex The name of the index to copy to
- * @return the number of documents copied to the new index
- */
- long copyIndex(Class> beanType, String newIndex, long sinceEpochMillis);
-
- /**
- * Copy from a source index to a new index taking only the documents
- * matching the given query.
- *
{@code
- *
- * // predicates to select the source documents to copy
- * Query query = database.find(Product.class)
- * .where()
- * .ge("whenModified", new Timestamp(since))
- * .ge("name", "A")
- * .lt("name", "D")
- * .query();
- *
- * // copy from the source index to "product_copy" index
- * long copyCount = documentStore.copyIndex(query, "product_copy", 1000);
- *
- * }
- *
- * @param query The query to select the source documents to copy
- * @param newIndex The target index to copy the documents to
- * @param bulkBatchSize The ElasticSearch bulk batch size, if 0 uses the default.
- * @return The number of documents copied to the new index.
- */
- long copyIndex(Query> query, String newIndex, int bulkBatchSize);
-}
diff --git a/ebean-api/src/main/java/io/ebean/ExpressionFactory.java b/ebean-api/src/main/java/io/ebean/ExpressionFactory.java
index dd30ec96e..d8f39ad92 100644
--- a/ebean-api/src/main/java/io/ebean/ExpressionFactory.java
+++ b/ebean-api/src/main/java/io/ebean/ExpressionFactory.java
@@ -1,7 +1,5 @@
package io.ebean;
-import io.ebean.search.*;
-
import java.util.Collection;
import java.util.Map;
@@ -625,31 +623,6 @@ public interface ExpressionFactory {
*/
Expression raw(String raw);
- /**
- * Create a Text Match expression (currently doc store/Elastic only).
- */
- Expression textMatch(String propertyName, String search, Match options);
-
- /**
- * Create a Text Multi match expression (currently doc store/Elastic only).
- */
- Expression textMultiMatch(String query, MultiMatch options);
-
- /**
- * Create a text simple query expression (currently doc store/Elastic only).
- */
- Expression textSimple(String search, TextSimple options);
-
- /**
- * Create a text query string expression (currently doc store/Elastic only).
- */
- Expression textQueryString(String search, TextQueryString options);
-
- /**
- * Create a text common terms expression (currently doc store/Elastic only).
- */
- Expression textCommonTerms(String search, TextCommonTerms options);
-
/**
* And - join two expressions with a logical and.
*/
diff --git a/ebean-api/src/main/java/io/ebean/ExpressionList.java b/ebean-api/src/main/java/io/ebean/ExpressionList.java
index ebee9e635..22a15a886 100644
--- a/ebean-api/src/main/java/io/ebean/ExpressionList.java
+++ b/ebean-api/src/main/java/io/ebean/ExpressionList.java
@@ -2,7 +2,6 @@ package io.ebean;
import io.avaje.lang.NonNullApi;
import io.avaje.lang.Nullable;
-import io.ebean.search.*;
import jakarta.persistence.NonUniqueResultException;
import java.sql.Connection;
@@ -553,19 +552,6 @@ public interface ExpressionList {
*/
Query setDistinct(boolean distinct);
- /**
- * Set the index(es) to search for a document store which uses partitions.
- *
- * For example, when executing a query against ElasticSearch with daily indexes we can
- * explicitly specify the indexes to search against.
- *
- *
- * @param indexName The index or indexes to search against
- * @return This query
- * @see Query#setDocIndexName(String)
- */
- Query setDocIndexName(String indexName);
-
/**
* Set the first row to fetch.
*
@@ -649,14 +635,6 @@ public interface ExpressionList {
return setUseQueryCache(enabled ? CacheMode.ON : CacheMode.OFF);
}
- /**
- * Set to true if this query should execute against the doc store.
- *
- * When setting this you may also consider disabling lazy loading.
- *
- */
- Query setUseDocStore(boolean useDocsStore);
-
/**
* Set true if you want to disable lazy loading.
*
@@ -1578,47 +1556,6 @@ public interface ExpressionList {
*/
ExpressionList rawOrEmpty(String raw, Collection> values);
- /**
- * Add a match expression.
- *
- * @param propertyName The property name for the match
- * @param search The search value
- */
- ExpressionList match(String propertyName, String search);
-
- /**
- * Add a match expression with options.
- *
- * @param propertyName The property name for the match
- * @param search The search value
- */
- ExpressionList match(String propertyName, String search, Match options);
-
- /**
- * Add a multi-match expression.
- */
- ExpressionList multiMatch(String search, String... properties);
-
- /**
- * Add a multi-match expression using options.
- */
- ExpressionList multiMatch(String search, MultiMatch options);
-
- /**
- * Add a simple query string expression.
- */
- ExpressionList textSimple(String search, TextSimple options);
-
- /**
- * Add a query string expression.
- */
- ExpressionList textQueryString(String search, TextQueryString options);
-
- /**
- * Add common terms expression.
- */
- ExpressionList textCommonTerms(String search, TextCommonTerms options);
-
/**
* And - join two expressions with a logical and.
*/
@@ -1761,42 +1698,6 @@ public interface ExpressionList {
*/
Junction disjunction();
- /**
- * Start a list of expressions that will be joined by MUST.
- *
- * This automatically makes the query a useDocStore(true) query that
- * will execute against the document store (ElasticSearch etc).
- *
- *
- * This is logically similar to and().
- *
- */
- Junction must();
-
- /**
- * Start a list of expressions that will be joined by SHOULD.
- *
- * This automatically makes the query a useDocStore(true) query that
- * will execute against the document store (ElasticSearch etc).
- *
- *
- * This is logically similar to or().
- *
- */
- Junction should();
-
- /**
- * Start a list of expressions that will be joined by MUST NOT.
- *
- * This automatically makes the query a useDocStore(true) query that
- * will execute against the document store (ElasticSearch etc).
- *
- *
- * This is logically similar to not().
- *
- */
- Junction mustNot();
-
/**
* End a junction returning the parent expression list.
*
diff --git a/ebean-api/src/main/java/io/ebean/Query.java b/ebean-api/src/main/java/io/ebean/Query.java
index 0ed613d53..9028e9924 100644
--- a/ebean-api/src/main/java/io/ebean/Query.java
+++ b/ebean-api/src/main/java/io/ebean/Query.java
@@ -316,43 +316,6 @@ public interface Query extends CancelableQuery {
*/
Query setPersistenceContextScope(PersistenceContextScope scope);
- /**
- * Set the index(es) to search for a document store which uses partitions.
- *
- * For example, when executing a query against ElasticSearch with daily indexes we can
- * explicitly specify the indexes to search against.
- *
- *
{@code
- *
- * // explicitly specify the indexes to search
- * query.setDocIndexName("logstash-2016.11.5,logstash-2016.11.6")
- *
- * // search today's index
- * query.setDocIndexName("$today")
- *
- * // search the last 3 days
- * query.setDocIndexName("$last-3")
- *
- * }
- *
- * If the indexName is specified with ${daily} e.g. "logstash-${daily}" ... then we can use
- * $today and $last-x as the search docIndexName like the examples below.
- *
- *
{@code
- *
- * // search today's index
- * query.setDocIndexName("$today")
- *
- * // search the last 3 days
- * query.setDocIndexName("$last-3")
- *
- * }
- *
- * @param indexName The index or indexes to search against
- * @return This query
- */
- Query setDocIndexName(String indexName);
-
/**
* Return the ExpressionFactory used by this query.
*/
@@ -1288,27 +1251,6 @@ public interface Query extends CancelableQuery {
*/
ExpressionList where();
- /**
- * Add Full text search expressions for Document store queries.
- *
- * This is currently ElasticSearch only and provides the full text
- * expressions such as Match and Multi-Match.
- *
- *
- * This automatically makes this query a "Doc Store" query and will execute
- * against the document store (ElasticSearch).
- *
- *
- * Expressions added here are added to the "query" section of an ElasticSearch
- * query rather than the "filter" section.
- *
- *
- * Expressions added to the where() are added to the "filter" section of an
- * ElasticSearch query.
- *
- */
- ExpressionList text();
-
/**
* This applies a filter on the 'many' property list rather than the root
* level objects.
@@ -1567,14 +1509,6 @@ public interface Query extends CancelableQuery {
*/
Query setLabel(String label);
- /**
- * Set to true if this query should execute against the doc store.
- *
- * When setting this you may also consider disabling lazy loading.
- *
- */
- Query setUseDocStore(boolean useDocStore);
-
/**
* When set to true when you want the returned beans to be read only.
*/
diff --git a/ebean-api/src/main/java/io/ebean/Transaction.java b/ebean-api/src/main/java/io/ebean/Transaction.java
index 4f7c14818..c744e296c 100644
--- a/ebean-api/src/main/java/io/ebean/Transaction.java
+++ b/ebean-api/src/main/java/io/ebean/Transaction.java
@@ -1,9 +1,7 @@
package io.ebean;
-import io.ebean.annotation.DocStoreMode;
import io.ebean.annotation.PersistBatch;
import io.ebean.config.DatabaseConfig;
-import io.ebean.config.DocStoreConfig;
import jakarta.persistence.PersistenceException;
import java.sql.Connection;
@@ -211,29 +209,6 @@ public interface Transaction extends AutoCloseable {
*/
boolean isActive();
- /**
- * Set the behavior for document store updates on this transaction.
- *
- * For example, set the mode to DocStoreEvent.IGNORE for this transaction and
- * then any changes via this transaction are not sent to the doc store. This
- * would be used when doing large bulk inserts into the database and we want
- * to control how that is sent to the document store.
- *
- */
- void setDocStoreMode(DocStoreMode mode);
-
- /**
- * Set the batch size to use for sending messages to the document store.
- *
- * You might set this if you know the changes in this transaction result in especially large or
- * especially small payloads and want to adjust the batch size to match.
- *
- *
- * Setting this overrides the default of {@link DocStoreConfig#getBulkBatchSize()}
- *
- */
- void setDocStoreBatchSize(int batchSize);
-
/**
* Explicitly turn off or on the cascading nature of save() and delete(). This
* gives the developer exact control over what beans are saved and deleted
diff --git a/ebean-api/src/main/java/io/ebean/config/DatabaseConfig.java b/ebean-api/src/main/java/io/ebean/config/DatabaseConfig.java
index f41b0b773..b21a680c0 100644
--- a/ebean-api/src/main/java/io/ebean/config/DatabaseConfig.java
+++ b/ebean-api/src/main/java/io/ebean/config/DatabaseConfig.java
@@ -132,16 +132,6 @@ public class DatabaseConfig {
*/
private List packages = new ArrayList<>();
- /**
- * Configuration for the ElasticSearch integration.
- */
- private DocStoreConfig docStoreConfig = new DocStoreConfig();
-
- /**
- * Set to true when the Database only uses Document store.
- */
- private boolean docStoreOnly;
-
/**
* This is used to populate @WhoCreated, @WhoModified and
* support other audit features (who executed a query etc).
@@ -1561,34 +1551,6 @@ public class DatabaseConfig {
}
}
- /**
- * Return true if this Database is a Document store only instance (has no JDBC DB).
- */
- public boolean isDocStoreOnly() {
- return docStoreOnly;
- }
-
- /**
- * Set to true if this Database is Document store only instance (has no JDBC DB).
- */
- public void setDocStoreOnly(boolean docStoreOnly) {
- this.docStoreOnly = docStoreOnly;
- }
-
- /**
- * Return the configuration for the ElasticSearch integration.
- */
- public DocStoreConfig getDocStoreConfig() {
- return docStoreConfig;
- }
-
- /**
- * Set the configuration for the ElasticSearch integration.
- */
- public void setDocStoreConfig(DocStoreConfig docStoreConfig) {
- this.docStoreConfig = docStoreConfig;
- }
-
/**
* Return the constraint naming convention used in DDL generation.
*/
@@ -2771,13 +2733,6 @@ public class DatabaseConfig {
readOnlyDataSourceConfig.loadSettings(p.properties, name + "-ro");
}
- /**
- * This is broken out to allow overridden behaviour.
- */
- protected void loadDocStoreSettings(PropertiesWrapper p) {
- docStoreConfig.loadSettings(p);
- }
-
/**
* This is broken out to allow overridden behaviour.
*/
@@ -2809,11 +2764,6 @@ public class DatabaseConfig {
}
loadDataSourceSettings(p);
- if (docStoreConfig == null) {
- docStoreConfig = new DocStoreConfig();
- }
- loadDocStoreSettings(p);
-
defaultServer = p.getBoolean("defaultServer", defaultServer);
autoPersistUpdates = p.getBoolean("autoPersistUpdates", autoPersistUpdates);
loadModuleInfo = p.getBoolean("loadModuleInfo", loadModuleInfo);
@@ -2828,7 +2778,6 @@ public class DatabaseConfig {
queryPlanCapturePeriodSecs = p.getLong("queryPlan.capturePeriodSecs", queryPlanCapturePeriodSecs);
queryPlanCaptureMaxTimeMillis = p.getLong("queryPlan.captureMaxTimeMillis", queryPlanCaptureMaxTimeMillis);
queryPlanCaptureMaxCount = p.getInt("queryPlan.captureMaxCount", queryPlanCaptureMaxCount);
- docStoreOnly = p.getBoolean("docStoreOnly", docStoreOnly);
disableL2Cache = p.getBoolean("disableL2Cache", disableL2Cache);
localOnlyL2Cache = p.getBoolean("localOnlyL2Cache", localOnlyL2Cache);
enabledL2Regions = p.get("enabledL2Regions", enabledL2Regions);
diff --git a/ebean-api/src/main/java/io/ebean/config/DocStoreConfig.java b/ebean-api/src/main/java/io/ebean/config/DocStoreConfig.java
deleted file mode 100644
index d83f67749..000000000
--- a/ebean-api/src/main/java/io/ebean/config/DocStoreConfig.java
+++ /dev/null
@@ -1,320 +0,0 @@
-package io.ebean.config;
-
-import io.ebean.Transaction;
-import io.ebean.annotation.DocStoreMode;
-
-/**
- * Configuration for the Document store integration (e.g. ElasticSearch).
- */
-public class DocStoreConfig {
-
- /**
- * True when the Document store integration is active/on.
- */
- protected boolean active;
-
- /**
- * Set to true means Ebean will generate mapping files on startup.
- */
- protected boolean generateMapping;
-
- /**
- * When true the Document store should drop and re-create document indexes.
- */
- protected boolean dropCreate;
-
- /**
- * When true the Document store should create any document indexes that don't already exist.
- */
- protected boolean create;
-
- /**
- * The URL of the Document store. For example: http://localhost:9200.
- */
- protected String url;
-
- /**
- * Credential that be used for authentication to document store.
- */
- protected String username;
-
- /**
- * Password credential that be used for authentication to document store.
- */
- protected String password;
-
- /**
- * Set to true such that the client allows connections to invalid/self signed SSL certificates.
- */
- protected boolean allowAllCertificates;
-
- /**
- * The default mode used by indexes.
- */
- protected DocStoreMode persist = DocStoreMode.UPDATE;
-
- /**
- * The default batch size to use for the Bulk API calls.
- */
- protected int bulkBatchSize = 1000;
-
- /**
- * Resource path for the Document store mapping files.
- */
- protected String mappingPath;
-
- /**
- * Suffix used for mapping files.
- */
- protected String mappingSuffix;
-
- /**
- * Location of resources that mapping files are generated into.
- */
- protected String pathToResources = "src/main/resources";
-
- /**
- * Return true if the Document store (ElasticSearch) integration is active.
- */
- public boolean isActive() {
- String systemValue = System.getProperty("ebean.docstore.active");
- if (systemValue != null) {
- return Boolean.parseBoolean(systemValue);
- }
- return active;
- }
-
- /**
- * Set to true to make the Document store (ElasticSearch) integration active.
- */
- public void setActive(boolean active) {
- this.active = active;
- }
-
- /**
- * Return the URL to the Document store.
- */
- public String getUrl() {
- String systemValue = System.getProperty("ebean.docstore.url");
- if (systemValue != null) {
- return systemValue;
- }
- return url;
- }
-
- /**
- * Return the user credential for connecting to the document store.
- */
- public String getUsername() {
- return username;
- }
-
- /**
- * Set the user credential for connecting to the document store.
- */
- public void setUsername(String username) {
- this.username = username;
- }
-
- /**
- * Return the password credential for connecting to the document store.
- */
- public String getPassword() {
- return password;
- }
-
- /**
- * Set the password credential for connecting to the document store.
- */
- public void setPassword(String password) {
- this.password = password;
- }
-
- /**
- * Set the URL to the Document store.
- *
- * For a local ElasticSearch server this would be: http://localhost:9200
- */
- public void setUrl(String url) {
- this.url = url;
- }
-
- /**
- * Return true if Ebean should generate mapping files on server startup.
- */
- public boolean isGenerateMapping() {
- String systemValue = System.getProperty("ebean.docstore.generateMapping");
- if (systemValue != null) {
- return Boolean.parseBoolean(systemValue);
- }
- return generateMapping;
- }
-
- /**
- * Set to true if Ebean should generate mapping files on server startup.
- */
- public void setGenerateMapping(boolean generateMapping) {
- this.generateMapping = generateMapping;
- }
-
- /**
- * Return true if the document store should recreate mapped indexes.
- */
- public boolean isDropCreate() {
- String systemValue = System.getProperty("ebean.docstore.dropCreate");
- if (systemValue != null) {
- return Boolean.parseBoolean(systemValue);
- }
- return dropCreate;
- }
-
- /**
- * Set to true if the document store should recreate mapped indexes.
- */
- public void setDropCreate(boolean dropCreate) {
- this.dropCreate = dropCreate;
- }
-
- /**
- * Create true if the document store should create mapped indexes that don't yet exist.
- * This is only used if dropCreate is false.
- */
- public boolean isCreate() {
- String systemValue = System.getProperty("ebean.docstore.create");
- if (systemValue != null) {
- return Boolean.parseBoolean(systemValue);
- }
- return create;
- }
-
- /**
- * Set to true if the document store should create mapped indexes that don't yet exist.
- * This is only used if dropCreate is false.
- */
- public void setCreate(boolean create) {
- this.create = create;
- }
-
- /**
- * Return true if the client allows connections to invalid/self signed SSL certificates.
- */
- public boolean isAllowAllCertificates() {
- return allowAllCertificates;
- }
-
- /**
- * Set to true such that the client allows connections to invalid/self signed SSL certificates.
- */
- public void setAllowAllCertificates(boolean allowAllCertificates) {
- this.allowAllCertificates = allowAllCertificates;
- }
-
- /**
- * Return the default batch size to use for calls to the Bulk API.
- */
- public int getBulkBatchSize() {
- return bulkBatchSize;
- }
-
- /**
- * Set the default batch size to use for calls to the Bulk API.
- *
- * The batch size can be set on a transaction via {@link Transaction#setDocStoreBatchSize(int)}.
- *
- */
- public void setBulkBatchSize(int bulkBatchSize) {
- this.bulkBatchSize = bulkBatchSize;
- }
-
- /**
- * Return the mapping path.
- */
- public String getMappingPath() {
- return mappingPath;
- }
-
- /**
- * Set the mapping path.
- */
- public void setMappingPath(String mappingPath) {
- this.mappingPath = mappingPath;
- }
-
- /**
- * Return the mapping suffix.
- */
- public String getMappingSuffix() {
- return mappingSuffix;
- }
-
- /**
- * Set the mapping suffix.
- */
- public void setMappingSuffix(String mappingSuffix) {
- this.mappingSuffix = mappingSuffix;
- }
-
- /**
- * Return the relative file system path to resources when generating mapping files.
- */
- public String getPathToResources() {
- return pathToResources;
- }
-
- /**
- * Set the relative file system path to resources when generating mapping files.
- */
- public void setPathToResources(String pathToResources) {
- this.pathToResources = pathToResources;
- }
-
- /**
- * Return the default behavior for when Insert, Update and Delete events occur on beans that have an associated
- * Document store.
- */
- public DocStoreMode getPersist() {
- return persist;
- }
-
- /**
- * Set the default behavior for when Insert, Update and Delete events occur on beans that have an associated
- * Document store.
- *
- *
DocStoreEvent.UPDATE - build and send message to Bulk API
- *
DocStoreEvent.QUEUE - add an entry with the index type and id only into a queue for later processing
- *
DocStoreEvent.IGNORE - ignore. Most likely used when some scheduled batch job handles updating the index
- *
- *
- * You might choose to use QUEUE if that particular index data is updating very frequently or the cost of indexing
- * is expensive. Setting it to QUEUE can mean many changes can be batched together potentially coalescing multiple
- * updates for an index entry into a single update.
- *
- *
- * You might choose to use IGNORE when you have your own external process for updating the indexes. In this case
- * you don't want Ebean to do anything when the data changes.
- *
- */
- public void setPersist(DocStoreMode persist) {
- this.persist = persist;
- }
-
- /**
- * Load settings specified in properties files.
- */
- public void loadSettings(PropertiesWrapper properties) {
-
- active = properties.getBoolean("docstore.active", active);
- url = properties.get("docstore.url", url);
- username = properties.get("docstore.username", url);
- password = properties.get("docstore.password", url);
- persist = properties.getEnum(DocStoreMode.class, "docstore.persist", persist);
- bulkBatchSize = properties.getInt("docstore.bulkBatchSize", bulkBatchSize);
- generateMapping = properties.getBoolean("docstore.generateMapping", generateMapping);
- dropCreate = properties.getBoolean("docstore.dropCreate", dropCreate);
- create = properties.getBoolean("docstore.create", create);
- allowAllCertificates = properties.getBoolean("docstore.allowAllCertificates", allowAllCertificates);
- mappingPath = properties.get("docstore.mappingPath", mappingPath);
- mappingSuffix = properties.get("docstore.mappingSuffix", mappingSuffix);
- pathToResources = properties.get("docstore.pathToResources", pathToResources);
- }
-}
diff --git a/ebean-api/src/main/java/io/ebean/docstore/DocMapping.java b/ebean-api/src/main/java/io/ebean/docstore/DocMapping.java
deleted file mode 100644
index 9d8d4f3e0..000000000
--- a/ebean-api/src/main/java/io/ebean/docstore/DocMapping.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package io.ebean.docstore;
-
-/**
- * Document Mapping for a bean marker interface.
- */
-public interface DocMapping {
-}
diff --git a/ebean-api/src/main/java/io/ebean/docstore/DocQueryContext.java b/ebean-api/src/main/java/io/ebean/docstore/DocQueryContext.java
deleted file mode 100644
index 5e1718992..000000000
--- a/ebean-api/src/main/java/io/ebean/docstore/DocQueryContext.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package io.ebean.docstore;
-
-/**
- * Document query request context marker interface.
- */
-public interface DocQueryContext {
-}
diff --git a/ebean-api/src/main/java/io/ebean/docstore/DocUpdateContext.java b/ebean-api/src/main/java/io/ebean/docstore/DocUpdateContext.java
deleted file mode 100644
index 37fc7bf88..000000000
--- a/ebean-api/src/main/java/io/ebean/docstore/DocUpdateContext.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package io.ebean.docstore;
-
-/**
- * Document update context marker interface.
- */
-public interface DocUpdateContext {
-}
diff --git a/ebean-api/src/main/java/io/ebean/docstore/RawDoc.java b/ebean-api/src/main/java/io/ebean/docstore/RawDoc.java
deleted file mode 100644
index 282ab6f77..000000000
--- a/ebean-api/src/main/java/io/ebean/docstore/RawDoc.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package io.ebean.docstore;
-
-import java.util.Map;
-
-/**
- * Raw document.
- */
-public class RawDoc {
-
- private Map source;
- private String id;
- private double score;
- private String index;
- private String type;
-
- /**
- * Construct the document with all the meta data.
- */
- public RawDoc(Map source, String id, double score, String index, String type) {
- this.source = source;
- this.id = id;
- this.score = score;
- this.index = index;
- this.type = type;
- }
-
- /**
- * Construct empty (typically for JSON marshalling).
- */
- public RawDoc() {
- }
-
- /**
- * Return the source document as a Map.
- */
- public Map getSource() {
- return source;
- }
-
- /**
- * Return the Id value.
- */
- public String getId() {
- return id;
- }
-
- /**
- * Return the score.
- */
- public double getScore() {
- return score;
- }
-
- /**
- * Return the index name.
- */
- public String getIndex() {
- return index;
- }
-
- /**
- * Return the index type.
- */
- public String getType() {
- return type;
- }
-
- /**
- * Set the source document.
- */
- public void setSource(Map source) {
- this.source = source;
- }
-
- /**
- * Set the id value.
- */
- public void setId(String id) {
- this.id = id;
- }
-
- /**
- * Set the score.
- */
- public void setScore(double score) {
- this.score = score;
- }
-
- /**
- * Set the index name.
- */
- public void setIndex(String index) {
- this.index = index;
- }
-
- /**
- * Set the index type.
- */
- public void setType(String type) {
- this.type = type;
- }
-}
diff --git a/ebean-api/src/main/java/io/ebean/plugin/BeanDocType.java b/ebean-api/src/main/java/io/ebean/plugin/BeanDocType.java
deleted file mode 100644
index 55e7c146b..000000000
--- a/ebean-api/src/main/java/io/ebean/plugin/BeanDocType.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package io.ebean.plugin;
-
-import io.ebean.FetchPath;
-import io.ebean.Query;
-import io.ebean.docstore.DocUpdateContext;
-
-import java.io.IOException;
-
-/**
- * Doc store functions for a specific entity bean type.
- *
- * @param The type of entity bean
- */
-public interface BeanDocType {
-
- /**
- * Return the doc store index type for this bean type.
- */
- String indexType();
-
- /**
- * Return the doc store index name for this bean type.
- */
- String indexName();
-
- /**
- * Apply the appropriate fetch path to the query such that the query returns beans matching
- * the document store structure with the expected embedded properties.
- */
- void applyPath(Query spiQuery);
-
- /**
- * Return the FetchPath for the embedded document.
- */
- FetchPath embedded(String path);
-
- /**
- * For embedded 'many' properties we need a FetchPath relative to the root which is used to
- * build and replace the embedded list.
- */
- FetchPath embeddedManyRoot(String path);
-
- /**
- * Return a 'raw' property mapped for the given property.
- * If none exists the given property is returned.
- */
- String rawProperty(String property);
-
- /**
- * Store the bean in the doc store index.
- *
- * This somewhat assumes the bean is fetched with appropriate path properties
- * to match the expected document structure.
- */
- void index(Object idValue, T bean, DocUpdateContext txn) throws IOException;
-
- /**
- * Add a delete by Id to the doc store.
- */
- void deleteById(Object idValue, DocUpdateContext txn) throws IOException;
-
- /**
- * Add a embedded document update to the doc store.
- *
- * @param idValue the Id value of the bean holding the embedded document
- * @param embeddedProperty the embedded property
- * @param embeddedRawContent the content of the embedded document in JSON form
- * @param txn the doc store transaction to add the update to
- */
- void updateEmbedded(Object idValue, String embeddedProperty, String embeddedRawContent, DocUpdateContext txn) throws IOException;
-
-}
diff --git a/ebean-api/src/main/java/io/ebean/plugin/BeanType.java b/ebean-api/src/main/java/io/ebean/plugin/BeanType.java
index 762f077f4..0401711f0 100644
--- a/ebean-api/src/main/java/io/ebean/plugin/BeanType.java
+++ b/ebean-api/src/main/java/io/ebean/plugin/BeanType.java
@@ -2,7 +2,6 @@ package io.ebean.plugin;
import io.ebean.Query;
import io.ebean.config.dbplatform.IdType;
-import io.ebean.docstore.DocMapping;
import io.ebean.event.BeanFindController;
import io.ebean.event.BeanPersistController;
import io.ebean.event.BeanPersistListener;
@@ -145,30 +144,6 @@ public interface BeanType {
*/
IdType idType();
- /**
- * Return true if this bean type has doc store backing.
- */
- boolean isDocStoreMapped();
-
- /**
- * Return the DocumentMapping for this bean type.
- *
- * This is the document structure and mapping options for how this bean type is mapped
- * for the document store.
- *
- */
- DocMapping docMapping();
-
- /**
- * Return the doc store queueId for this bean type.
- */
- String docStoreQueueId();
-
- /**
- * Return the doc store support for this bean type.\
- */
- BeanDocType docStore();
-
/**
* Add the discriminator value to the query if needed.
*/
diff --git a/ebean-api/src/main/java/io/ebean/plugin/SpiServer.java b/ebean-api/src/main/java/io/ebean/plugin/SpiServer.java
index f12869b7a..0da3e6bd4 100644
--- a/ebean-api/src/main/java/io/ebean/plugin/SpiServer.java
+++ b/ebean-api/src/main/java/io/ebean/plugin/SpiServer.java
@@ -38,11 +38,6 @@ public interface SpiServer extends Database {
*/
List extends BeanType>> beanTypes(String baseTableName);
- /**
- * Return the bean type for a given doc store queueId.
- */
- BeanType> beanTypeForQueueId(String queueId);
-
/**
* Return a BeanLoader.
*/
diff --git a/ebean-api/src/main/java/io/ebean/search/AbstractMatch.java b/ebean-api/src/main/java/io/ebean/search/AbstractMatch.java
deleted file mode 100644
index 1f922701b..000000000
--- a/ebean-api/src/main/java/io/ebean/search/AbstractMatch.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package io.ebean.search;
-
-/**
- * Options for the text match and multi match expressions.
- */
-public abstract class AbstractMatch {
-
- protected boolean operatorAnd;
-
- protected String analyzer;
-
- protected double boost;
-
- protected String minShouldMatch;
-
- protected int maxExpansions;
-
- protected String zeroTerms;
-
- protected double cutoffFrequency;
-
- protected String fuzziness;
-
- protected int prefixLength;
-
- protected String rewrite;
-
- /**
- * Return true if using the AND operator otherwise using the OR operator.
- */
- public boolean isOperatorAnd() {
- return operatorAnd;
- }
-
- /**
- * Return the boost.
- */
- public double getBoost() {
- return boost;
- }
-
- /**
- * Return the minimum should match.
- */
- public String getMinShouldMatch() {
- return minShouldMatch;
- }
-
- /**
- * Return the zero terms option.
- */
- public String getZeroTerms() {
- return zeroTerms;
- }
-
- /**
- * Return the cutoff frequency.
- */
- public double getCutoffFrequency() {
- return cutoffFrequency;
- }
-
- /**
- * Return the max expansions.
- */
- public int getMaxExpansions() {
- return maxExpansions;
- }
-
- /**
- * Return the analyzer.
- */
- public String getAnalyzer() {
- return analyzer;
- }
-
- /**
- * Return the fuzziness.
- */
- public String getFuzziness() {
- return fuzziness;
- }
-
- /**
- * Return the prefix length.
- */
- public int getPrefixLength() {
- return prefixLength;
- }
-
- /**
- * Return the rewrite option.
- */
- public String getRewrite() {
- return rewrite;
- }
-
-}
diff --git a/ebean-api/src/main/java/io/ebean/search/Match.java b/ebean-api/src/main/java/io/ebean/search/Match.java
deleted file mode 100644
index 3ca4a5da8..000000000
--- a/ebean-api/src/main/java/io/ebean/search/Match.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package io.ebean.search;
-
-/**
- * Options for the text match expression.
- */
-public class Match extends AbstractMatch {
-
- protected boolean phrase;
-
- protected boolean phrasePrefix;
-
- public Match() {
- }
-
- /**
- * Set this to be a "Phrase" type expression.
- */
- public Match phrase() {
- phrase = true;
- return this;
- }
-
- /**
- * Set this to be a "Phrase Prefix" type expression.
- */
- public Match phrasePrefix() {
- phrasePrefix = true;
- return this;
- }
-
- /**
- * Use the AND operator (rather than OR).
- */
- public Match opAnd() {
- operatorAnd = true;
- return this;
- }
-
- /**
- * Use the OR operator (rather than AND).
- */
- public Match opOr() {
- operatorAnd = false;
- return this;
- }
-
- /**
- * Set the zero terms.
- */
- public Match zeroTerms(String zeroTerms) {
- this.zeroTerms = zeroTerms;
- return this;
- }
-
- /**
- * Set the cutoff frequency.
- */
- public Match cutoffFrequency(double cutoffFrequency) {
- this.cutoffFrequency = cutoffFrequency;
- return this;
- }
-
- /**
- * Set the max expansions (for phrase prefix only).
- */
- public Match maxExpansions(int maxExpansions) {
- this.maxExpansions = maxExpansions;
- return this;
- }
-
- /**
- * Set the Analyzer to use for this expression.
- */
- public Match analyzer(String analyzer) {
- this.analyzer = analyzer;
- return this;
- }
-
- /**
- * Set the boost.
- */
- public Match boost(double boost) {
- this.boost = boost;
- return this;
- }
-
- /**
- * Set the rewrite to use.
- */
- public Match minShouldMatch(String minShouldMatch) {
- this.minShouldMatch = minShouldMatch;
- return this;
- }
-
- /**
- * Set the rewrite to use.
- */
- public Match rewrite(String rewrite) {
- this.rewrite = rewrite;
- return this;
- }
-
- /**
- * Return true if this is a phrase query.
- */
- public boolean isPhrase() {
- return phrase;
- }
-
- /**
- * Return true if this is a phrase prefix query.
- */
- public boolean isPhrasePrefix() {
- return phrasePrefix;
- }
-
-}
diff --git a/ebean-api/src/main/java/io/ebean/search/MultiMatch.java b/ebean-api/src/main/java/io/ebean/search/MultiMatch.java
deleted file mode 100644
index 0293b5947..000000000
--- a/ebean-api/src/main/java/io/ebean/search/MultiMatch.java
+++ /dev/null
@@ -1,148 +0,0 @@
-package io.ebean.search;
-
-/**
- * Options for the text match expression.
- */
-public class MultiMatch extends AbstractMatch {
-
- /**
- * The MultiMatch type.
- */
- public enum Type {
- BEST_FIELDS,
- MOST_FIELDS,
- CROSS_FIELDS,
- PHRASE,
- PHRASE_PREFIX
- }
-
- protected final String[] fields;
-
- protected Type type = Type.BEST_FIELDS;
-
- protected double tieBreaker;
-
- /**
- * Create with the given fields.
- */
- public static MultiMatch fields(String... fields) {
- return new MultiMatch(fields);
- }
-
- /**
- * Construct with a set of fields.
- */
- public MultiMatch(String... fields) {
- this.fields = fields;
- }
-
- /**
- * Set the type of query.
- */
- public MultiMatch type(Type type) {
- this.type = type;
- return this;
- }
-
- /**
- * Set the tieBreaker to use.
- */
- public MultiMatch tieBreaker(double tieBreaker) {
- this.tieBreaker = tieBreaker;
- return this;
- }
-
- /**
- * Use the AND operator (rather than OR).
- */
- public MultiMatch opAnd() {
- operatorAnd = true;
- return this;
- }
-
- /**
- * Use the OR operator (rather than AND).
- */
- public MultiMatch opOr() {
- operatorAnd = false;
- return this;
- }
-
- /**
- * Set the minimum should match value.
- */
- public MultiMatch minShouldMatch(String minShouldMatch) {
- this.minShouldMatch = minShouldMatch;
- return this;
- }
-
- /**
- * Set the boost.
- */
- public MultiMatch boost(double boost) {
- this.boost = boost;
- return this;
- }
-
- /**
- * Set the zero terms.
- */
- public MultiMatch zeroTerms(String zeroTerms) {
- this.zeroTerms = zeroTerms;
- return this;
- }
-
- /**
- * Set the cutoff frequency.
- */
- public MultiMatch cutoffFrequency(double cutoffFrequency) {
- this.cutoffFrequency = cutoffFrequency;
- return this;
- }
-
- /**
- * Set the max expansions (for phrase prefix only).
- */
- public MultiMatch maxExpansions(int maxExpansions) {
- this.maxExpansions = maxExpansions;
- return this;
- }
-
- /**
- * Set the Analyzer to use for this expression.
- */
- public MultiMatch analyzer(String analyzer) {
- this.analyzer = analyzer;
- return this;
- }
-
- /**
- * Set the rewrite to use.
- */
- public MultiMatch rewrite(String rewrite) {
- this.rewrite = rewrite;
- return this;
- }
-
- /**
- * Return the type.
- */
- public Type getType() {
- return type;
- }
-
- /**
- * Return the fields to search.
- */
- public String[] getFields() {
- return fields;
- }
-
- /**
- * Return the tie breaker.
- */
- public double getTieBreaker() {
- return tieBreaker;
- }
-
-}
diff --git a/ebean-api/src/main/java/io/ebean/search/TextCommonTerms.java b/ebean-api/src/main/java/io/ebean/search/TextCommonTerms.java
deleted file mode 100644
index 435e17a32..000000000
--- a/ebean-api/src/main/java/io/ebean/search/TextCommonTerms.java
+++ /dev/null
@@ -1,139 +0,0 @@
-package io.ebean.search;
-
-/**
- * Text common terms query.
- *
- * This maps to an ElasticSearch "common terms query".
- *
- */
-public class TextSimple {
-
- protected String[] fields;
-
- protected boolean operatorAnd;
-
- protected String analyzer;
-
- protected String flags;
-
- protected boolean lowercaseExpandedTerms = true;
-
- protected boolean analyzeWildcard;
-
- protected String locale;
-
- protected boolean lenient;
-
- protected String minShouldMatch;
-
- /**
- * Construct
- */
- public TextSimple() {
- }
-
- /**
- * Set the fields.
- */
- public TextSimple fields(String... fields) {
- this.fields = fields;
- return this;
- }
-
- /**
- * Use AND as the default operator.
- */
- public TextSimple opAnd() {
- this.operatorAnd = true;
- return this;
- }
-
- /**
- * Use OR as the default operator.
- */
- public TextSimple opOr() {
- this.operatorAnd = false;
- return this;
- }
-
- /**
- * Set the analyzer
- */
- public TextSimple analyzer(String analyzer) {
- this.analyzer = analyzer;
- return this;
- }
-
- /**
- * Set the flags.
- */
- public TextSimple flags(String flags) {
- this.flags = flags;
- return this;
- }
-
-
- /**
- * Set the false to not use lowercase expanded terms.
- */
- public TextSimple lowercaseExpandedTerms(boolean lowercaseExpandedTerms) {
- this.lowercaseExpandedTerms = lowercaseExpandedTerms;
- return this;
- }
-
- /**
- * Set to true to use analyze wildcard.
- */
- public TextSimple analyzeWildcard(boolean analyzeWildcard) {
- this.analyzeWildcard = analyzeWildcard;
- return this;
- }
-
- /**
- * Set the locale.
- */
- public TextSimple locale(String locale) {
- this.locale = locale;
- return this;
- }
-
- /**
- * Set the lenient mode.
- */
- public TextSimple lenient(boolean lenient) {
- this.lenient = lenient;
- return this;
- }
-
- /**
- * Set the minimum should match.
- */
- public TextSimple minShouldMatch(String minShouldMatch) {
- this.minShouldMatch = minShouldMatch;
- return this;
- }
-
- /**
- * Return lenient mode.
- */
- public boolean isLenient() {
- return lenient;
- }
-
- /**
- * Return true to analyse wildcard.
- */
- public boolean isAnalyzeWildcard() {
- return analyzeWildcard;
- }
-
- /**
- * Return lowercase expanded terms mode.
- */
- public boolean isLowercaseExpandedTerms() {
- return lowercaseExpandedTerms;
- }
-
- /**
- * Return true if the default operator should be AND.
- */
- public boolean isOperatorAnd() {
- return operatorAnd;
- }
-
- /**
- * Return the analyzer to use.
- */
- public String getAnalyzer() {
- return analyzer;
- }
-
- /**
- * Return the fields.
- */
- public String[] getFields() {
- return fields;
- }
-
- /**
- * Return the locale.
- */
- public String getLocale() {
- return locale;
- }
-
- /**
- * Return the flags.
- */
- public String getFlags() {
- return flags;
- }
-
- /**
- * Return the minimum should match.
- */
- public String getMinShouldMatch() {
- return minShouldMatch;
- }
-
-}
diff --git a/ebean-api/src/main/java/io/ebean/search/package-info.java b/ebean-api/src/main/java/io/ebean/search/package-info.java
deleted file mode 100644
index 1fab5cb0a..000000000
--- a/ebean-api/src/main/java/io/ebean/search/package-info.java
+++ /dev/null
@@ -1,4 +0,0 @@
-/**
- * Provides text search expressions like Match, TextQueryString etc.
- */
-package io.ebean.search;
diff --git a/ebean-api/src/main/java/module-info.java b/ebean-api/src/main/java/module-info.java
index ad749db56..20af2ca0e 100644
--- a/ebean-api/src/main/java/module-info.java
+++ b/ebean-api/src/main/java/module-info.java
@@ -32,10 +32,8 @@ module io.ebean.api {
exports io.ebean.event;
exports io.ebean.event.changelog;
exports io.ebean.common;
- exports io.ebean.docstore;
exports io.ebean.plugin;
exports io.ebean.metric;
- exports io.ebean.search;
exports io.ebean.service;
exports io.ebean.text;
exports io.ebean.text.json;
diff --git a/ebean-core/pom.xml b/ebean-core/pom.xml
index 89a7de44c..3f1d5ef0e 100644
--- a/ebean-core/pom.xml
+++ b/ebean-core/pom.xml
@@ -230,25 +230,6 @@
-
- org.apache.maven.plugins
- maven-javadoc-plugin
-
- Ebean 12
- src/main/java/io/ebean/overview.html
- io.ebeaninternal.*:io.ebeanservice:io.ebean.common:io.ebean.bean:io.ebean.service:io.ebean.metric:io.ebean.util:io.ebean.config.properties:io.ebean.config.dbplatform
- true
- src/main/java/com/avaje/ebean/overview.html
-
-
-
- attach-javadocs
-
- jar
-
-
-
-
diff --git a/ebean-core/src/main/java/io/ebeaninternal/api/LoadManyBuffer.java b/ebean-core/src/main/java/io/ebeaninternal/api/LoadManyBuffer.java
index ccd7e9c88..70199947e 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/api/LoadManyBuffer.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/api/LoadManyBuffer.java
@@ -43,5 +43,4 @@ public interface LoadManyBuffer {
void configureQuery(SpiQuery> query);
- boolean isUseDocStore();
}
diff --git a/ebean-core/src/main/java/io/ebeaninternal/api/LoadManyRequest.java b/ebean-core/src/main/java/io/ebeaninternal/api/LoadManyRequest.java
index 248892d9c..b0fc6e16a 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/api/LoadManyRequest.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/api/LoadManyRequest.java
@@ -99,7 +99,7 @@ public final class LoadManyRequest extends LoadRequest {
query.where().raw(extraWhere.replace("${ta}", "t0").replace("${mta}", "int_"));
}
query.setLazyLoadForParents(many);
- many.addWhereParentIdIn(query, parentIdList(server), loadContext.isUseDocStore());
+ many.addWhereParentIdIn(query, parentIdList(server));
query.setPersistenceContext(loadContext.persistenceContext());
query.setLoadDescription(lazy ? "+lazy" : "+query", description());
if (lazy) {
diff --git a/ebean-core/src/main/java/io/ebeaninternal/api/SpiEbeanServer.java b/ebean-core/src/main/java/io/ebeaninternal/api/SpiEbeanServer.java
index 2e790ebe1..e4ed3a2f8 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/api/SpiEbeanServer.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/api/SpiEbeanServer.java
@@ -99,11 +99,6 @@ public interface SpiEbeanServer extends SpiServer, ExtendedServer, BeanCollectio
*/
BeanDescriptor> descriptorById(String className);
- /**
- * Return BeanDescriptor using it's unique doc store queueId.
- */
- BeanDescriptor> descriptorByQueueId(String queueId);
-
/**
* Return BeanDescriptors mapped to this table.
*/
diff --git a/ebean-core/src/main/java/io/ebeaninternal/api/SpiExpression.java b/ebean-core/src/main/java/io/ebeaninternal/api/SpiExpression.java
index 030042d96..e4d85aa0e 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/api/SpiExpression.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/api/SpiExpression.java
@@ -3,9 +3,6 @@ package io.ebeaninternal.api;
import io.ebean.Expression;
import io.ebean.event.BeanQueryRequest;
import io.ebeaninternal.server.deploy.BeanDescriptor;
-import io.ebeaninternal.server.expression.DocQueryContext;
-
-import java.io.IOException;
/**
@@ -21,16 +18,6 @@ public interface SpiExpression extends Expression {
*/
void simplify();
- /**
- * Write the expression as an elastic search expression.
- */
- void writeDocQuery(DocQueryContext context) throws IOException;
-
- /**
- * Return the nested path for this expression.
- */
- String nestedPath(BeanDescriptor> desc);
-
/**
* Process "Many" properties populating ManyWhereJoins.
*
diff --git a/ebean-core/src/main/java/io/ebeaninternal/api/SpiExpressionList.java b/ebean-core/src/main/java/io/ebeaninternal/api/SpiExpressionList.java
index 15fa906f6..3bf9d26a9 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/api/SpiExpressionList.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/api/SpiExpressionList.java
@@ -2,7 +2,6 @@ package io.ebeaninternal.api;
import io.ebean.ExpressionList;
import io.ebean.Junction;
-import io.ebeaninternal.server.expression.DocQueryContext;
import java.io.IOException;
import java.util.List;
@@ -32,11 +31,6 @@ public interface SpiExpressionList extends ExpressionList, SpiExpression {
*/
boolean isEmpty();
- /**
- * Write the top level where expressions taking into account possible extra idEquals expression.
- */
- void writeDocQuery(DocQueryContext context, SpiExpression idEquals) throws IOException;
-
/**
* Apply firstRow maxRows limits on the filterMany query.
*/
diff --git a/ebean-core/src/main/java/io/ebeaninternal/api/SpiJunction.java b/ebean-core/src/main/java/io/ebeaninternal/api/SpiJunction.java
index 59bc0cc06..78c32925e 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/api/SpiJunction.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/api/SpiJunction.java
@@ -1,17 +1,10 @@
package io.ebeaninternal.api;
import io.ebean.Junction;
-import io.ebeaninternal.server.expression.DocQueryContext;
-
-import java.io.IOException;
/**
* SPI methods for Junction.
*/
public interface SpiJunction extends Junction {
- /**
- * Write the Junction taking into account it is implied.
- */
- void writeDocQueryJunction(DocQueryContext context) throws IOException;
}
diff --git a/ebean-core/src/main/java/io/ebeaninternal/api/SpiQuery.java b/ebean-core/src/main/java/io/ebeaninternal/api/SpiQuery.java
index b8b0a37a2..d8f1bcd47 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/api/SpiQuery.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/api/SpiQuery.java
@@ -285,17 +285,6 @@ public interface SpiQuery extends Query, SpiQueryFetch, TxnProfileEventCod
*/
SpiRawSql rawSql();
- /**
- * Return true if this query should be executed against the doc store.
- */
- boolean isUseDocStore();
-
- /**
- * For doc store query return the document index name to search against.
- * This is for partitioned indexes (like daily logstash indexes etc).
- */
- String getDocIndexName();
-
/**
* Return the PersistenceContextScope that this query should use.
*
@@ -498,11 +487,6 @@ public interface SpiQuery extends Query, SpiQueryFetch, TxnProfileEventCod
*/
NaturalKeyBindParam naturalKeyBindParam();
- /**
- * Prepare the query for docstore execution with nested paths.
- */
- void prepareDocNested();
-
/**
* Set the query to be a delete query.
*/
@@ -708,11 +692,6 @@ public interface SpiQuery extends Query, SpiQueryFetch, TxnProfileEventCod
*/
SpiExpressionList havingExpressions();
- /**
- * Return the text expressions.
- */
- SpiExpressionList textExpression();
-
/**
* Returns true if either firstRow or maxRows has been set.
*/
diff --git a/ebean-core/src/main/java/io/ebeaninternal/api/SpiTransaction.java b/ebean-core/src/main/java/io/ebeaninternal/api/SpiTransaction.java
index fef9853c8..a024119ab 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/api/SpiTransaction.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/api/SpiTransaction.java
@@ -9,7 +9,6 @@ import io.ebeaninternal.server.core.PersistDeferredRelationship;
import io.ebeaninternal.server.core.PersistRequestBean;
import io.ebeaninternal.server.persist.BatchControl;
import io.ebeaninternal.server.transaction.ProfileStream;
-import io.ebeanservice.docstore.api.DocStoreTransaction;
import jakarta.persistence.PersistenceException;
import java.sql.Connection;
@@ -103,19 +102,6 @@ public interface SpiTransaction extends Transaction {
*/
Boolean isUpdateAllLoadedProperties();
- /**
- * Return the batchSize specifically set for this transaction or 0.
- *
- * Returning 0 implies to use the system wide default batch size.
- */
- DocStoreMode docStoreMode();
-
- /**
- * Return the batch size to us for ElasticSearch Bulk API calls
- * as a result of this transaction.
- */
- int getDocStoreBatchSize();
-
/**
* Return the batchSize specifically set for this transaction or 0.
*
@@ -287,11 +273,6 @@ public interface SpiTransaction extends Transaction {
*/
void sendChangeLog(ChangeSet changeSet);
- /**
- * Return a document store transaction.
- */
- DocStoreTransaction docStoreTransaction();
-
/**
* Set the current Tenant Id.
*/
diff --git a/ebean-core/src/main/java/io/ebeaninternal/api/SpiTransactionProxy.java b/ebean-core/src/main/java/io/ebeaninternal/api/SpiTransactionProxy.java
index 28a29cb59..73694c546 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/api/SpiTransactionProxy.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/api/SpiTransactionProxy.java
@@ -2,14 +2,12 @@ package io.ebeaninternal.api;
import io.ebean.ProfileLocation;
import io.ebean.TransactionCallback;
-import io.ebean.annotation.DocStoreMode;
import io.ebean.event.changelog.BeanChange;
import io.ebean.event.changelog.ChangeSet;
import io.ebeaninternal.server.core.PersistDeferredRelationship;
import io.ebeaninternal.server.core.PersistRequestBean;
import io.ebeaninternal.server.persist.BatchControl;
import io.ebeaninternal.server.transaction.ProfileStream;
-import io.ebeanservice.docstore.api.DocStoreTransaction;
import jakarta.persistence.PersistenceException;
import java.sql.Connection;
@@ -112,32 +110,6 @@ public abstract class SpiTransactionProxy implements SpiTransaction {
return transaction.tenantId();
}
- @Override
- public DocStoreTransaction docStoreTransaction() {
- return transaction.docStoreTransaction();
- }
-
- @Override
- public DocStoreMode docStoreMode() {
- return transaction.docStoreMode();
- }
-
- @Override
- public void setDocStoreMode(DocStoreMode mode) {
- transaction.setDocStoreMode(mode);
- }
-
- @Override
- public int getDocStoreBatchSize() {
- return transaction.getDocStoreBatchSize();
- }
-
- @Override
- public void setDocStoreBatchSize(int batchSize) {
- transaction.setDocStoreBatchSize(batchSize);
- }
-
-
@Override
public boolean isLogSql() {
return transaction.isLogSql();
diff --git a/ebean-core/src/main/java/io/ebeaninternal/api/TransactionEvent.java b/ebean-core/src/main/java/io/ebeaninternal/api/TransactionEvent.java
index c1fc45f30..538bdafc9 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/api/TransactionEvent.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/api/TransactionEvent.java
@@ -6,7 +6,6 @@ import io.ebeaninternal.server.deploy.BeanDescriptor;
import io.ebeaninternal.server.deploy.BeanDescriptorManager;
import io.ebeaninternal.server.transaction.DeleteByIdMap;
import io.ebeaninternal.server.transaction.TransactionManager;
-import io.ebeanservice.docstore.api.DocStoreUpdates;
import java.io.Serializable;
import java.util.ArrayList;
@@ -125,18 +124,6 @@ public final class TransactionEvent implements Serializable {
return changeSet;
}
- /**
- * Add any relevant PersistRequestBean's to DocStoreUpdates for later processing.
- */
- public void addDocStoreUpdates(DocStoreUpdates docStoreUpdates) {
- List> requests = listenerNotify();
- if (requests != null) {
- for (PersistRequestBean> persistRequestBean : requests) {
- persistRequestBean.addDocStoreUpdates(docStoreUpdates);
- }
- }
- }
-
/**
* Return the CacheChangeSet that we add cache notification messages to.
*
diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/core/DefaultContainer.java b/ebean-core/src/main/java/io/ebeaninternal/server/core/DefaultContainer.java
index 61ea94bf7..daef46abf 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/server/core/DefaultContainer.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/server/core/DefaultContainer.java
@@ -78,16 +78,12 @@ public final class DefaultContainer implements SpiContainer {
BootupClasses bootupClasses = bootupClasses(config);
boolean online = true;
- if (config.isDocStoreOnly()) {
- config.setDatabasePlatform(new DatabasePlatform());
- } else {
- TenantMode tenantMode = config.getTenantMode();
- if (TenantMode.DB != tenantMode) {
- setDataSource(config);
- if (!tenantMode.isDynamicDataSource()) {
- // check the autoCommit and Transaction Isolation
- online = checkDataSource(config);
- }
+ TenantMode tenantMode = config.getTenantMode();
+ if (TenantMode.DB != tenantMode) {
+ setDataSource(config);
+ if (!tenantMode.isDynamicDataSource()) {
+ // check the autoCommit and Transaction Isolation
+ online = checkDataSource(config);
}
}
diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/core/DefaultServer.java b/ebean-core/src/main/java/io/ebeaninternal/server/core/DefaultServer.java
index 0226adfc5..554b96b34 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/server/core/DefaultServer.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/server/core/DefaultServer.java
@@ -40,7 +40,6 @@ import io.ebeaninternal.server.transaction.RemoteTransactionEvent;
import io.ebeaninternal.server.transaction.TransactionManager;
import io.ebeaninternal.util.ParamTypeHelper;
import io.ebeaninternal.util.ParamTypeHelper.TypeInfo;
-import io.ebeanservice.docstore.api.DocStoreIntegration;
import jakarta.persistence.EntityNotFoundException;
import jakarta.persistence.NonUniqueResultException;
@@ -99,7 +98,6 @@ public final class DefaultServer implements SpiServer, SpiEbeanServer {
private final DefaultBeanLoader beanLoader;
private final EncryptKeyManager encryptKeyManager;
private final SpiJsonContext jsonContext;
- private final DocumentStore documentStore;
private final MetaInfoManager metaInfoManager;
private final CurrentTenantProvider currentTenantProvider;
private final SpiLogManager logManager;
@@ -146,9 +144,7 @@ public final class DefaultServer implements SpiServer, SpiEbeanServer {
this.dataTimeZone = config.getDataTimeZone();
this.clockService = config.getClockService();
- DocStoreIntegration docStoreComponents = config.createDocStoreIntegration(this);
- this.transactionManager = config.createTransactionManager(this, docStoreComponents.updateProcessor());
- this.documentStore = docStoreComponents.documentStore();
+ this.transactionManager = config.createTransactionManager(this);
this.queryPlanManager = config.initQueryPlanManager(transactionManager);
this.metaInfoManager = new DefaultMetaInfoManager(this, this.config.getMetricNaming());
this.serverPlugins = config.getPlugins();
@@ -182,9 +178,7 @@ public final class DefaultServer implements SpiServer, SpiEbeanServer {
* Execute all the plugins with an online flag indicating the DB is up or not.
*/
public void executePlugins(boolean online) {
- if (!config.isDocStoreOnly()) {
- ddlGenerator.execute(online);
- }
+ ddlGenerator.execute(online);
for (Plugin plugin : serverPlugins) {
plugin.online(online);
}
@@ -992,9 +986,6 @@ public final class DefaultServer implements SpiServer, SpiEbeanServer {
}
SpiOrmQueryRequest request = buildQueryRequest(query);
request.prepareQuery();
- if (request.isUseDocStore()) {
- return docStore().find(request);
- }
try {
request.initTransIfRequired();
return (T) request.findId();
@@ -1282,9 +1273,6 @@ public final class DefaultServer implements SpiServer, SpiEbeanServer {
if (maxRows == 0) {
throw new PersistenceException("maxRows must be specified for findPagedList() query");
}
- if (query.isUseDocStore()) {
- return docStore().findPagedList(createQueryRequest(Type.LIST, query));
- }
return new LimitOffsetPagedList<>(this, query);
}
@@ -1312,10 +1300,6 @@ public final class DefaultServer implements SpiServer, SpiEbeanServer {
@Override
public void findEach(SpiQuery query, Consumer consumer) {
SpiOrmQueryRequest request = createQueryRequest(Type.ITERATE, query);
- if (request.isUseDocStore()) {
- docStore().findEach(request, consumer);
- return;
- }
request.initTransIfRequired();
request.findEach(consumer);
// no try finally - findEach guarantee's cleanup of the transaction if required
@@ -1324,10 +1308,6 @@ public final class DefaultServer implements SpiServer, SpiEbeanServer {
@Override
public void findEach(SpiQuery query, int batch, Consumer> consumer) {
SpiOrmQueryRequest request = createQueryRequest(Type.ITERATE, query);
-// if (request.isUseDocStore()) {
-// docStore().findEach(request, consumer);
-// return;
-// }
request.initTransIfRequired();
request.findEach(batch, consumer);
// no try finally - findEach guarantee's cleanup of the transaction if required
@@ -1336,10 +1316,6 @@ public final class DefaultServer implements SpiServer, SpiEbeanServer {
@Override
public void findEachWhile(SpiQuery query, Predicate consumer) {
SpiOrmQueryRequest request = createQueryRequest(Type.ITERATE, query);
- if (request.isUseDocStore()) {
- docStore().findEachWhile(request, consumer);
- return;
- }
request.initTransIfRequired();
request.findEachWhile(consumer);
// no try finally - findEachWhile guarantee's cleanup of the transaction if required
@@ -1374,9 +1350,6 @@ public final class DefaultServer implements SpiServer, SpiEbeanServer {
if (result != null) {
return (List) result;
}
- if (request.isUseDocStore()) {
- return docStore().findList(request);
- }
try {
request.initTransIfRequired();
return request.findList();
@@ -1944,16 +1917,6 @@ public final class DefaultServer implements SpiServer, SpiEbeanServer {
return descriptorManager.beanTypes(tableName);
}
- @Override
- public BeanType> beanTypeForQueueId(String queueId) {
- return descriptorByQueueId(queueId);
- }
-
- @Override
- public BeanDescriptor> descriptorByQueueId(String queueId) {
- return descriptorManager.descriptorByQueueId(queueId);
- }
-
/**
* Return the SPI bean types for the given bean class.
*/
@@ -2060,11 +2023,6 @@ public final class DefaultServer implements SpiServer, SpiEbeanServer {
return callStackFactory.createCallOrigin();
}
- @Override
- public DocumentStore docStore() {
- return documentStore;
- }
-
@Override
public JsonContext json() {
// immutable thread safe so return shared instance
diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/core/InternalConfiguration.java b/ebean-core/src/main/java/io/ebeaninternal/server/core/InternalConfiguration.java
index 578586b0c..611d9ce91 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/server/core/InternalConfiguration.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/server/core/InternalConfiguration.java
@@ -46,10 +46,6 @@ import io.ebeaninternal.server.json.DJsonContext;
import io.ebeaninternal.server.transaction.*;
import io.ebeaninternal.server.type.DefaultTypeManager;
import io.ebeaninternal.server.type.TypeManager;
-import io.ebeanservice.docstore.api.DocStoreFactory;
-import io.ebeanservice.docstore.api.DocStoreIntegration;
-import io.ebeanservice.docstore.api.DocStoreUpdateProcessor;
-import io.ebeanservice.docstore.none.NoneDocStoreFactory;
import java.util.*;
@@ -85,7 +81,6 @@ public final class InternalConfiguration {
private final ExpressionFactory expressionFactory;
private final SpiBackgroundExecutor backgroundExecutor;
private final JsonFactory jsonFactory;
- private final DocStoreFactory docStoreFactory;
private final List plugins = new ArrayList<>();
private final MultiValueBind multiValueBind;
private final SpiLogManager logManager;
@@ -102,7 +97,6 @@ public final class InternalConfiguration {
this.clockService = new ClockService(config.getClock());
this.tableModState = new TableModState();
this.logManager = initLogManager();
- this.docStoreFactory = initDocStoreFactory(service(DocStoreFactory.class));
this.jsonFactory = config.getJsonFactory();
this.clusterManager = clusterManager;
this.backgroundExecutor = backgroundExecutor;
@@ -159,17 +153,6 @@ public final class InternalConfiguration {
return new DefaultExpressionFactory(config.isExpressionEqualsWithNullAsNoop(), nativeIlike);
}
- private DocStoreFactory initDocStoreFactory(DocStoreFactory service) {
- return service == null ? new NoneDocStoreFactory() : service;
- }
-
- /**
- * Return the doc store factory.
- */
- public DocStoreFactory getDocStoreFactory() {
- return docStoreFactory;
- }
-
ClockService getClockService() {
return clockService;
}
@@ -337,29 +320,19 @@ public final class InternalConfiguration {
return new GeneratedPropertyFactory(offlineMode, config, bootupClasses.getIdGenerators());
}
- /**
- * Create the DocStoreIntegration components for the given server.
- */
- DocStoreIntegration createDocStoreIntegration(SpiServer server) {
- return plugin(docStoreFactory.create(server));
- }
-
/**
* Create the TransactionManager taking into account autoCommit mode.
*/
- TransactionManager createTransactionManager(SpiServer server, DocStoreUpdateProcessor indexUpdateProcessor) {
+ TransactionManager createTransactionManager(SpiServer server) {
TransactionScopeManager scopeManager = createTransactionScopeManager();
boolean notifyL2CacheInForeground = cacheManager.isLocalL2Caching() || config.isNotifyL2CacheInForeground();
TransactionManagerOptions options =
new TransactionManagerOptions(server, notifyL2CacheInForeground, config, scopeManager, clusterManager, backgroundExecutor,
- indexUpdateProcessor, beanDescriptorManager, dataSource(), profileHandler(), logManager,
+ beanDescriptorManager, dataSource(), profileHandler(), logManager,
tableModState, cacheNotify, clockService);
- if (config.isDocStoreOnly()) {
- return new DocStoreTransactionManager(options);
- }
return new TransactionManager(options);
}
diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/core/OrmQueryRequest.java b/ebean-core/src/main/java/io/ebeaninternal/server/core/OrmQueryRequest.java
index c33da65ff..318bb687f 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/server/core/OrmQueryRequest.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/server/core/OrmQueryRequest.java
@@ -116,7 +116,6 @@ public final class OrmQueryRequest extends BeanRequest implements SpiOrmQuery
return server.databasePlatform().escapeLikeString(value);
}
- @Override
public void executeSecondaryQueries(boolean forEach) {
// disable lazy loading leaves loadContext null
if (loadContext != null) {
@@ -157,11 +156,6 @@ public final class OrmQueryRequest extends BeanRequest implements SpiOrmQuery
return loadContext;
}
- @Override
- public boolean isUseDocStore() {
- return query.isUseDocStore();
- }
-
/**
* Run BeanQueryAdapter preQuery() if needed.
*/
@@ -257,23 +251,6 @@ public final class OrmQueryRequest extends BeanRequest implements SpiOrmQuery
}
}
- /**
- * Return the JsonReadOptions taking into account lazy loading and persistence context.
- */
- @Override
- public JsonReadOptions createJsonReadOptions() {
- persistenceContext = persistenceContext(query, transaction);
- if (query.persistenceContext() == null) {
- query.setPersistenceContext(persistenceContext);
- }
- JsonReadOptions jsonRead = new JsonReadOptions();
- jsonRead.setPersistenceContext(persistenceContext);
- if (!query.isDisableLazyLoading()) {
- loadContext = new DLoadContext(this, secondaryQueries);
- jsonRead.setLoadContext(loadContext);
- }
- return jsonRead;
- }
/**
* Get the TransactionContext either explicitly set on the query or
diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/core/PersistRequestBean.java b/ebean-core/src/main/java/io/ebeaninternal/server/core/PersistRequestBean.java
index a4f1dd42f..0d53e5fd9 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/server/core/PersistRequestBean.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/server/core/PersistRequestBean.java
@@ -16,9 +16,6 @@ import io.ebeaninternal.server.deploy.generatedproperty.GeneratedProperty;
import io.ebeaninternal.server.deploy.id.ImportedId;
import io.ebeaninternal.server.persist.*;
import io.ebeaninternal.server.transaction.BeanPersistIdMap;
-import io.ebeanservice.docstore.api.DocStoreUpdate;
-import io.ebeanservice.docstore.api.DocStoreUpdateContext;
-import io.ebeanservice.docstore.api.DocStoreUpdates;
import jakarta.persistence.EntityNotFoundException;
import jakarta.persistence.OptimisticLockException;
@@ -30,7 +27,7 @@ import java.util.*;
/**
* PersistRequest for insert update or delete of a bean.
*/
-public final class PersistRequestBean extends PersistRequest implements BeanPersistRequest, DocStoreUpdate, PreGetterCallback, SpiProfileTransactionEvent {
+public final class PersistRequestBean extends PersistRequest implements BeanPersistRequest, PreGetterCallback, SpiProfileTransactionEvent {
private final BeanManager beanManager;
private final BeanDescriptor beanDescriptor;
@@ -46,7 +43,6 @@ public final class PersistRequestBean extends PersistRequest implements BeanP
private final boolean dirty;
private int flags;
private boolean saveRecurse;
- private DocStoreMode docStoreMode;
private final ConcurrencyMode concurrencyMode;
/**
* The unique id used for logging summary.
@@ -136,7 +132,6 @@ public final class PersistRequestBean extends PersistRequest implements BeanP
this.parentBean = parentBean;
this.controller = beanDescriptor.persistController();
this.type = type;
- this.docStoreMode = calcDocStoreMode(transaction, type);
this.flags = flags;
if (Flags.isRecurse(flags)) {
this.persistCascade = t.isPersistCascade();
@@ -180,17 +175,6 @@ public final class PersistRequestBean extends PersistRequest implements BeanP
profileBase(type.profileEventId, offset, beanDescriptor.name(), flushCount);
}
- /**
- * Return the document store event that should be used for this request.
- *
- * Used to check if the Transaction has set the mode to IGNORE when doing large batch inserts that we
- * don't want to send to the doc store.
- */
- private DocStoreMode calcDocStoreMode(SpiTransaction txn, Type type) {
- DocStoreMode txnMode = (txn == null) ? null : txn.docStoreMode();
- return beanDescriptor.docStoreMode(type, txnMode);
- }
-
@Override
public boolean isCascade() {
return Flags.isRecurse(flags);
@@ -210,9 +194,7 @@ public final class PersistRequestBean extends PersistRequest implements BeanP
* Init the transaction and also check for batch on cascade escalation.
*/
public void initTransIfRequiredWithBatchCascade() {
- if (createImplicitTransIfRequired()) {
- docStoreMode = calcDocStoreMode(transaction, type);
- }
+ createImplicitTransIfRequired();
checkBatchEscalationOnCascade();
}
@@ -412,15 +394,9 @@ public final class PersistRequestBean extends PersistRequest implements BeanP
* Return true if this change should notify persist listener or doc store (and keep the request).
*/
private boolean isNotifyListeners() {
- return isNotifyPersistListener() || isDocStoreNotify();
+ return isNotifyPersistListener();
}
- /**
- * Return true if this request should update the document store.
- */
- private boolean isDocStoreNotify() {
- return docStoreMode != DocStoreMode.IGNORE;
- }
private boolean isNotifyPersistListener() {
return beanPersistListener != null;
@@ -448,46 +424,6 @@ public final class PersistRequestBean extends PersistRequest implements BeanP
}
}
- /**
- * Process the persist request updating the document store.
- */
- @Override
- public void docStoreUpdate(DocStoreUpdateContext txn) throws IOException {
- switch (type) {
- case INSERT:
- beanDescriptor.docStoreInsert(idValue, this, txn);
- break;
- case UPDATE:
- case DELETE_SOFT:
- beanDescriptor.docStoreUpdate(idValue, this, txn);
- break;
- case DELETE:
- beanDescriptor.docStoreDeleteById(idValue, txn);
- break;
- default:
- throw new IllegalStateException("Invalid type " + type);
- }
- }
-
- /**
- * Add this event to the queue entries in IndexUpdates.
- */
- @Override
- public void addToQueue(DocStoreUpdates docStoreUpdates) {
- switch (type) {
- case INSERT:
- case UPDATE:
- case DELETE_SOFT:
- docStoreUpdates.queueIndex(beanDescriptor.docStoreQueueId(), idValue);
- break;
- case DELETE:
- docStoreUpdates.queueDelete(beanDescriptor.docStoreQueueId(), idValue);
- break;
- default:
- throw new IllegalStateException("Invalid type " + type);
- }
- }
-
public void addToPersistMap(BeanPersistIdMap beanPersistMap) {
beanPersistMap.add(beanDescriptor, type, idValue);
}
@@ -821,7 +757,7 @@ public final class PersistRequestBean extends PersistRequest implements BeanP
}
setNotifyCache();
boolean isChangeLog = beanDescriptor.isChangeLog();
- if (type == Type.UPDATE && (isChangeLog || notifyCache || docStoreMode == DocStoreMode.UPDATE)) {
+ if (type == Type.UPDATE && (isChangeLog || notifyCache)) {
// get the dirty properties for update notification to the doc store
dirtyProperties = intercept.dirtyProperties();
}
@@ -1030,32 +966,6 @@ public final class PersistRequestBean extends PersistRequest implements BeanP
}
}
- /**
- * For requests that update document store add this event to either the list
- * of queue events or list of update events.
- */
- public void addDocStoreUpdates(DocStoreUpdates docStoreUpdates) {
- if (type == Type.UPDATE) {
- beanDescriptor.docStoreUpdateEmbedded(this, docStoreUpdates);
- }
- switch (docStoreMode) {
- case UPDATE: {
- docStoreUpdates.addPersist(this);
- return;
- }
- case QUEUE: {
- if (type == Type.DELETE) {
- docStoreUpdates.queueDelete(beanDescriptor.docStoreQueueId(), idValue);
- } else {
- docStoreUpdates.queueIndex(beanDescriptor.docStoreQueueId(), idValue);
- }
- }
- break;
- default:
- break;
- }
- }
-
/**
* Determine if all loaded properties should be used for an update.
*
@@ -1173,30 +1083,6 @@ public final class PersistRequestBean extends PersistRequest implements BeanP
return 0;
}
- /**
- * Persist to the document store now (via buffer, not post commit).
- */
- public void docStorePersist() {
- idValue = beanDescriptor.getId(entityBean);
- if (type == Type.UPDATE) {
- dirtyProperties = intercept.dirtyProperties();
- }
- // processing now so set IGNORE (unlike DB + DocStore processing with post-commit)
- docStoreMode = DocStoreMode.IGNORE;
- try {
- docStoreUpdate(transaction.docStoreTransaction().obtain());
- postExecute();
- if (type == Type.UPDATE
- && beanDescriptor.isDocStoreEmbeddedInvalidation()
- && transaction.isPersistCascade()) {
- // queue embedded/nested updates for later processing
- beanDescriptor.docStoreUpdateEmbedded(this, transaction.docStoreTransaction().queue());
- }
- } catch (IOException e) {
- throw new PersistenceException("Error persisting doc store bean", e);
- }
- }
-
/**
* Use a common 'now' value across both when created and when updated etc.
*/
diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/core/SpiOrmQueryRequest.java b/ebean-core/src/main/java/io/ebeaninternal/server/core/SpiOrmQueryRequest.java
index e81da64f5..7ed38524d 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/server/core/SpiOrmQueryRequest.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/server/core/SpiOrmQueryRequest.java
@@ -5,7 +5,6 @@ import io.ebean.Version;
import io.ebean.event.BeanQueryRequest;
import io.ebeaninternal.api.SpiQuery;
import io.ebeaninternal.server.deploy.BeanDescriptor;
-import io.ebeanservice.docstore.api.DocQueryRequest;
import java.util.Collection;
import java.util.List;
@@ -17,7 +16,7 @@ import java.util.function.Predicate;
/**
* Defines the ORM query request api.
*/
-public interface SpiOrmQueryRequest extends BeanQueryRequest, DocQueryRequest {
+public interface SpiOrmQueryRequest extends BeanQueryRequest {
/**
* Return the query.
@@ -178,11 +177,6 @@ public interface SpiOrmQueryRequest extends BeanQueryRequest, DocQueryRequ
*/
void markNotQueryOnly();
- /**
- * Return true if this query is expected to use the doc store.
- */
- boolean isUseDocStore();
-
/**
* Return true if delete by statement is allowed for this type given cascade rules etc.
*/
diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanDescriptor.java b/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanDescriptor.java
index eb6c79883..201a5c062 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanDescriptor.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanDescriptor.java
@@ -17,7 +17,6 @@ import io.ebean.event.changelog.ChangeType;
import io.ebean.meta.MetaQueryPlan;
import io.ebean.meta.MetricVisitor;
import io.ebean.meta.QueryPlanInit;
-import io.ebean.plugin.BeanDocType;
import io.ebean.plugin.BeanType;
import io.ebean.plugin.ExpressionPath;
import io.ebean.plugin.Property;
@@ -44,12 +43,6 @@ import io.ebeaninternal.server.querydefn.OrmQueryDetail;
import io.ebeaninternal.server.querydefn.OrmQueryProperties;
import io.ebeaninternal.util.SortByClause;
import io.ebeaninternal.util.SortByClauseParser;
-import io.ebeanservice.docstore.api.DocStoreBeanAdapter;
-import io.ebeanservice.docstore.api.DocStoreUpdateContext;
-import io.ebeanservice.docstore.api.DocStoreUpdates;
-import io.ebeanservice.docstore.api.mapping.DocMappingBuilder;
-import io.ebeanservice.docstore.api.mapping.DocPropertyMapping;
-import io.ebeanservice.docstore.api.mapping.DocumentMapping;
import jakarta.persistence.PersistenceException;
import java.io.IOException;
@@ -210,12 +203,8 @@ public class BeanDescriptor implements BeanType, STreeType, SpiBeanType {
private final String name;
private final String baseTableAlias;
private final boolean cacheSharableBeans;
- private final String docStoreQueueId;
private final BeanDescriptorCacheHelp cacheHelp;
private final BeanDescriptorJsonHelp jsonHelp;
- private DocStoreBeanAdapter docStoreAdapter;
- private DocumentMapping docMapping;
- private boolean docStoreEmbeddedInvalidation;
private final String defaultSelectClause;
private SpiEbeanServer ebeanServer;
@@ -297,8 +286,6 @@ public class BeanDescriptor implements BeanType, STreeType, SpiBeanType {
this.cacheSharableBeans = noRelationships && deploy.getCacheOptions().isReadOnly();
this.cacheHelp = new BeanDescriptorCacheHelp<>(this, owner.cacheManager(), deploy.getCacheOptions(), cacheSharableBeans, propertiesOneImported);
this.jsonHelp = initJsonHelp();
- this.docStoreAdapter = owner.createDocStoreBeanAdapter(this, deploy);
- this.docStoreQueueId = docStoreAdapter.queueId();
// Check if there are no cascade save associated beans ( subject to change
// in initialiseOther()). Note that if we are in an inheritance hierarchy
// then we also need to check every BeanDescriptors in the InheritInfo as
@@ -576,7 +563,6 @@ public class BeanDescriptor implements BeanType, STreeType, SpiBeanType {
}
}
}
- docStoreEmbeddedInvalidation = docStoreAdapter.hasEmbeddedInvalidation();
}
private void addUniqueColumns(IndexDefinition indexDef) {
@@ -612,11 +598,6 @@ public class BeanDescriptor implements BeanType, STreeType, SpiBeanType {
for (BeanPropertyAssocOne> one : propertiesOne) {
one.initialisePostTarget();
}
- if (inheritInfo != null && !inheritInfo.isRoot()) {
- docStoreAdapter = (DocStoreBeanAdapter) inheritInfo.getRoot().desc().docStoreAdapter();
- }
- docMapping = docStoreAdapter.createDocMapping();
- docStoreAdapter.registerPaths();
cacheHelp.deriveNotifyFlags();
}
@@ -903,77 +884,6 @@ public class BeanDescriptor implements BeanType, STreeType, SpiBeanType {
return inheritInfo == null || inheritInfo.isRoot();
}
- /**
- * Return true if this type maps to a root type of a doc store document (not embedded or ignored).
- */
- @Override
- public boolean isDocStoreMapped() {
- return docStoreAdapter.mapped();
- }
-
- /**
- * Return true if this bean type has embedded doc store invalidation.
- */
- public boolean isDocStoreEmbeddedInvalidation() {
- return docStoreEmbeddedInvalidation;
- }
-
- /**
- * Return the queueId used to uniquely identify this type when queuing an index updateAdd.
- */
- @Override
- public String docStoreQueueId() {
- return docStoreQueueId;
- }
-
- @Override
- public DocumentMapping docMapping() {
- return docMapping;
- }
-
- /**
- * Return the doc store helper for this bean type.
- */
- @Override
- public BeanDocType docStore() {
- return docStoreAdapter;
- }
-
- /**
- * Return doc store adapter for internal use for processing persist requests.
- */
- public DocStoreBeanAdapter docStoreAdapter() {
- return docStoreAdapter;
- }
-
- /**
- * Build the Document mapping recursively with the given prefix relative to the root of the document.
- */
- public void docStoreMapping(final DocMappingBuilder mapping, final String prefix) {
- if (prefix != null && idProperty != null) {
- // id property not included in the
- idProperty.docStoreMapping(mapping, prefix);
- }
- if (inheritInfo != null) {
- String discCol = inheritInfo.getDiscriminatorColumn();
- if (Types.VARCHAR == inheritInfo.getDiscriminatorType()) {
- mapping.add(new DocPropertyMapping(discCol, DocPropertyType.ENUM));
- } else {
- mapping.add(new DocPropertyMapping(discCol, DocPropertyType.INTEGER));
- }
- }
- for (BeanProperty prop : propertiesNonTransient) {
- prop.docStoreMapping(mapping, prefix);
- }
- if (inheritInfo != null) {
- inheritInfo.visitChildren(inheritInfo1 -> {
- for (BeanProperty localProperty : inheritInfo1.localProperties()) {
- localProperty.docStoreMapping(mapping, prefix);
- }
- });
- }
- }
-
/**
* Return the root bean type if part of inheritance hierarchy.
*/
@@ -995,33 +905,6 @@ public class BeanDescriptor implements BeanType, STreeType, SpiBeanType {
return name;
}
- /**
- * Return the type of DocStoreMode that should occur for this type of persist request
- * given the transactions requested mode.
- */
- public DocStoreMode docStoreMode(PersistRequest.Type persistType, DocStoreMode txnMode) {
- return docStoreAdapter.mode(persistType, txnMode);
- }
-
- public void docStoreInsert(Object idValue, PersistRequestBean persistRequest, DocStoreUpdateContext bulkUpdate) throws IOException {
- docStoreAdapter.insert(idValue, persistRequest, bulkUpdate);
- }
-
- public void docStoreUpdate(Object idValue, PersistRequestBean persistRequest, DocStoreUpdateContext bulkUpdate) throws IOException {
- docStoreAdapter.update(idValue, persistRequest, bulkUpdate);
- }
-
- /**
- * Check if this update invalidates an embedded part of a doc store document.
- */
- public void docStoreUpdateEmbedded(PersistRequestBean request, DocStoreUpdates docStoreUpdates) {
- docStoreAdapter.updateEmbedded(request, docStoreUpdates);
- }
-
- public void docStoreDeleteById(Object idValue, DocStoreUpdateContext txn) throws IOException {
- docStoreAdapter.deleteById(idValue, txn);
- }
-
/**
* Prepare the query for multi-tenancy check for document store only use.
*/
@@ -1032,9 +915,6 @@ public class BeanDescriptor implements BeanType, STreeType, SpiBeanType {
tenant.addTenant(query, tenantId);
}
}
- if (isDocStoreOnly()) {
- query.setUseDocStore(true);
- }
}
/**
diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanDescriptorManager.java b/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanDescriptorManager.java
index 4ad7ae5d8..a472ca655 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanDescriptorManager.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanDescriptorManager.java
@@ -34,8 +34,6 @@ import io.ebeaninternal.server.properties.BeanPropertiesReader;
import io.ebeaninternal.server.properties.BeanPropertyAccess;
import io.ebeaninternal.server.properties.EnhanceBeanPropertyAccess;
import io.ebeaninternal.server.type.TypeManager;
-import io.ebeanservice.docstore.api.DocStoreBeanAdapter;
-import io.ebeanservice.docstore.api.DocStoreFactory;
import jakarta.persistence.MappedSuperclass;
import jakarta.persistence.PersistenceException;
@@ -77,7 +75,6 @@ public final class BeanDescriptorManager implements BeanDescriptorMap, SpiBeanTy
private final ChangeLogListener changeLogListener;
private final ChangeLogRegister changeLogRegister;
private final ChangeLogPrepare changeLogPrepare;
- private final DocStoreFactory docStoreFactory;
private final MultiValueBind multiValueBind;
private final TypeManager typeManager;
private final BootupClasses bootupClasses;
@@ -85,7 +82,6 @@ public final class BeanDescriptorManager implements BeanDescriptorMap, SpiBeanTy
private final List> elementDescriptors = new ArrayList<>();
private final Map, BeanTable> beanTableMap = new HashMap<>();
private final Map> descMap = new HashMap<>();
- private final Map> descQueueMap = new HashMap<>();
private final Map> beanManagerMap = new HashMap<>();
private final Map>> tableToDescMap = new HashMap<>();
private final Map>> tableToViewDescMap = new HashMap<>();
@@ -119,7 +115,6 @@ public final class BeanDescriptorManager implements BeanDescriptorMap, SpiBeanTy
this.config = config.getConfig();
this.serverName = InternString.intern(this.config.getName());
this.cacheManager = config.getCacheManager();
- this.docStoreFactory = config.getDocStoreFactory();
this.backgroundExecutor = config.getBackgroundExecutor();
this.dataSource = this.config.getDataSource();
this.encryptKeyManager = this.config.getEncryptKeyManager();
@@ -211,15 +206,6 @@ public final class BeanDescriptorManager implements BeanDescriptorMap, SpiBeanTy
return config;
}
- @Override
- public DocStoreBeanAdapter createDocStoreBeanAdapter(BeanDescriptor descriptor, DeployBeanDescriptor deploy) {
- return docStoreFactory.createAdapter(descriptor, deploy);
- }
-
- public BeanDescriptor> descriptorByQueueId(String queueId) {
- return descQueueMap.get(queueId);
- }
-
@Override
public SpiBeanType beanType(Class> entityType) {
return descriptor(entityType);
@@ -553,9 +539,6 @@ public final class BeanDescriptorManager implements BeanDescriptorMap, SpiBeanTy
private void registerDescriptor(DeployBeanInfo> info) {
BeanDescriptor> desc = new BeanDescriptor<>(this, info.getDescriptor());
descMap.put(desc.type().getName(), desc);
- if (desc.isDocStoreMapped()) {
- descQueueMap.put(desc.docStoreQueueId(), desc);
- }
for (BeanPropertyAssocMany> many : desc.propertiesMany()) {
if (many.isElementCollection()) {
elementDescriptors.add(many.elementDescriptor());
diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanDescriptorMap.java b/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanDescriptorMap.java
index e5ba63521..57e6dbeaf 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanDescriptorMap.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanDescriptorMap.java
@@ -7,7 +7,6 @@ import io.ebean.core.type.ScalarType;
import io.ebeaninternal.server.cache.SpiCacheManager;
import io.ebeaninternal.server.deploy.id.IdBinder;
import io.ebeaninternal.server.deploy.meta.DeployBeanDescriptor;
-import io.ebeanservice.docstore.api.DocStoreBeanAdapter;
/**
* Provides a method to find a BeanDescriptor.
@@ -57,11 +56,6 @@ public interface BeanDescriptorMap {
*/
IdBinder createIdBinder(BeanProperty id);
- /**
- * Create a doc store specific adapter for this bean type.
- */
- DocStoreBeanAdapter createDocStoreBeanAdapter(BeanDescriptor descriptor, DeployBeanDescriptor deploy);
-
/**
* Return the scalarType for the given JDBC type.
*/
diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanProperty.java b/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanProperty.java
index 96179ce62..abd738a16 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanProperty.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanProperty.java
@@ -36,10 +36,6 @@ import io.ebeaninternal.server.query.SqlBeanLoad;
import io.ebeaninternal.server.query.SqlJoinType;
import io.ebeaninternal.server.type.*;
import io.ebeaninternal.util.ValueUtil;
-import io.ebeanservice.docstore.api.mapping.DocMappingBuilder;
-import io.ebeanservice.docstore.api.mapping.DocPropertyMapping;
-import io.ebeanservice.docstore.api.mapping.DocPropertyOptions;
-import io.ebeanservice.docstore.api.support.DocStructure;
import jakarta.persistence.PersistenceException;
import java.io.DataInput;
@@ -143,7 +139,6 @@ public class BeanProperty implements ElPropertyValue, Property, STreeProperty {
@SuppressWarnings("rawtypes")
final ScalarType scalarType;
- private final DocPropertyOptions docOptions;
/**
* The length or precision for DB column.
*/
@@ -235,7 +230,6 @@ public class BeanProperty implements ElPropertyValue, Property, STreeProperty {
this.lob = isLobType(dbType);
this.propertyType = deploy.getPropertyType();
this.field = deploy.getField();
- this.docOptions = deploy.getDocPropertyOptions();
this.elPlaceHolder = tableAliasIntern(descriptor, deploy.getElPlaceHolder(), false, null);
this.elPlaceHolderEncrypted = tableAliasIntern(descriptor, deploy.getElPlaceHolder(), dbEncrypted, dbColumn);
this.elPrefix = deploy.getElPrefix();
@@ -326,7 +320,6 @@ public class BeanProperty implements ElPropertyValue, Property, STreeProperty {
this.lob = isLobType(dbType);
this.propertyType = source.type();
this.field = source.field();
- this.docOptions = source.docOptions;
this.unmappedJson = source.unmappedJson;
this.elPrefix = override.replace(source.elPrefix, source.dbColumn);
this.elPlaceHolder = override.replace(source.elPlaceHolder, source.dbColumn);
@@ -1283,15 +1276,6 @@ public class BeanProperty implements ElPropertyValue, Property, STreeProperty {
return name;
}
- /**
- * Append this property to the document store based on includeByDefault setting.
- */
- public void docStoreInclude(boolean includeByDefault, DocStructure docStructure) {
- if (includeByDefault) {
- docStructure.addProperty(name);
- }
- }
-
public boolean isJsonSerialize() {
return jsonSerialize;
}
@@ -1401,24 +1385,6 @@ public class BeanProperty implements ElPropertyValue, Property, STreeProperty {
}
}
- /**
- * Add to the document mapping if this property is included for this index.
- */
- public void docStoreMapping(DocMappingBuilder mapping, String prefix) {
- if (mapping.includesProperty(prefix, name)) {
- DocPropertyType type = scalarType.docType();
- DocPropertyOptions options = docOptions.copy();
- if (isKeywordType(type, options)) {
- type = DocPropertyType.KEYWORD;
- }
- mapping.add(new DocPropertyMapping(name, type, options));
- }
- }
-
- private boolean isKeywordType(DocPropertyType type, DocPropertyOptions docOptions) {
- return type == DocPropertyType.TEXT && (docOptions.isCode() || id || discriminator);
- }
-
public void merge(EntityBean bean, EntityBean existing) {
// do nothing unless Many property
}
diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanPropertyAssoc.java b/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanPropertyAssoc.java
index a2e15e5cd..6598b8dec 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanPropertyAssoc.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanPropertyAssoc.java
@@ -24,9 +24,6 @@ import io.ebeaninternal.server.query.STreePropertyAssoc;
import io.ebeaninternal.server.query.STreeType;
import io.ebeaninternal.server.query.SqlJoinType;
import io.ebeaninternal.server.querydefn.DefaultOrmQuery;
-import io.ebeanservice.docstore.api.mapping.DocMappingBuilder;
-import io.ebeanservice.docstore.api.mapping.DocPropertyMapping;
-import io.ebeanservice.docstore.api.support.DocStructure;
import jakarta.persistence.PersistenceException;
import java.util.ArrayList;
@@ -69,7 +66,6 @@ public abstract class BeanPropertyAssoc extends BeanProperty implements STree
*/
final BeanTable beanTable;
final String mappedBy;
- private final String docStoreDoc;
private final String extraWhere;
private final int fetchPreference;
private boolean saveRecurseSkippable;
@@ -83,7 +79,6 @@ public abstract class BeanPropertyAssoc extends BeanProperty implements STree
this.extraWhere = InternString.intern(deploy.getExtraWhere());
this.beanTable = deploy.getBeanTable();
this.mappedBy = InternString.intern(deploy.getMappedBy());
- this.docStoreDoc = deploy.getDocStoreDoc();
this.tableJoin = new TableJoin(deploy.getTableJoin());
this.targetType = deploy.getTargetType();
this.cascadeInfo = deploy.getCascadeInfo();
@@ -100,7 +95,6 @@ public abstract class BeanPropertyAssoc extends BeanProperty implements STree
extraWhere = source.extraWhere;
beanTable = source.beanTable;
mappedBy = source.mappedBy;
- docStoreDoc = source.docStoreDoc;
targetType = source.targetType;
cascadeInfo = source.cascadeInfo;
fetchPreference = source.fetchPreference;
@@ -310,59 +304,6 @@ public abstract class BeanPropertyAssoc extends BeanProperty implements STree
return extraWhere;
}
- /**
- * Return the elastic search doc for this embedded property.
- */
- private String docStoreDoc() {
- return docStoreDoc;
- }
-
- /**
- * Determine if and how the associated bean is included in the doc store document.
- */
- @Override
- public void docStoreInclude(boolean includeByDefault, DocStructure docStructure) {
- String embeddedDoc = docStoreDoc();
- if (embeddedDoc == null) {
- // not annotated so use include by default
- // which is *ToOne included and *ToMany excluded
- if (includeByDefault) {
- docStoreIncludeByDefault(docStructure.doc());
- }
- } else {
- // explicitly annotated to be included
- if (embeddedDoc.isEmpty()) {
- embeddedDoc = "*";
- }
- // add in a nested way
- PathProperties embDoc = PathProperties.parse(embeddedDoc);
- docStructure.addNested(name, embDoc);
- }
- }
-
- /**
- * Include the property in the document store by default.
- */
- void docStoreIncludeByDefault(PathProperties pathProps) {
- pathProps.addToPath(null, name);
- }
-
- @Override
- public void docStoreMapping(DocMappingBuilder mapping, String prefix) {
- if (mapping.includesPath(prefix, name)) {
- String fullName = SplitName.add(prefix, name);
-
- DocPropertyType type = isMany() ? DocPropertyType.LIST : DocPropertyType.OBJECT;
- DocPropertyMapping nested = new DocPropertyMapping(name, type);
- mapping.push(nested);
- targetDescriptor.docStoreMapping(mapping, fullName);
- mapping.pop();
- if (!nested.children().isEmpty()) {
- mapping.add(nested);
- }
- }
- }
-
/**
* Return true if this association is updateable.
*/
diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanPropertyAssocMany.java b/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanPropertyAssocMany.java
index 59839b7d0..68e6d7e40 100644
--- a/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanPropertyAssocMany.java
+++ b/ebean-core/src/main/java/io/ebeaninternal/server/deploy/BeanPropertyAssocMany.java
@@ -177,11 +177,6 @@ public class BeanPropertyAssocMany extends BeanPropertyAssoc implements ST
return manyToMany && !excludedFromHistory && descriptor.isHistorySupport();
}
- @Override
- protected void docStoreIncludeByDefault(PathProperties pathProps) {
- // by default not including "Many" properties in document store
- }
-
@Override
public void registerColumn(BeanDescriptor> desc, String prefix) {
if (targetDescriptor != null) {
@@ -343,13 +338,8 @@ public class BeanPropertyAssocMany extends BeanPropertyAssoc implements ST
}
}
- public void addWhereParentIdIn(SpiQuery> query, List