mirror of
https://github.com/Alfresco/SearchServices.git
synced 2025-09-17 14:21:20 +00:00
SEARCH-2887 Disable FINGERPRINT and Document Cache by default
Cherry pick from eb4ab98
This commit is contained in:
@@ -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
|
||||
|
@@ -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<String> expectedNames = newHashSet();
|
||||
expectedNames.add(fileTaco.getName());
|
16
e2e-test/src/test/resources/SearchFingerprintSuite.xml
Normal file
16
e2e-test/src/test/resources/SearchFingerprintSuite.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
|
||||
|
||||
<suite name="SearchSuite" verbose="6" preserve-order="true">
|
||||
|
||||
<listeners>
|
||||
<listener class-name="org.alfresco.utility.report.log.LogsListener"/>
|
||||
<listener class-name="org.alfresco.utility.report.HtmlReportListener"/>
|
||||
</listeners>
|
||||
|
||||
<test name="E2E-Fingerprint-SearchServices">
|
||||
<packages>
|
||||
<package name="org.alfresco.test.search.functional.searchServices.search.fingerprint" />
|
||||
</packages>
|
||||
</test>
|
||||
|
||||
</suite>
|
@@ -18,6 +18,7 @@
|
||||
<package name="org.alfresco.test.search.functional.searchServices.*">
|
||||
<exclude name="org.alfresco.test.search.functional.searchServices.cmis"/>
|
||||
<exclude name="org.alfresco.test.search.functional.searchServices.search.rm"/>
|
||||
<exclude name="org.alfresco.test.search.functional.searchServices.search.fingerprint"/>
|
||||
</package>
|
||||
</packages>
|
||||
<!-- Despite this class is included in Search Services package, needs to be excluded in order to be executed as the last one -->
|
||||
|
@@ -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
|
||||
#
|
||||
|
Reference in New Issue
Block a user