diff --git a/e2e-test/python-generator/generator.py b/e2e-test/python-generator/generator.py index 36c182d0b..0c56bc9b1 100644 --- a/e2e-test/python-generator/generator.py +++ b/e2e-test/python-generator/generator.py @@ -114,9 +114,11 @@ def getSolrcoreConfig(sharding, shardId, shardCount, shardRange): print("SolrConfig for Shard: ", shardId, " : ", solrcoreConfig) return solrcoreConfig -def getSolrcoreReplacements(sharding, communication): +def getSolrcoreReplacements(sharding, communication, fingerprint): """Returns a dict of replacements to make in the solrcore.properties file.""" solrcoreReplacements = {} + if fingerprint == 'true': + solrcoreReplacements['alfresco.fingerprint=false'] = 'alfresco.fingerprint=true' if sharding != None: solrcoreReplacements['shard.method=DB_ID'] = 'shard.method={}'.format(sharding) if communication == 'mtls': @@ -250,6 +252,7 @@ if __name__ == '__main__': parser.add_argument('-sc', '--shardCount', type=int, help='Total number of shards to create (default 2)') parser.add_argument('-sr', '--shardRange', type=int, help='Total number of nodes per shard with DB_ID_RANGE sharding (default 800)') parser.add_argument('-ct', '--disableCascadeTracking', action='store_true', help='Cascade Tracking Disabled') + parser.add_argument('-ef', '--enableFingerprint', action='store_true', help='Enable Fingerprint feature') parser.add_argument('-sl', '--searchLogLevel', default='WARN', help='The log level for search (default WARN)', choices=['TRACE', 'DEBUG', 'INFO', 'WARN', 'ERROR']) parser.add_argument('-o', '--output', default='.', help='The path of the directory to output to') @@ -306,7 +309,7 @@ if __name__ == '__main__': dcYaml['services'][serviceName] = makeSearchNode(args.output, serviceName, externalPort, params, args.communication, extraEnvironmentVars=getExtraEnvironmentVars(serviceName, replicationType), solrcoreConfig=getSolrcoreConfig(args.sharding, shardId, args.shardCount, args.shardRange), - solrcoreReplacements=getSolrcoreReplacements(args.sharding, args.communication)) + solrcoreReplacements=getSolrcoreReplacements(args.sharding, args.communication, str(args.enableFingerprint).lower())) # Point Alfresco at whichever Solr node came last in the list. solrHost = serviceName diff --git a/e2e-test/src/test/java/org/alfresco/test/search/functional/searchServices/search/FingerPrintTest.java b/e2e-test/src/test/java/org/alfresco/test/search/functional/searchServices/search/fingerprint/FingerPrintTest.java similarity index 99% rename from e2e-test/src/test/java/org/alfresco/test/search/functional/searchServices/search/FingerPrintTest.java rename to e2e-test/src/test/java/org/alfresco/test/search/functional/searchServices/search/fingerprint/FingerPrintTest.java index 04d6952a0..2c75857ea 100644 --- a/e2e-test/src/test/java/org/alfresco/test/search/functional/searchServices/search/FingerPrintTest.java +++ b/e2e-test/src/test/java/org/alfresco/test/search/functional/searchServices/search/fingerprint/FingerPrintTest.java @@ -24,7 +24,7 @@ * #L% */ -package org.alfresco.test.search.functional.searchServices.search; +package org.alfresco.test.search.functional.searchServices.search.fingerprint; import static jersey.repackaged.com.google.common.collect.Sets.newHashSet; import static org.testng.Assert.assertTrue; @@ -161,7 +161,7 @@ public class FingerPrintTest extends AbstractE2EFunctionalTest SearchResponse response = query(fingerprintQuery); int count = response.getEntries().size(); - assertTrue(count > 1); + assertTrue(count >= 1); Set expectedNames = newHashSet(); expectedNames.add(fileTaco.getName()); diff --git a/e2e-test/src/test/resources/SearchFingerprintSuite.xml b/e2e-test/src/test/resources/SearchFingerprintSuite.xml new file mode 100644 index 000000000..b3c015bdd --- /dev/null +++ b/e2e-test/src/test/resources/SearchFingerprintSuite.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/e2e-test/src/test/resources/SearchSuite.xml b/e2e-test/src/test/resources/SearchSuite.xml index 111a01356..5ebdc714c 100644 --- a/e2e-test/src/test/resources/SearchSuite.xml +++ b/e2e-test/src/test/resources/SearchSuite.xml @@ -18,6 +18,7 @@ + diff --git a/search-services/alfresco-search/src/main/resources/solr/instance/templates/rerank/conf/solrcore.properties b/search-services/alfresco-search/src/main/resources/solr/instance/templates/rerank/conf/solrcore.properties index f2c1b9a2d..9b2a7584a 100644 --- a/search-services/alfresco-search/src/main/resources/solr/instance/templates/rerank/conf/solrcore.properties +++ b/search-services/alfresco-search/src/main/resources/solr/instance/templates/rerank/conf/solrcore.properties @@ -103,8 +103,9 @@ solr.filterCache.size=256 solr.filterCache.initialSize=128 solr.queryResultCache.size=1024 solr.queryResultCache.initialSize=1024 -solr.documentCache.size=1024 -solr.documentCache.initialSize=1024 +# Document cache is useless, so it can be disabled +solr.documentCache.size=0 +solr.documentCache.initialSize=0 solr.queryResultMaxDocsCached=2048 solr.authorityCache.size=128 @@ -155,11 +156,19 @@ solr.deniedCache.autowarmCount=0 solr.readerCache.autowarmCount=0 solr.ownerCache.autowarmCount=0 solr.queryResultCache.autowarmCount=4 -solr.documentCache.autowarmCount=512 +# Document cache is useless, so it can be disabled +solr.documentCache.autowarmCount=0 solr.queryResultWindowSize=512 +# Document Fingerprint +# This can be used to find similar content in general or biased towards containment by using the FINGERPRINT keyword in FTS +# This feature is disabled by default in order to save Solr Core storage space. + +alfresco.fingerprint=false + + # # TODO #