ATLAS-1431 Add configuration property to disable full text mapper
Signed-off-by: Jeff Hagelberg <jnhagelberg@us.ibm.com>
This commit is contained in:
parent
03684a0568
commit
db18c82409
|
|
@ -238,4 +238,10 @@ atlas.metric.query.cache.ttlInSecs=900
|
|||
# the specified number of evictions have occurred. If the eviction
|
||||
# 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
|
|||
ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
|
||||
|
||||
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-1510 Consolidate/batch calls to GraphBackedTypeStore.findVertex() (jnhagelb)
|
||||
ATLAS-1388 Cache entities that are created/updated (jnhagelb)
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ import org.apache.atlas.typesystem.types.ObjectGraphWalker;
|
|||
import org.apache.atlas.typesystem.types.TraitType;
|
||||
import org.apache.atlas.typesystem.types.TypeSystem;
|
||||
import org.apache.atlas.typesystem.types.TypeUtils;
|
||||
import org.apache.atlas.util.AtlasRepositoryConfiguration;
|
||||
import org.apache.atlas.utils.MD5Utils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
@ -373,6 +374,11 @@ public final class TypedInstanceToGraphMapper {
|
|||
|
||||
|
||||
private void addFullTextProperty(List<ITypedReferenceableInstance> instances, FullTextMapper fulltextMapper) throws AtlasException {
|
||||
|
||||
if(! AtlasRepositoryConfiguration.isFullTextSearchEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (ITypedReferenceableInstance typedInstance : instances) { // Traverse
|
||||
AtlasVertex instanceVertex = getClassVertex(typedInstance);
|
||||
String fullText = fulltextMapper.mapRecursive(instanceVertex, true);
|
||||
|
|
|
|||
|
|
@ -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 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")
|
||||
public static Class<? extends TypeCache> getTypeCache() {
|
||||
// Get the type cache implementation class from Atlas configuration.
|
||||
|
|
|
|||
Loading…
Reference in New Issue