mirror of
				https://github.com/Alfresco/alfresco-community-repo.git
				synced 2025-10-29 15:21:53 +00:00 
			
		
		
		
	Compare commits
	
		
			8 Commits
		
	
	
		
			feature/AC
			...
			23.1.1.3
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 3d9f50add8 | ||
|  | d4a72aa56c | ||
|  | e2a2658895 | ||
|  | 193386e640 | ||
|  | d3dcfd0b6a | ||
|  | b4241eaf90 | ||
|  | d14ba74727 | ||
|  | e2b4e2c020 | 
| @@ -7,7 +7,7 @@ | ||||
|    <parent> | ||||
|       <groupId>org.alfresco</groupId> | ||||
|       <artifactId>alfresco-community-repo-amps</artifactId> | ||||
|       <version>23.1.0.255</version> | ||||
|       <version>23.1.1.3</version> | ||||
|    </parent> | ||||
|  | ||||
|    <modules> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|    <parent> | ||||
|       <groupId>org.alfresco</groupId> | ||||
|       <artifactId>alfresco-governance-services-community-parent</artifactId> | ||||
|       <version>23.1.0.255</version> | ||||
|       <version>23.1.1.3</version> | ||||
|    </parent> | ||||
|  | ||||
|    <modules> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|    <parent> | ||||
|       <groupId>org.alfresco</groupId> | ||||
|       <artifactId>alfresco-governance-services-automation-community-repo</artifactId> | ||||
|       <version>23.1.0.255</version> | ||||
|       <version>23.1.1.3</version> | ||||
|    </parent> | ||||
|  | ||||
|    <build> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|    <parent> | ||||
|       <groupId>org.alfresco</groupId> | ||||
|       <artifactId>alfresco-governance-services-community-parent</artifactId> | ||||
|       <version>23.1.0.255</version> | ||||
|       <version>23.1.1.3</version> | ||||
|    </parent> | ||||
|  | ||||
|    <modules> | ||||
|   | ||||
| @@ -8,7 +8,7 @@ | ||||
|    <parent> | ||||
|       <groupId>org.alfresco</groupId> | ||||
|       <artifactId>alfresco-governance-services-community-repo-parent</artifactId> | ||||
|       <version>23.1.0.255</version> | ||||
|       <version>23.1.1.3</version> | ||||
|    </parent> | ||||
|  | ||||
|    <properties> | ||||
|   | ||||
| @@ -5,7 +5,7 @@ | ||||
| # Version label | ||||
| version.major=23 | ||||
| version.minor=1 | ||||
| version.revision=0 | ||||
| version.revision=1 | ||||
| version.label= | ||||
|  | ||||
| # Edition label | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-governance-services-community-repo-parent</artifactId> | ||||
|         <version>23.1.0.255</version> | ||||
|         <version>23.1.1.3</version> | ||||
|     </parent> | ||||
|  | ||||
|     <build> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo</artifactId> | ||||
|         <version>23.1.0.255</version> | ||||
|         <version>23.1.1.3</version> | ||||
|     </parent> | ||||
|  | ||||
|     <modules> | ||||
|   | ||||
| @@ -8,7 +8,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-amps</artifactId> | ||||
|         <version>23.1.0.255</version> | ||||
|         <version>23.1.1.3</version> | ||||
|     </parent> | ||||
|  | ||||
|     <properties> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|    <parent> | ||||
|       <groupId>org.alfresco</groupId> | ||||
|       <artifactId>alfresco-community-repo</artifactId> | ||||
|       <version>23.1.0.255</version> | ||||
|       <version>23.1.1.3</version> | ||||
|    </parent> | ||||
|  | ||||
|    <dependencies> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo</artifactId> | ||||
|         <version>23.1.0.255</version> | ||||
|         <version>23.1.1.3</version> | ||||
|     </parent> | ||||
|  | ||||
|     <properties> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo</artifactId> | ||||
|         <version>23.1.0.255</version> | ||||
|         <version>23.1.1.3</version> | ||||
|     </parent> | ||||
|  | ||||
|     <dependencies> | ||||
|   | ||||
| @@ -9,6 +9,6 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-packaging</artifactId> | ||||
|         <version>23.1.0.255</version> | ||||
|         <version>23.1.1.3</version> | ||||
|     </parent> | ||||
| </project> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-packaging</artifactId> | ||||
|         <version>23.1.0.255</version> | ||||
|         <version>23.1.1.3</version> | ||||
|     </parent> | ||||
|  | ||||
|     <properties> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo</artifactId> | ||||
|         <version>23.1.0.255</version> | ||||
|         <version>23.1.1.3</version> | ||||
|     </parent> | ||||
|  | ||||
|     <modules> | ||||
|   | ||||
| @@ -6,7 +6,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-packaging</artifactId> | ||||
|         <version>23.1.0.255</version> | ||||
|         <version>23.1.1.3</version> | ||||
|     </parent> | ||||
|  | ||||
|     <modules> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-tests</artifactId> | ||||
|         <version>23.1.0.255</version> | ||||
|         <version>23.1.1.3</version> | ||||
|     </parent> | ||||
|  | ||||
|     <organization> | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-tests</artifactId> | ||||
|         <version>23.1.0.255</version> | ||||
|         <version>23.1.1.3</version> | ||||
|     </parent> | ||||
|  | ||||
|     <developers> | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-tests</artifactId> | ||||
|         <version>23.1.0.255</version> | ||||
|         <version>23.1.1.3</version> | ||||
|     </parent> | ||||
|  | ||||
|     <developers> | ||||
|   | ||||
| @@ -8,7 +8,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-tests</artifactId> | ||||
|         <version>23.1.0.255</version> | ||||
|         <version>23.1.1.3</version> | ||||
|     </parent> | ||||
|  | ||||
|     <properties> | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-tests</artifactId> | ||||
|         <version>23.1.0.255</version> | ||||
|         <version>23.1.1.3</version> | ||||
|     </parent> | ||||
|  | ||||
|     <developers> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo-packaging</artifactId> | ||||
|         <version>23.1.0.255</version> | ||||
|         <version>23.1.1.3</version> | ||||
|     </parent> | ||||
|  | ||||
|     <properties> | ||||
|   | ||||
							
								
								
									
										6
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								pom.xml
									
									
									
									
									
								
							| @@ -2,7 +2,7 @@ | ||||
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||||
|     <modelVersion>4.0.0</modelVersion> | ||||
|     <artifactId>alfresco-community-repo</artifactId> | ||||
|     <version>23.1.0.255</version> | ||||
|     <version>23.1.1.3</version> | ||||
|     <packaging>pom</packaging> | ||||
|     <name>Alfresco Community Repo Parent</name> | ||||
|  | ||||
| @@ -25,7 +25,7 @@ | ||||
|     <properties> | ||||
|         <acs.version.major>23</acs.version.major> | ||||
|         <acs.version.minor>1</acs.version.minor> | ||||
|         <acs.version.revision>0</acs.version.revision> | ||||
|         <acs.version.revision>1</acs.version.revision> | ||||
|         <acs.version.label /> | ||||
|         <amp.min.version>${acs.version.major}.0.0</amp.min.version> | ||||
|  | ||||
| @@ -152,7 +152,7 @@ | ||||
|         <connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection> | ||||
|         <developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection> | ||||
|         <url>https://github.com/Alfresco/alfresco-community-repo</url> | ||||
|         <tag>23.1.0.255</tag> | ||||
|         <tag>23.1.1.3</tag> | ||||
|     </scm> | ||||
|  | ||||
|     <distributionManagement> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo</artifactId> | ||||
|         <version>23.1.0.255</version> | ||||
|         <version>23.1.1.3</version> | ||||
|     </parent> | ||||
|  | ||||
|     <dependencies> | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <parent> | ||||
|         <groupId>org.alfresco</groupId> | ||||
|         <artifactId>alfresco-community-repo</artifactId> | ||||
|         <version>23.1.0.255</version> | ||||
|         <version>23.1.1.3</version> | ||||
|     </parent> | ||||
|  | ||||
|     <dependencies> | ||||
|   | ||||
| @@ -31,6 +31,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; | ||||
| import org.alfresco.model.ContentModel; | ||||
| import org.alfresco.repo.action.executer.ContentMetadataExtracter; | ||||
| import org.alfresco.repo.content.transform.TransformerDebug; | ||||
| import org.alfresco.repo.rendition2.RenditionDefinition2; | ||||
| import org.alfresco.repo.rendition2.RenditionDefinitionRegistry2Impl; | ||||
| import org.alfresco.repo.rendition2.RenditionService2; | ||||
| import org.alfresco.repo.rendition2.TransformDefinition; | ||||
| @@ -411,12 +412,21 @@ public class AsynchronousExtractor extends AbstractMappingMetadataExtracter | ||||
|         // is used to cache the transform name that will be used. | ||||
|         String transformName = targetMimetype + '/' + sourceMimetype; | ||||
|         String renditionName = TransformDefinition.convertToRenditionName(transformName); | ||||
|         TransformDefinition transformDefinition = (TransformDefinition) renditionDefinitionRegistry2.getRenditionDefinition(renditionName); | ||||
|         if (transformDefinition == null) | ||||
|  | ||||
|         Map<String, String> transformOptions = new HashMap<>(); | ||||
|         RenditionDefinition2 renditionDefinition2 = renditionDefinitionRegistry2.getRenditionDefinition(renditionName); | ||||
|  | ||||
|         if (renditionDefinition2 != null) | ||||
|         { | ||||
|             transformDefinition = new TransformDefinition(transformName, targetMimetype, | ||||
|                     options, null, null, null, renditionDefinitionRegistry2); | ||||
|             transformOptions.putAll(renditionDefinition2.getTransformOptions()); | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|             transformOptions.putAll(options); | ||||
|         } | ||||
|  | ||||
|         TransformDefinition transformDefinition = new TransformDefinition(transformName, targetMimetype, transformOptions, null, | ||||
|                 null, null, renditionDefinitionRegistry2); | ||||
|  | ||||
|         if (logger.isTraceEnabled()) | ||||
|         { | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  * #%L | ||||
|  * Alfresco Repository | ||||
|  * %% | ||||
|  * Copyright (C) 2005 - 2021 Alfresco Software Limited | ||||
|  * Copyright (C) 2005 - 2023 Alfresco Software Limited | ||||
|  * %% | ||||
|  * This file is part of the Alfresco software.  | ||||
|  * If the software was purchased under a paid Alfresco license, the terms of  | ||||
| @@ -485,7 +485,7 @@ public class SolrJSONResultSet implements SearchEngineResultSet { | ||||
|             Set<Metric> metrics = new HashSet<>(1); | ||||
|             List<GenericFacetResponse> nested = new ArrayList<>(); | ||||
|             String field = piv.getString("field"); | ||||
|             String value = piv.getString("value"); | ||||
|             String value = piv.get("value") != null ? piv.get("value").toString() : null; | ||||
|             if (piv.has("stats")) | ||||
|             { | ||||
|                 JSONObject stats = piv.getJSONObject("stats"); | ||||
|   | ||||
| @@ -3,7 +3,7 @@ | ||||
| repository.name=Main Repository | ||||
|  | ||||
| # Schema number | ||||
| version.schema=19000 | ||||
| version.schema=19100 | ||||
|  | ||||
| # Directory configuration | ||||
|  | ||||
|   | ||||
| @@ -134,6 +134,7 @@ import org.junit.runners.Suite; | ||||
|     org.alfresco.repo.search.impl.solr.SolrQueryHTTPClientTest.class, | ||||
|     org.alfresco.repo.search.impl.solr.SolrSQLHttpClientTest.class, | ||||
|     org.alfresco.repo.search.impl.solr.SolrStatsResultTest.class, | ||||
|     org.alfresco.repo.search.impl.solr.SolrJSONResultTest.class, | ||||
|     org.alfresco.repo.search.impl.solr.SolrSQLJSONResultMetadataSetTest.class, | ||||
|     org.alfresco.repo.search.impl.solr.facet.SolrFacetComparatorTest.class, | ||||
|     org.alfresco.repo.search.impl.solr.facet.FacetQNameUtilsTest.class, | ||||
|   | ||||
| @@ -0,0 +1,353 @@ | ||||
| /* | ||||
|  * #%L | ||||
|  * Alfresco Repository | ||||
|  * %% | ||||
|  * Copyright (C) 2005 - 2023 Alfresco Software Limited | ||||
|  * %% | ||||
|  * This file is part of the Alfresco software.  | ||||
|  * If the software was purchased under a paid Alfresco license, the terms of  | ||||
|  * the paid license agreement will prevail.  Otherwise, the software is  | ||||
|  * provided under the following open source license terms: | ||||
|  *  | ||||
|  * Alfresco is free software: you can redistribute it and/or modify | ||||
|  * it under the terms of the GNU Lesser General Public License as published by | ||||
|  * the Free Software Foundation, either version 3 of the License, or | ||||
|  * (at your option) any later version. | ||||
|  *  | ||||
|  * Alfresco is distributed in the hope that it will be useful, | ||||
|  * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
|  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||
|  * GNU Lesser General Public License for more details. | ||||
|  *  | ||||
|  * You should have received a copy of the GNU Lesser General Public License | ||||
|  * along with Alfresco. If not, see <http://www.gnu.org/licenses/>. | ||||
|  * #L% | ||||
|  */ | ||||
| package org.alfresco.repo.search.impl.solr; | ||||
|  | ||||
| import static org.junit.Assert.assertTrue; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| import org.alfresco.repo.domain.node.NodeDAO; | ||||
| import org.alfresco.repo.search.impl.solr.facet.facetsresponse.GenericFacetResponse; | ||||
| import org.alfresco.service.cmr.repository.NodeService; | ||||
| import org.alfresco.service.cmr.search.LimitBy; | ||||
| import org.alfresco.service.cmr.search.SearchParameters; | ||||
| import org.alfresco.util.testing.category.LuceneTests; | ||||
| import org.json.JSONException; | ||||
| import org.json.JSONObject; | ||||
| import org.junit.Test; | ||||
| import org.junit.experimental.categories.Category; | ||||
| import org.junit.runner.RunWith; | ||||
| import org.mockito.Mock; | ||||
| import org.mockito.junit.MockitoJUnitRunner; | ||||
|  | ||||
| /** | ||||
|  * The results of executing a Solr JSON query | ||||
|  * | ||||
|  * @author Tiago Salvado | ||||
|  */ | ||||
| @RunWith(MockitoJUnitRunner.class) | ||||
| @Category(LuceneTests.class) | ||||
| public class SolrJSONResultTest | ||||
| { | ||||
|  | ||||
|     private @Mock NodeService nodeService; | ||||
|     private @Mock NodeDAO nodeDao; | ||||
|  | ||||
|     private static final String JSON = "{\r\n" | ||||
|             + "    \"responseHeader\":{\r\n" | ||||
|             + "       \"QTime\":7,\r\n" | ||||
|             + "       \"status\":0\r\n" | ||||
|             + "    },\r\n" | ||||
|             + "    \"_facet_function_mappings_\":{\r\n" | ||||
|             + "       \r\n" | ||||
|             + "    },\r\n" | ||||
|             + "    \"txRemaining\":0,\r\n" | ||||
|             + "    \"_interval_mappings_\":{\r\n" | ||||
|             + "       \r\n" | ||||
|             + "    },\r\n" | ||||
|             + "    \"lastIndexedTx\":26,\r\n" | ||||
|             + "    \"_date_mappings_\":{\r\n" | ||||
|             + "       \r\n" | ||||
|             + "    },\r\n" | ||||
|             + "    \"_pivot_mappings_\":{\r\n" | ||||
|             + "       \"exif:pixelXDimension,exif:manufacturer\":\"int@s_@{http://www.alfresco.org/model/exif/1.0}pixelXDimension,text@s__lt@{http://www.alfresco.org/model/exif/1.0}manufacturer\"\r\n" | ||||
|             + "    },\r\n" | ||||
|             + "    \"_range_mappings_\":{\r\n" | ||||
|             + "       \r\n" | ||||
|             + "    },\r\n" | ||||
|             + "    \"_original_parameters_\":{\r\n" | ||||
|             + "       \"carrot.url\":\"id\",\r\n" | ||||
|             + "       \"spellcheck.collateExtendedResults\":\"true\",\r\n" | ||||
|             + "       \"df\":\"TEXT\",\r\n" | ||||
|             + "       \"fl\":\"DBID,score\",\r\n" | ||||
|             + "       \"spellcheck.maxCollations\":\"3\",\r\n" | ||||
|             + "       \"fq\":[\r\n" | ||||
|             + "          \"{!afts}AUTHORITY_FILTER_FROM_JSON\",\r\n" | ||||
|             + "          \"{!afts}TENANT_FILTER_FROM_JSON\"\r\n" | ||||
|             + "       ],\r\n" | ||||
|             + "       \"spellcheck.maxCollationTries\":\"5\",\r\n" | ||||
|             + "       \"locale\":\"en_US\",\r\n" | ||||
|             + "       \"hl.qparser\":\"afts\",\r\n" | ||||
|             + "       \"defType\":\"afts\",\r\n" | ||||
|             + "       \"spellcheck.maxResultsForSuggest\":\"5\",\r\n" | ||||
|             + "       \"rqq\":\"{!rrafts}RERANK_QUERY_FROM_CONTEXT\",\r\n" | ||||
|             + "       \"stats\":\"true\",\r\n" | ||||
|             + "       \"carrot.outputSubClusters\":\"false\",\r\n" | ||||
|             + "       \"wt\":\"json\",\r\n" | ||||
|             + "       \"stats.field\":\"{! tag=piv1 key=piv1 countDistinct=false distinctValues=false min=true max=true sum=true count=true missing=true sumOfSquares=true mean=true stddev=true}cm:content.size\",\r\n" | ||||
|             + "       \"facet.pivot\":\"exif:pixelXDimension,exif:manufacturer\",\r\n" | ||||
|             + "       \"carrot.produceSummary\":\"true\",\r\n" | ||||
|             + "       \"start\":\"0\",\r\n" | ||||
|             + "       \"rows\":\"0\",\r\n" | ||||
|             + "       \"spellcheck.alternativeTermCount\":\"2\",\r\n" | ||||
|             + "       \"spellcheck.extendedResults\":\"false\",\r\n" | ||||
|             + "       \"alternativeDic\":\"DEFAULT_DICTIONARY\",\r\n" | ||||
|             + "       \"spellcheck\":\"false\",\r\n" | ||||
|             + "       \"spellcheck.count\":\"5\",\r\n" | ||||
|             + "       \"facet\":\"true\",\r\n" | ||||
|             + "       \"carrot.title\":\"mltext@m___t@{http://www.alfresco.org/model/content/1.0}title\",\r\n" | ||||
|             + "       \"carrot.snippet\":\"content@s___t@{http://www.alfresco.org/model/content/1.0}content\",\r\n" | ||||
|             + "       \"spellcheck.collate\":\"true\",\r\n" | ||||
|             + "       \"rq\":\"{!alfrescoReRank reRankQuery=$rqq reRankDocs=500 scale=true reRankWeight=3}\"\r\n" | ||||
|             + "    },\r\n" | ||||
|             + "    \"_stats_facet_mappings_\":{\r\n" | ||||
|             + "       \r\n" | ||||
|             + "    },\r\n" | ||||
|             + "    \"stats\":{\r\n" | ||||
|             + "       \"stats_fields\":{\r\n" | ||||
|             + "          \"piv1\":{\r\n" | ||||
|             + "             \"sumOfSquares\":29214041999911,\r\n" | ||||
|             + "             \"min\":25,\r\n" | ||||
|             + "             \"max\":3737049,\r\n" | ||||
|             + "             \"mean\":81749.67403314917,\r\n" | ||||
|             + "             \"count\":181,\r\n" | ||||
|             + "             \"missing\":9,\r\n" | ||||
|             + "             \"sum\":14796691,\r\n" | ||||
|             + "             \"stddev\":394436.42871747876\r\n" | ||||
|             + "          }\r\n" | ||||
|             + "       }\r\n" | ||||
|             + "    },\r\n" | ||||
|             + "    \"processedDenies\":true,\r\n" | ||||
|             + "    \"response\":{\r\n" | ||||
|             + "       \"docs\":[\r\n" | ||||
|             + "          \r\n" | ||||
|             + "       ],\r\n" | ||||
|             + "       \"numFound\":190,\r\n" | ||||
|             + "       \"start\":0,\r\n" | ||||
|             + "       \"maxScore\":1\r\n" | ||||
|             + "    },\r\n" | ||||
|             + "    \"_stats_field_mappings_\":{\r\n" | ||||
|             + "       \"cm:content.size\":\"content@s__size@{http://www.alfresco.org/model/content/1.0}content\"\r\n" | ||||
|             + "    },\r\n" | ||||
|             + "    \"facet_counts\":{\r\n" | ||||
|             + "       \"facet_intervals\":{\r\n" | ||||
|             + "          \r\n" | ||||
|             + "       },\r\n" | ||||
|             + "       \"facet_pivot\":{\r\n" | ||||
|             + "          \"exif:pixelXDimension,exif:manufacturer\":[\r\n" | ||||
|             + "             {\r\n" | ||||
|             + "                \"field\":\"exif:pixelXDimension\",\r\n" | ||||
|             + "                \"count\":2,\r\n" | ||||
|             + "                \"pivot\":[\r\n" | ||||
|             + "                   {\r\n" | ||||
|             + "                      \"field\":\"exif:manufacturer\",\r\n" | ||||
|             + "                      \"count\":1,\r\n" | ||||
|             + "                      \"value\":\"{en}corpor\"\r\n" | ||||
|             + "                   },\r\n" | ||||
|             + "                   {\r\n" | ||||
|             + "                      \"field\":\"exif:manufacturer\",\r\n" | ||||
|             + "                      \"count\":1,\r\n" | ||||
|             + "                      \"value\":\"{en}hewlett\"\r\n" | ||||
|             + "                   },\r\n" | ||||
|             + "                   {\r\n" | ||||
|             + "                      \"field\":\"exif:manufacturer\",\r\n" | ||||
|             + "                      \"count\":1,\r\n" | ||||
|             + "                      \"value\":\"{en}packard\"\r\n" | ||||
|             + "                   },\r\n" | ||||
|             + "                   {\r\n" | ||||
|             + "                      \"field\":\"exif:manufacturer\",\r\n" | ||||
|             + "                      \"count\":1,\r\n" | ||||
|             + "                      \"value\":\"{en}pentax\"\r\n" | ||||
|             + "                   }\r\n" | ||||
|             + "                ],\r\n" | ||||
|             + "                \"value\":1000\r\n" | ||||
|             + "             },\r\n" | ||||
|             + "             {\r\n" | ||||
|             + "                \"field\":\"exif:pixelXDimension\",\r\n" | ||||
|             + "                \"count\":1,\r\n" | ||||
|             + "                \"pivot\":[\r\n" | ||||
|             + "                   {\r\n" | ||||
|             + "                      \"field\":\"exif:manufacturer\",\r\n" | ||||
|             + "                      \"count\":1,\r\n" | ||||
|             + "                      \"value\":\"{en}canon\"\r\n" | ||||
|             + "                   }\r\n" | ||||
|             + "                ],\r\n" | ||||
|             + "                \"value\":100\r\n" | ||||
|             + "             },\r\n" | ||||
|             + "             {\r\n" | ||||
|             + "                \"field\":\"exif:pixelXDimension\",\r\n" | ||||
|             + "                \"count\":1,\r\n" | ||||
|             + "                \"value\":400\r\n" | ||||
|             + "             },\r\n" | ||||
|             + "             {\r\n" | ||||
|             + "                \"field\":\"exif:pixelXDimension\",\r\n" | ||||
|             + "                \"count\":1,\r\n" | ||||
|             + "                \"value\":414\r\n" | ||||
|             + "             },\r\n" | ||||
|             + "             {\r\n" | ||||
|             + "                \"field\":\"exif:pixelXDimension\",\r\n" | ||||
|             + "                \"count\":1,\r\n" | ||||
|             + "                \"value\":591\r\n" | ||||
|             + "             },\r\n" | ||||
|             + "             {\r\n" | ||||
|             + "                \"field\":\"exif:pixelXDimension\",\r\n" | ||||
|             + "                \"count\":1,\r\n" | ||||
|             + "                \"value\":625\r\n" | ||||
|             + "             },\r\n" | ||||
|             + "             {\r\n" | ||||
|             + "                \"field\":\"exif:pixelXDimension\",\r\n" | ||||
|             + "                \"count\":1,\r\n" | ||||
|             + "                \"value\":749\r\n" | ||||
|             + "             },\r\n" | ||||
|             + "             {\r\n" | ||||
|             + "                \"field\":\"exif:pixelXDimension\",\r\n" | ||||
|             + "                \"count\":1,\r\n" | ||||
|             + "                \"value\":751\r\n" | ||||
|             + "             },\r\n" | ||||
|             + "             {\r\n" | ||||
|             + "                \"field\":\"exif:pixelXDimension\",\r\n" | ||||
|             + "                \"count\":1,\r\n" | ||||
|             + "                \"value\":778\r\n" | ||||
|             + "             },\r\n" | ||||
|             + "             {\r\n" | ||||
|             + "                \"field\":\"exif:pixelXDimension\",\r\n" | ||||
|             + "                \"count\":1,\r\n" | ||||
|             + "                \"value\":782\r\n" | ||||
|             + "             },\r\n" | ||||
|             + "             {\r\n" | ||||
|             + "                \"field\":\"exif:pixelXDimension\",\r\n" | ||||
|             + "                \"count\":1,\r\n" | ||||
|             + "                \"value\":793\r\n" | ||||
|             + "             },\r\n" | ||||
|             + "             {\r\n" | ||||
|             + "                \"field\":\"exif:pixelXDimension\",\r\n" | ||||
|             + "                \"count\":1,\r\n" | ||||
|             + "                \"value\":1067\r\n" | ||||
|             + "             },\r\n" | ||||
|             + "             {\r\n" | ||||
|             + "                \"field\":\"exif:pixelXDimension\",\r\n" | ||||
|             + "                \"count\":1,\r\n" | ||||
|             + "                \"pivot\":[\r\n" | ||||
|             + "                   {\r\n" | ||||
|             + "                      \"field\":\"exif:manufacturer\",\r\n" | ||||
|             + "                      \"count\":1,\r\n" | ||||
|             + "                      \"value\":\"{en}co\"\r\n" | ||||
|             + "                   },\r\n" | ||||
|             + "                   {\r\n" | ||||
|             + "                      \"field\":\"exif:manufacturer\",\r\n" | ||||
|             + "                      \"count\":1,\r\n" | ||||
|             + "                      \"value\":\"{en}ltd\"\r\n" | ||||
|             + "                   },\r\n" | ||||
|             + "                   {\r\n" | ||||
|             + "                      \"field\":\"exif:manufacturer\",\r\n" | ||||
|             + "                      \"count\":1,\r\n" | ||||
|             + "                      \"value\":\"{en}olympu\"\r\n" | ||||
|             + "                   },\r\n" | ||||
|             + "                   {\r\n" | ||||
|             + "                      \"field\":\"exif:manufacturer\",\r\n" | ||||
|             + "                      \"count\":1,\r\n" | ||||
|             + "                      \"value\":\"{en}optic\"\r\n" | ||||
|             + "                   }\r\n" | ||||
|             + "                ],\r\n" | ||||
|             + "                \"value\":1120\r\n" | ||||
|             + "             },\r\n" | ||||
|             + "             {\r\n" | ||||
|             + "                \"field\":\"exif:pixelXDimension\",\r\n" | ||||
|             + "                \"count\":1,\r\n" | ||||
|             + "                \"value\":1216\r\n" | ||||
|             + "             },\r\n" | ||||
|             + "             {\r\n" | ||||
|             + "                \"field\":\"exif:pixelXDimension\",\r\n" | ||||
|             + "                \"count\":1,\r\n" | ||||
|             + "                \"value\":2000\r\n" | ||||
|             + "             },\r\n" | ||||
|             + "             {\r\n" | ||||
|             + "                \"field\":\"exif:pixelXDimension\",\r\n" | ||||
|             + "                \"count\":1,\r\n" | ||||
|             + "                \"pivot\":[\r\n" | ||||
|             + "                   {\r\n" | ||||
|             + "                      \"field\":\"exif:manufacturer\",\r\n" | ||||
|             + "                      \"count\":1,\r\n" | ||||
|             + "                      \"value\":\"{en}compani\"\r\n" | ||||
|             + "                   },\r\n" | ||||
|             + "                   {\r\n" | ||||
|             + "                      \"field\":\"exif:manufacturer\",\r\n" | ||||
|             + "                      \"count\":1,\r\n" | ||||
|             + "                      \"value\":\"{en}eastman\"\r\n" | ||||
|             + "                   },\r\n" | ||||
|             + "                   {\r\n" | ||||
|             + "                      \"field\":\"exif:manufacturer\",\r\n" | ||||
|             + "                      \"count\":1,\r\n" | ||||
|             + "                      \"value\":\"{en}kodak\"\r\n" | ||||
|             + "                   }\r\n" | ||||
|             + "                ],\r\n" | ||||
|             + "                \"value\":2580\r\n" | ||||
|             + "             },\r\n" | ||||
|             + "             {\r\n" | ||||
|             + "                \"field\":\"exif:pixelXDimension\",\r\n" | ||||
|             + "                \"count\":1,\r\n" | ||||
|             + "                \"pivot\":[\r\n" | ||||
|             + "                   {\r\n" | ||||
|             + "                      \"field\":\"exif:manufacturer\",\r\n" | ||||
|             + "                      \"count\":1,\r\n" | ||||
|             + "                      \"value\":\"{en}canon\"\r\n" | ||||
|             + "                   }\r\n" | ||||
|             + "                ],\r\n" | ||||
|             + "                \"value\":3072\r\n" | ||||
|             + "             },\r\n" | ||||
|             + "             {\r\n" | ||||
|             + "                \"field\":\"exif:pixelXDimension\",\r\n" | ||||
|             + "                \"count\":1,\r\n" | ||||
|             + "                \"pivot\":[\r\n" | ||||
|             + "                   {\r\n" | ||||
|             + "                      \"field\":\"exif:manufacturer\",\r\n" | ||||
|             + "                      \"count\":1,\r\n" | ||||
|             + "                      \"value\":\"{en}canon\"\r\n" | ||||
|             + "                   }\r\n" | ||||
|             + "                ],\r\n" | ||||
|             + "                \"value\":3264\r\n" | ||||
|             + "             }\r\n" | ||||
|             + "          ]\r\n" | ||||
|             + "       },\r\n" | ||||
|             + "       \"facet_queries\":{\r\n" | ||||
|             + "          \r\n" | ||||
|             + "       },\r\n" | ||||
|             + "       \"facet_fields\":{\r\n" | ||||
|             + "          \r\n" | ||||
|             + "       },\r\n" | ||||
|             + "       \"facet_heatmaps\":{\r\n" | ||||
|             + "          \r\n" | ||||
|             + "       },\r\n" | ||||
|             + "       \"facet_ranges\":{\r\n" | ||||
|             + "          \r\n" | ||||
|             + "       }\r\n" | ||||
|             + "    },\r\n" | ||||
|             + "    \"_field_mappings_\":{\r\n" | ||||
|             + "       \r\n" | ||||
|             + "    },\r\n" | ||||
|             + "    \"lastIndexedTxTime\":1698923805438\r\n" | ||||
|             + " }"; | ||||
|  | ||||
|     @Test | ||||
|     public void testMNT23152() throws JSONException | ||||
|     { | ||||
|         JSONObject json = new JSONObject(JSON); | ||||
|         SearchParameters parameters = new SearchParameters(); | ||||
|         SolrJSONResultSet s = new SolrJSONResultSet(json, parameters, nodeService, nodeDao, LimitBy.UNLIMITED, 10); | ||||
|         List<GenericFacetResponse> pivotsFacet = s.getPivotFacets(); | ||||
|         assertTrue("The pivots facets shouldn't be empty", pivotsFacet != null && !pivotsFacet.isEmpty()); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user