mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
SEARCH-2548 Query perfomance degradation
Cherry picked from 059f732
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
<properties>
|
||||
<maven.build.sourceVersion>11</maven.build.sourceVersion>
|
||||
<solr.base.version>6.6.5</solr.base.version>
|
||||
<solr.version>${solr.base.version}-patched.2</solr.version>
|
||||
<solr.version>${solr.base.version}-patched.3</solr.version>
|
||||
<!-- The location to download the solr zip file from. -->
|
||||
<!-- <solr.zip>https://archive.apache.org/dist/lucene/solr/${solr.version}/solr-${solr.version}.zip</solr.zip> -->
|
||||
<!-- Solr startup scripts do not work with any Java version higher than 9 so the scripts have been patched -->
|
||||
|
||||
+3
-3
@@ -50,7 +50,7 @@ import static java.util.Optional.ofNullable;
|
||||
* Transform the fieldlist depending on the use of cached transformer:
|
||||
* [cached] -> add to the field list the translations of the fiels to the internal schema notation
|
||||
* otherwise -> modify the field list in order to contains a subset of the following fields:
|
||||
* id, DBID, _version_ and score
|
||||
* id, DBID, and score
|
||||
*/
|
||||
public class RewriteFieldListComponent extends SearchComponent {
|
||||
|
||||
@@ -63,7 +63,7 @@ public class RewriteFieldListComponent extends SearchComponent {
|
||||
{
|
||||
Set<String> fieldListSet = new HashSet<>();
|
||||
|
||||
Set<String> defaultNonCachedFields = Set.of("id","DBID", "_version_");
|
||||
Set<String> defaultNonCachedFields = Set.of("id","DBID");
|
||||
Set<String> allowedNonCachedFields = new HashSet<>(defaultNonCachedFields);
|
||||
allowedNonCachedFields.add("score");
|
||||
|
||||
@@ -79,7 +79,7 @@ public class RewriteFieldListComponent extends SearchComponent {
|
||||
|
||||
|
||||
// In case cache transformer is no set, we need to modify the field list in order return
|
||||
// only id, DBID and _version_ fields
|
||||
// only id, DBID fields
|
||||
if (!cacheTransformer){
|
||||
if (!solrReturnFields.wantsAllFields())
|
||||
{
|
||||
|
||||
+1
-3
@@ -95,12 +95,10 @@ public class AlfrescoFieldMapperTransformerIT extends AbstractAlfrescoDistribute
|
||||
SolrDocumentList results = resp.getResults();
|
||||
assertEquals("Expecting 5 rows",5, results.size());
|
||||
SolrDocument doc = results.get(0);
|
||||
assertEquals(3, doc.size());
|
||||
assertEquals(2, doc.size());
|
||||
assertNotNull(doc);
|
||||
String id = (String) doc.get("id");
|
||||
assertNotNull(id);
|
||||
Long version = (Long) doc.get("_version_");
|
||||
assertNotNull(version);
|
||||
Long dbid = (Long) doc.get("DBID");
|
||||
assertNotNull(dbid);
|
||||
//Not expected to see below as part of the solr response.
|
||||
|
||||
@@ -176,28 +176,28 @@ jul-to-slf4j-1.7.7.jar
|
||||
juniversalchardet-1.0.3.jar
|
||||
langdetect-1.1-20120112.jar
|
||||
log4j-1.2.17.jar
|
||||
lucene-analyzers-common-6.6.5-patched.2.jar
|
||||
lucene-analyzers-icu-6.6.5-patched.2.jar
|
||||
lucene-analyzers-kuromoji-6.6.5-patched.2.jar
|
||||
lucene-analyzers-morfologik-6.6.5-patched.2.jar
|
||||
lucene-analyzers-phonetic-6.6.5-patched.2.jar
|
||||
lucene-analyzers-smartcn-6.6.5-patched.2.jar
|
||||
lucene-analyzers-stempel-6.6.5-patched.2.jar
|
||||
lucene-backward-codecs-6.6.5-patched.2.jar
|
||||
lucene-classification-6.6.5-patched.2.jar
|
||||
lucene-codecs-6.6.5-patched.2.jar
|
||||
lucene-core-6.6.5-patched.2.jar
|
||||
lucene-expressions-6.6.5-patched.2.jar
|
||||
lucene-grouping-6.6.5-patched.2.jar
|
||||
lucene-highlighter-6.6.5-patched.2.jar
|
||||
lucene-join-6.6.5-patched.2.jar
|
||||
lucene-memory-6.6.5-patched.2.jar
|
||||
lucene-misc-6.6.5-patched.2.jar
|
||||
lucene-queries-6.6.5-patched.2.jar
|
||||
lucene-queryparser-6.6.5-patched.2.jar
|
||||
lucene-sandbox-6.6.5-patched.2.jar
|
||||
lucene-spatial-extras-6.6.5-patched.2.jar
|
||||
lucene-suggest-6.6.5-patched.2.jar
|
||||
lucene-analyzers-common-6.6.5-patched.3.jar
|
||||
lucene-analyzers-icu-6.6.5-patched.3.jar
|
||||
lucene-analyzers-kuromoji-6.6.5-patched.3.jar
|
||||
lucene-analyzers-morfologik-6.6.5-patched.3.jar
|
||||
lucene-analyzers-phonetic-6.6.5-patched.3.jar
|
||||
lucene-analyzers-smartcn-6.6.5-patched.3.jar
|
||||
lucene-analyzers-stempel-6.6.5-patched.3.jar
|
||||
lucene-backward-codecs-6.6.5-patched.3.jar
|
||||
lucene-classification-6.6.5-patched.3.jar
|
||||
lucene-codecs-6.6.5-patched.3.jar
|
||||
lucene-core-6.6.5-patched.3.jar
|
||||
lucene-expressions-6.6.5-patched.3.jar
|
||||
lucene-grouping-6.6.5-patched.3.jar
|
||||
lucene-highlighter-6.6.5-patched.3.jar
|
||||
lucene-join-6.6.5-patched.3.jar
|
||||
lucene-memory-6.6.5-patched.3.jar
|
||||
lucene-misc-6.6.5-patched.3.jar
|
||||
lucene-queries-6.6.5-patched.3.jar
|
||||
lucene-queryparser-6.6.5-patched.3.jar
|
||||
lucene-sandbox-6.6.5-patched.3.jar
|
||||
lucene-spatial-extras-6.6.5-patched.3.jar
|
||||
lucene-suggest-6.6.5-patched.3.jar
|
||||
metadata-extractor-2.9.1.jar
|
||||
metrics-core-3.2.2.jar
|
||||
metrics-ganglia-3.2.2.jar
|
||||
@@ -221,11 +221,11 @@ rome-1.5.1.jar
|
||||
simple-xml-2.7.1.jar
|
||||
slf4j-api-1.7.7.jar
|
||||
slf4j-log4j12-1.7.7.jar
|
||||
solr-analysis-extras-6.6.5-patched.2.jar
|
||||
solr-clustering-6.6.5-patched.2.jar
|
||||
solr-core-6.6.5-patched.2.jar
|
||||
solr-langid-6.6.5-patched.2.jar
|
||||
solr-solrj-6.6.5-patched.2.jar
|
||||
solr-analysis-extras-6.6.5-patched.3.jar
|
||||
solr-clustering-6.6.5-patched.3.jar
|
||||
solr-core-6.6.5-patched.3.jar
|
||||
solr-langid-6.6.5-patched.3.jar
|
||||
solr-solrj-6.6.5-patched.3.jar
|
||||
spatial4j-0.6.jar
|
||||
start.jar
|
||||
stax2-api-3.1.4.jar
|
||||
|
||||
Reference in New Issue
Block a user