Commit db18c824 by Wojciech Wojcik Committed by Jeff Hagelberg

ATLAS-1431 Add configuration property to disable full text mapper

parent 03684a05
...@@ -239,3 +239,9 @@ atlas.metric.query.cache.ttlInSecs=900 ...@@ -239,3 +239,9 @@ atlas.metric.query.cache.ttlInSecs=900
# warning threshold <= 0, no eviction warnings will be issued. # warning threshold <= 0, no eviction warnings will be issued.
#atlas.CompiledQueryCache.evictionWarningThrottle=0 #atlas.CompiledQueryCache.evictionWarningThrottle=0
######### Full Text Search Configuration #########
#Set to false to disable full text search.
#atlas.search.fulltext.enable=true
...@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al ...@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai) ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
ALL CHANGES: ALL CHANGES:
ATLAS-1385 Add configuration property to disable full text mapper (wwojcik via jnhagelb)
ATLAS-746 After updating a set of entities, response contains only the first entity definition (jnhagelb) ATLAS-746 After updating a set of entities, response contains only the first entity definition (jnhagelb)
ATLAS-1510 Consolidate/batch calls to GraphBackedTypeStore.findVertex() (jnhagelb) ATLAS-1510 Consolidate/batch calls to GraphBackedTypeStore.findVertex() (jnhagelb)
ATLAS-1388 Cache entities that are created/updated (jnhagelb) ATLAS-1388 Cache entities that are created/updated (jnhagelb)
......
...@@ -56,6 +56,7 @@ import org.apache.atlas.typesystem.types.ObjectGraphWalker; ...@@ -56,6 +56,7 @@ import org.apache.atlas.typesystem.types.ObjectGraphWalker;
import org.apache.atlas.typesystem.types.TraitType; import org.apache.atlas.typesystem.types.TraitType;
import org.apache.atlas.typesystem.types.TypeSystem; import org.apache.atlas.typesystem.types.TypeSystem;
import org.apache.atlas.typesystem.types.TypeUtils; import org.apache.atlas.typesystem.types.TypeUtils;
import org.apache.atlas.util.AtlasRepositoryConfiguration;
import org.apache.atlas.utils.MD5Utils; import org.apache.atlas.utils.MD5Utils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -373,6 +374,11 @@ public final class TypedInstanceToGraphMapper { ...@@ -373,6 +374,11 @@ public final class TypedInstanceToGraphMapper {
private void addFullTextProperty(List<ITypedReferenceableInstance> instances, FullTextMapper fulltextMapper) throws AtlasException { private void addFullTextProperty(List<ITypedReferenceableInstance> instances, FullTextMapper fulltextMapper) throws AtlasException {
if(! AtlasRepositoryConfiguration.isFullTextSearchEnabled()) {
return;
}
for (ITypedReferenceableInstance typedInstance : instances) { // Traverse for (ITypedReferenceableInstance typedInstance : instances) { // Traverse
AtlasVertex instanceVertex = getClassVertex(typedInstance); AtlasVertex instanceVertex = getClassVertex(typedInstance);
String fullText = fulltextMapper.mapRecursive(instanceVertex, true); String fullText = fulltextMapper.mapRecursive(instanceVertex, true);
......
...@@ -57,6 +57,17 @@ public class AtlasRepositoryConfiguration { ...@@ -57,6 +57,17 @@ public class AtlasRepositoryConfiguration {
private static final Integer DEFAULT_TYPE_UPDATE_LOCK_MAX_WAIT_TIME_IN_SECONDS = Integer.valueOf(15); private static final Integer DEFAULT_TYPE_UPDATE_LOCK_MAX_WAIT_TIME_IN_SECONDS = Integer.valueOf(15);
private static Integer typeUpdateLockMaxWaitTimeInSeconds = null; private static Integer typeUpdateLockMaxWaitTimeInSeconds = null;
private static final String ENABLE_FULLTEXT_SEARCH_PROPERTY = "atlas.search.fulltext.enable";
/**
* Configures whether the full text vertex property is populated. Turning this off
* effectively disables full text searches, since all no entities created or updated after
* turning this off will match full text searches.
*/
public static boolean isFullTextSearchEnabled() throws AtlasException {
return ApplicationProperties.get().getBoolean(ENABLE_FULLTEXT_SEARCH_PROPERTY, true);
}
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static Class<? extends TypeCache> getTypeCache() { public static Class<? extends TypeCache> getTypeCache() {
// Get the type cache implementation class from Atlas configuration. // Get the type cache implementation class from Atlas configuration.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment