mirror of
https://github.com/Alfresco/SearchServices.git
synced 2025-09-10 14:11:25 +00:00
Compare commits
173 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2bc55b56fb | ||
|
e7a97781a5 | ||
|
6795a72bce | ||
|
ded818789c | ||
|
f9135204d2 | ||
|
037dbec4ea | ||
|
976d008cf1 | ||
|
ad588660ba | ||
|
bc0c8635c1 | ||
|
e912279d3d | ||
|
e428a98512 | ||
|
27dd1f3eb8 | ||
|
9f9303ba80 | ||
|
368770a347 | ||
|
93c5e30c92 | ||
|
d14223a423 | ||
|
f983e2df5b | ||
|
5a125f07e6 | ||
|
ffff6c1f3d | ||
|
5673a6686b | ||
|
88dceac4c2 | ||
|
9e73bef414 | ||
|
1bb5192796 | ||
|
6db68cee65 | ||
|
0792b19c8d | ||
|
2d33d5d6b6 | ||
|
686a08f08a | ||
|
08c2bb10e8 | ||
|
236c77b837 | ||
|
d0c5b33459 | ||
|
a91d4bfdc1 | ||
|
5d5c575174 | ||
|
ff7e35c69f | ||
|
f73c4625e6 | ||
|
4ad54df27c | ||
|
8f020dde5f | ||
|
ef3aee3164 | ||
|
a2a0305aa2 | ||
|
a4ad04d95d | ||
|
a47e1f5555 | ||
|
32bbc2507b | ||
|
ecd1abcf14 | ||
|
640fad0c17 | ||
|
e56683029c | ||
|
fcf4245a3d | ||
|
89142bedbb | ||
|
c3a9fbc14a | ||
|
6ab1778b42 | ||
|
eb1759c7cf | ||
|
1cdf7da576 | ||
|
b89a163f5c | ||
|
740057f489 | ||
|
4d26e7f61d | ||
|
55ae8c8302 | ||
|
016f147245 | ||
|
b56a8338de | ||
|
f61aad1f39 | ||
|
1d8638af61 | ||
|
737d2fa4a5 | ||
|
d252f613df | ||
|
1dbf651262 | ||
|
c32680f3e2 | ||
|
aa451f8c78 | ||
|
d3526442cc | ||
|
a804ebea28 | ||
|
19525eb461 | ||
|
7aad2549bf | ||
|
6699747a03 | ||
|
b6c99624c2 | ||
|
4d585e0166 | ||
|
9e405374a3 | ||
|
0dc2f6b56c | ||
|
7eca83d7a7 | ||
|
63efb987f0 | ||
|
ae41e0051b | ||
|
51fe763c2c | ||
|
a79fd17c68 | ||
|
c1fd4a76bb | ||
|
bc51c436d6 | ||
|
8e23f95198 | ||
|
7ba50e363c | ||
|
a657ccab35 | ||
|
efd9ea1167 | ||
|
898d2519b3 | ||
|
86d2d88fac | ||
|
3fb7fd294f | ||
|
73d891fd10 | ||
|
38cc3977b6 | ||
|
787b989912 | ||
|
709223019d | ||
|
51409e31ac | ||
|
48db0b1594 | ||
|
8dd0729b8d | ||
|
906f6fecb9 | ||
|
16da35f01e | ||
|
b5f8989f5e | ||
|
c3dd096b10 | ||
|
c7f23c27c2 | ||
|
eea5620518 | ||
|
d0bf5871a2 | ||
|
2f597ad68f | ||
|
fe640439ad | ||
|
e9de99d76a | ||
|
3b5676e684 | ||
|
8aae0779ff | ||
|
0a57d2216d | ||
|
c8f9cfa62e | ||
|
ced709b7bc | ||
|
21a9997881 | ||
|
db667eb909 | ||
|
766e143b28 | ||
|
f16631f9a8 | ||
|
c32487a922 | ||
|
3dc637df12 | ||
|
69832bd140 | ||
|
533fc2466a | ||
|
caf819272b | ||
|
32ea46f62a | ||
|
fa0e0d83d7 | ||
|
2bcfc72b36 | ||
|
656b6bf9b7 | ||
|
5e400d76c0 | ||
|
2087d23097 | ||
|
1fd16e4592 | ||
|
1b31471e23 | ||
|
f9c92cc4b4 | ||
|
362fa8a7a9 | ||
|
6067fc69f3 | ||
|
ce522fec44 | ||
|
6225430cb2 | ||
|
0937fe3e2b | ||
|
260914c979 | ||
|
fa1a59a215 | ||
|
bece920628 | ||
|
7b0ed0a492 | ||
|
7de998dd61 | ||
|
9162f05b5e | ||
|
def5cb6885 | ||
|
9843af6437 | ||
|
e1a9620b9f | ||
|
59854c7269 | ||
|
fa1407e20f | ||
|
461e1348f4 | ||
|
04da70b4cf | ||
|
fad52fbfd9 | ||
|
072912bb29 | ||
|
4d566c30b9 | ||
|
f91962d08a | ||
|
00a634e17b | ||
|
11b51bb13b | ||
|
951cee6828 | ||
|
f05cb17e56 | ||
|
6e4f1ddeb6 | ||
|
1c9aef6178 | ||
|
cb30043b35 | ||
|
a5b86b073e | ||
|
3dbf1302f3 | ||
|
10863a3223 | ||
|
e6a0f92879 | ||
|
b137b4edbf | ||
|
bb78485584 | ||
|
bcebe24409 | ||
|
e0e651322f | ||
|
0f36989a6c | ||
|
323de2e138 | ||
|
a6d50cd3ee | ||
|
ecb66f09ca | ||
|
71fa8fd497 | ||
|
8aa0150007 | ||
|
9f42b4767b | ||
|
d7b18c5e1a | ||
|
4aa916b191 | ||
|
82bc5afef5 |
@@ -10,6 +10,8 @@ The official documentation for this product can be found at [Alfresco Search Ser
|
||||
|
||||
The official documentation for this product can be found at [Alfresco Search and Insight Engine](https://docs.alfresco.com/sie/concepts/Search-Insight-Engine-overview.html).
|
||||
|
||||
> ⚠ The previous master branch has been renamed to `bak-master` and is deprecated. The current master used to be called `release/V2.0.x`.
|
||||
|
||||
|
||||
### Alfresco Search Services
|
||||
|
||||
|
7089
e2e-test/generator-alfresco-docker-compose/package-lock.json
generated
7089
e2e-test/generator-alfresco-docker-compose/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": "^2.4.2",
|
||||
"yeoman-generator": "^4.12.0",
|
||||
"yeoman-generator": "^5.8.0",
|
||||
"yosay": "^2.0.2"
|
||||
},
|
||||
"jest": {
|
||||
|
@@ -3,20 +3,21 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-search-and-insight-parent</artifactId>
|
||||
<version>2.0.5</version>
|
||||
<version>2.0.9</version>
|
||||
</parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>search-analytics-e2e-test</artifactId>
|
||||
<name>Search Analytics E2E Tests</name>
|
||||
<description>Test Project to test Search Service and Analytics Features on a complete setup of Alfresco, Share</description>
|
||||
<properties>
|
||||
<tas.rest.api.version>1.73</tas.rest.api.version>
|
||||
<tas.cmis.api.version>1.31</tas.cmis.api.version>
|
||||
<tas.utility.version>3.0.48</tas.utility.version>
|
||||
<tas.rest.api.version>23.1.0.168</tas.rest.api.version>
|
||||
<tas.cmis.api.version>23.1.0.101</tas.cmis.api.version>
|
||||
<tas.utility.version>4.0.4</tas.utility.version>
|
||||
<rm.version>3.3.1</rm.version>
|
||||
<suiteXmlFile>src/test/resources/SearchSuite.xml</suiteXmlFile>
|
||||
<test.exclude />
|
||||
<test.include />
|
||||
<dependency.google.guava.version>23.0</dependency.google.guava.version>
|
||||
<jackson.databind.version>2.9.10.8</jackson.databind.version>
|
||||
<licenseName>community</licenseName>
|
||||
</properties>
|
||||
@@ -32,6 +33,9 @@
|
||||
<excludedGroups>${test.exclude}</excludedGroups>
|
||||
<groups>${test.include}</groups>
|
||||
<redirectTestOutputToFile>true</redirectTestOutputToFile>
|
||||
<argLine>
|
||||
--add-opens=java.base/java.lang=ALL-UNNAMED
|
||||
</argLine>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -76,6 +80,10 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-automation-enterprise-rest-api</artifactId>
|
||||
@@ -91,7 +99,7 @@
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${jackson.databind.version}</version>
|
||||
<version>${dependency.jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
@@ -129,7 +137,7 @@
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.20</version>
|
||||
<version>1.18.30</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -160,6 +168,26 @@
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>alfresco-public-releases</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>alfresco-public-snapshots</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/public-snapshots</url>
|
||||
<releases>
|
||||
<enabled>false</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>alfresco-hotfix</id>
|
||||
<url>https://artifacts.alfresco.com/nexus/content/groups/hotfix</url>
|
||||
@@ -171,4 +199,4 @@
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
</project>
|
||||
</project>
|
||||
|
@@ -2,23 +2,23 @@
|
||||
* #%L
|
||||
* Alfresco Search Services E2E Test
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2022 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
|
||||
* 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%
|
||||
@@ -43,6 +43,7 @@ import org.alfresco.dataprep.ContentService;
|
||||
import org.alfresco.dataprep.SiteService.Visibility;
|
||||
import org.alfresco.rest.core.RestProperties;
|
||||
import org.alfresco.rest.core.RestWrapper;
|
||||
import org.alfresco.rest.exception.EmptyJsonResponseException;
|
||||
import org.alfresco.rest.exception.EmptyRestModelCollectionException;
|
||||
import org.alfresco.rest.model.RestRequestSpellcheckModel;
|
||||
import org.alfresco.rest.search.Pagination;
|
||||
@@ -83,7 +84,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
public abstract class AbstractE2EFunctionalTest extends AbstractTestNGSpringContextTests
|
||||
{
|
||||
/** The number of retries that a query will be tried before giving up. */
|
||||
protected static final int SEARCH_MAX_ATTEMPTS = 60;
|
||||
protected static final int SEARCH_MAX_ATTEMPTS = 120;
|
||||
|
||||
private static final Logger LOGGER = LogFactory.getLogger();
|
||||
|
||||
@@ -120,7 +121,7 @@ public abstract class AbstractE2EFunctionalTest extends AbstractTestNGSpringCont
|
||||
protected SiteModel testSite, testSite2;
|
||||
|
||||
protected static String unique_searchString;
|
||||
|
||||
|
||||
protected static String shardingMethod = "DB_ID";
|
||||
protected int shardCount = 0;
|
||||
|
||||
@@ -294,7 +295,6 @@ public abstract class AbstractE2EFunctionalTest extends AbstractTestNGSpringCont
|
||||
*/
|
||||
public boolean isContentInSearchResults(String userQuery, String contentToFind, boolean expectedInResults) {
|
||||
|
||||
String expectedStatusCode = HttpStatus.OK.toString();
|
||||
String contentName = (contentToFind == null) ? "" : contentToFind;
|
||||
|
||||
SearchRequest searchRequest = createQuery(userQuery);
|
||||
@@ -302,29 +302,38 @@ public abstract class AbstractE2EFunctionalTest extends AbstractTestNGSpringCont
|
||||
// Repeat search until the query results are as expected or Search Retry count is hit
|
||||
for (int searchCount = 0; searchCount < SEARCH_MAX_ATTEMPTS; searchCount++)
|
||||
{
|
||||
SearchResponse response = query(searchRequest);
|
||||
|
||||
if (restClient.getStatusCode().matches(expectedStatusCode))
|
||||
try
|
||||
{
|
||||
boolean found = isContentInSearchResponse(response, contentName);
|
||||
|
||||
// Exit loop if result is as expected.
|
||||
if (expectedInResults == found)
|
||||
if (expectedInResults == isContentFoundWithRequest(searchRequest, contentName))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Wait for the solr indexing (eventual consistency).
|
||||
Utility.waitToLoopTime(properties.getSolrWaitTimeInSeconds(), "Wait For Indexing. Retry Attempt: " + (searchCount + 1));
|
||||
}
|
||||
else
|
||||
catch (EmptyJsonResponseException ignore)
|
||||
{
|
||||
throw new RuntimeException("API returned status code:" + restClient.getStatusCode() + " Expected: " + expectedStatusCode + "; Response body: " + response);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isContentFoundWithRequest(SearchRequest searchRequest, String contentName)
|
||||
{
|
||||
SearchResponse response = query(searchRequest);
|
||||
|
||||
if (restClient.getStatusCode().matches(HttpStatus.OK.toString()))
|
||||
{
|
||||
return isContentInSearchResponse(response, contentName);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new RuntimeException("API returned status code:" + restClient.getStatusCode() + " Expected: " + HttpStatus.OK + "; Response body: " + response);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to check if the contentName is returned in the SearchResponse.
|
||||
*
|
||||
@@ -439,7 +448,7 @@ public abstract class AbstractE2EFunctionalTest extends AbstractTestNGSpringCont
|
||||
{
|
||||
SearchRequest searchRequest = new SearchRequest();
|
||||
searchRequest.setQuery(queryModel);
|
||||
|
||||
|
||||
if (ofNullable(paging).isPresent())
|
||||
{
|
||||
searchRequest.setPaging(paging);
|
||||
@@ -508,7 +517,7 @@ public abstract class AbstractE2EFunctionalTest extends AbstractTestNGSpringCont
|
||||
|
||||
// Include lists in failure message as TestNG won't do this for lists.
|
||||
assertEquals(names, expectedNames, "Unexpected results for query: " + query + " Expected: " + expectedNames + " but got " + names);
|
||||
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
@@ -522,11 +531,11 @@ public abstract class AbstractE2EFunctionalTest extends AbstractTestNGSpringCont
|
||||
protected SearchResponse testSearchQueryUnordered(String query, Set<String> expectedNames, SearchLanguage queryLanguage)
|
||||
{
|
||||
SearchResponse response = performSearch(testUser, query, queryLanguage, getDefaultPagingOptions());
|
||||
|
||||
|
||||
Set<String> names = response.getEntries().stream().map(s -> s.getModel().getName()).collect(Collectors.toSet());
|
||||
|
||||
|
||||
assertEquals(names, expectedNames, "Unexpected results for query: " + query);
|
||||
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
@@ -553,7 +562,7 @@ public abstract class AbstractE2EFunctionalTest extends AbstractTestNGSpringCont
|
||||
/**
|
||||
* Returns pagination object with alfresco default settings
|
||||
* Sets skipCount = 0, maxItems = 100
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private Pagination getDefaultPagingOptions()
|
||||
@@ -574,7 +583,7 @@ public abstract class AbstractE2EFunctionalTest extends AbstractTestNGSpringCont
|
||||
protected Pagination setPaging(Integer skipCount, Integer maxItems)
|
||||
{
|
||||
Pagination paging = new Pagination();
|
||||
|
||||
|
||||
if (ofNullable(skipCount).isPresent())
|
||||
{
|
||||
paging.setSkipCount(skipCount);
|
||||
@@ -584,7 +593,7 @@ public abstract class AbstractE2EFunctionalTest extends AbstractTestNGSpringCont
|
||||
{
|
||||
paging.setMaxItems(maxItems);
|
||||
}
|
||||
|
||||
|
||||
return paging;
|
||||
}
|
||||
|
||||
@@ -645,7 +654,7 @@ public abstract class AbstractE2EFunctionalTest extends AbstractTestNGSpringCont
|
||||
public String getShardMethod() throws JsonProcessingException, EmptyRestModelCollectionException
|
||||
{
|
||||
RestShardInfoModelCollection info = getShardInfo();
|
||||
|
||||
|
||||
return shardingMethod = ofNullable(info)
|
||||
.map(RestShardInfoModelCollection::getEntries)
|
||||
.map(Collection::iterator).filter(Iterator::hasNext)
|
||||
@@ -664,7 +673,7 @@ public abstract class AbstractE2EFunctionalTest extends AbstractTestNGSpringCont
|
||||
public int getShardCount() throws JsonProcessingException, EmptyRestModelCollectionException
|
||||
{
|
||||
RestShardInfoModelCollection info = getShardInfo();
|
||||
|
||||
|
||||
return shardCount = ofNullable(info)
|
||||
.map(RestShardInfoModelCollection::getEntries)
|
||||
.map(Collection::iterator)
|
||||
|
@@ -2,23 +2,23 @@
|
||||
* #%L
|
||||
* Alfresco Search Services E2E Test
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 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
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* 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%
|
||||
@@ -26,10 +26,16 @@
|
||||
|
||||
package org.alfresco.test.search.functional.searchServices.search;
|
||||
|
||||
import org.alfresco.rest.exception.EmptyJsonResponseException;
|
||||
import org.alfresco.rest.search.SearchResponse;
|
||||
import org.alfresco.test.search.functional.AbstractE2EFunctionalTest;
|
||||
import org.alfresco.utility.Utility;
|
||||
import org.alfresco.utility.model.FileModel;
|
||||
import org.alfresco.utility.model.FileType;
|
||||
import org.alfresco.utility.model.FolderModel;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.testng.Assert;
|
||||
|
||||
import static java.util.List.of;
|
||||
|
||||
@@ -46,6 +52,15 @@ import static java.util.List.of;
|
||||
public abstract class AbstractSearchServicesE2ETest extends AbstractE2EFunctionalTest
|
||||
{
|
||||
private static final String SEARCH_DATA_SAMPLE_FOLDER = "FolderSearch";
|
||||
private static final int MAX_ATTEMPTS_TO_RETRY_QUERY = 10;
|
||||
private static final int MAX_WAIT_IN_SECONDS_BEFORE_RETRY_QUERY = 5;
|
||||
private static final int MAX_ATTEMPTS_TO_READ_RESPONSE = 10;
|
||||
private static final int MAX_WAIT_IN_SECONDS_BEFORE_REREAD_RESPONSE = 2;
|
||||
|
||||
/** The maximum time to wait for content indexing to complete (in ms). */
|
||||
private static final int MAX_TIME = 120 * 1000;
|
||||
/** The frequency to check the report (in ms). */
|
||||
private static final int RETRY_INTERVAL = 30000;
|
||||
|
||||
protected FileModel file, file2, file3, file4;
|
||||
protected FolderModel folder;
|
||||
@@ -71,20 +86,73 @@ public abstract class AbstractSearchServicesE2ETest extends AbstractE2EFunctiona
|
||||
file = new FileModel("pangram.txt", "pangram" + title, description, FileType.TEXT_PLAIN,
|
||||
description + " The quick brown fox jumps over the lazy dog");
|
||||
|
||||
file2 = new FileModel("cars.txt", "cars" + title, description, FileType.TEXT_PLAIN,
|
||||
"The landrover discovery is not a sports car ");
|
||||
file2 = new FileModel("cars.PDF", "cars", description, FileType.TEXT_PLAIN,
|
||||
"The landrover discovery is not a sports car");
|
||||
|
||||
file3 = new FileModel("alfresco.txt", "alfresco", "alfresco", FileType.TEXT_PLAIN,
|
||||
file3 = new FileModel("alfresco.docx", "alfresco", "alfresco", FileType.TEXT_PLAIN,
|
||||
"Alfresco text file for search ");
|
||||
|
||||
file4 = new FileModel(unique_searchString + ".txt", "uniquee" + title, description, FileType.TEXT_PLAIN,
|
||||
file4 = new FileModel(unique_searchString + ".ODT", "uniquee" + title, description, FileType.TEXT_PLAIN,
|
||||
"Unique text file for search ");
|
||||
|
||||
|
||||
of(file, file2, file3, file4).forEach(
|
||||
f -> dataContent.usingUser(testUser).usingSite(testSite).usingResource(folder).createContent(f)
|
||||
);
|
||||
|
||||
);
|
||||
waitForMetadataIndexing(file4.getName(), true);
|
||||
}
|
||||
|
||||
protected FileModel createFileWithProvidedText(String filename, String providedText) throws InterruptedException
|
||||
{
|
||||
String title = "Title: File containing " + providedText;
|
||||
String description = "Description: Contains provided string: " + providedText;
|
||||
FileModel uniqueFile = new FileModel(filename, title, description, FileType.TEXT_PLAIN,
|
||||
"The content " + providedText + " is a provided string");
|
||||
dataContent.usingUser(testUser).usingSite(testSite).usingResource(folder).createContent(uniqueFile);
|
||||
Assert.assertTrue(waitForContentIndexing(providedText, true));
|
||||
|
||||
return uniqueFile;
|
||||
}
|
||||
|
||||
protected SearchResponse queryUntilResponseEntriesListNotEmpty(UserModel user, String queryString)
|
||||
{
|
||||
SearchResponse response = queryUntilStatusIsOk(user, queryString);
|
||||
if (restClient.getStatusCode().matches(HttpStatus.OK.toString()))
|
||||
{
|
||||
for (int readAttempts = 0; readAttempts < MAX_ATTEMPTS_TO_READ_RESPONSE; readAttempts++)
|
||||
{
|
||||
if (!response.isEmpty())
|
||||
{
|
||||
return response;
|
||||
}
|
||||
Utility.waitToLoopTime(MAX_WAIT_IN_SECONDS_BEFORE_REREAD_RESPONSE, "Re-reading empty response. Retry Attempt: " + (readAttempts + 1));
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
private SearchResponse queryUntilStatusIsOk(UserModel user, String queryString)
|
||||
{
|
||||
// Repeat query until status is OK or Query Retry limit is hit
|
||||
for (int queryAttempts = 0; queryAttempts < MAX_ATTEMPTS_TO_RETRY_QUERY - 1; queryAttempts++)
|
||||
{
|
||||
try
|
||||
{
|
||||
SearchResponse response = queryAsUser(user, queryString);
|
||||
if (restClient.getStatusCode().matches(HttpStatus.OK.toString()))
|
||||
{
|
||||
return response;
|
||||
}
|
||||
|
||||
// Wait for pipeline to calm down
|
||||
Utility.waitToLoopTime(MAX_WAIT_IN_SECONDS_BEFORE_RETRY_QUERY, "Re-trying query for valid status code. Retry Attempt: " + (queryAttempts + 1));
|
||||
}
|
||||
catch (EmptyJsonResponseException ignore)
|
||||
{
|
||||
}
|
||||
}
|
||||
// Final attempt
|
||||
return queryAsUser(user, queryString);
|
||||
}
|
||||
}
|
||||
|
@@ -110,7 +110,7 @@ public class FacetedSearchTest extends AbstractSearchServicesE2ETest
|
||||
* }}
|
||||
*/
|
||||
@BeforeClass(alwaysRun = true)
|
||||
public void dataPreparation() throws Exception
|
||||
public void dataPreparation()
|
||||
{
|
||||
searchServicesDataPreparation();
|
||||
waitForContentIndexing(file4.getContent(), true);
|
||||
@@ -118,7 +118,7 @@ public class FacetedSearchTest extends AbstractSearchServicesE2ETest
|
||||
|
||||
@Test(groups={TestGroup.CONFIG_ENABLED_CASCADE_TRACKER})
|
||||
@TestRail(section = { TestGroup.REST_API, TestGroup.SEARCH}, executionType = ExecutionType.REGRESSION, description = "Checks facet queries for the Search api")
|
||||
public void searchWithQueryFaceting() throws Exception
|
||||
public void searchWithQueryFaceting()
|
||||
{
|
||||
SearchRequest query = new SearchRequest();
|
||||
RestRequestQueryModel queryReq = new RestRequestQueryModel();
|
||||
@@ -154,11 +154,10 @@ public class FacetedSearchTest extends AbstractSearchServicesE2ETest
|
||||
|
||||
/**
|
||||
* Verify this query is returning the same results for both single server and shard environments.
|
||||
* @throws Exception
|
||||
*/
|
||||
@Test(groups={TestGroup.CONFIG_SHARDING})
|
||||
@TestRail(section = { TestGroup.REST_API, TestGroup.SEARCH}, executionType = ExecutionType.ACCEPTANCE, description = "Checks facet queries for the Search api in Shard environments")
|
||||
public void searchWithQueryFacetingCluster() throws Exception
|
||||
public void searchWithQueryFacetingCluster()
|
||||
{
|
||||
searchWithQueryFaceting();
|
||||
}
|
||||
@@ -205,7 +204,7 @@ public class FacetedSearchTest extends AbstractSearchServicesE2ETest
|
||||
@Test
|
||||
@TestRail(section = {TestGroup.REST_API, TestGroup.SEARCH }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Checks facet queries for the Search api")
|
||||
public void searchQueryFacetingWithGroup() throws Exception
|
||||
public void searchQueryFacetingWithGroup()
|
||||
{
|
||||
SearchRequest query = new SearchRequest();
|
||||
RestRequestQueryModel queryReq = new RestRequestQueryModel();
|
||||
@@ -270,7 +269,7 @@ public class FacetedSearchTest extends AbstractSearchServicesE2ETest
|
||||
@Test
|
||||
@TestRail(section = {TestGroup.REST_API, TestGroup.SEARCH }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Checks facet queries for the Search api")
|
||||
public void searchWithFactedFields() throws Exception
|
||||
public void searchWithFactedFields()
|
||||
{
|
||||
SearchRequest query = new SearchRequest();
|
||||
RestRequestQueryModel queryReq = new RestRequestQueryModel();
|
||||
@@ -316,7 +315,7 @@ public class FacetedSearchTest extends AbstractSearchServicesE2ETest
|
||||
@Test
|
||||
@TestRail(section = {TestGroup.REST_API, TestGroup.SEARCH }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Checks facet queries for the Search api")
|
||||
public void searchWithFactedFieldsFacetFormatV2() throws Exception
|
||||
public void searchWithFactedFieldsFacetFormatV2()
|
||||
{
|
||||
SearchRequest query = new SearchRequest();
|
||||
RestRequestQueryModel queryReq = new RestRequestQueryModel();
|
||||
@@ -343,7 +342,9 @@ public class FacetedSearchTest extends AbstractSearchServicesE2ETest
|
||||
bucket1.assertThat().field("label").is(testUser.getUsername());
|
||||
bucket1.assertThat().field("display").is("FN-" + testUser.getUsername() + " LN-" + testUser.getUsername());
|
||||
bucket1.assertThat().field("filterQuery").is("modifier:\"" + testUser.getUsername() + "\"");
|
||||
bucket1.assertThat().field("metrics").is("[{entry=null, type=count, value={count=1}}]");
|
||||
bucket1.assertThat().field("metrics.entry").is("[null]")
|
||||
.and().field("metrics.type").is("[count]")
|
||||
.and().field("metrics.value").is("[{count=1}]");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -361,7 +362,7 @@ public class FacetedSearchTest extends AbstractSearchServicesE2ETest
|
||||
@Test
|
||||
@TestRail(section = {TestGroup.REST_API, TestGroup.SEARCH }, executionType = ExecutionType.REGRESSION,
|
||||
description = "Checks facet queries for the Search api, single and multi-valued properties")
|
||||
public void searchWithMultiValuedFieldsFacet() throws Exception
|
||||
public void searchWithMultiValuedFieldsFacet()
|
||||
{
|
||||
|
||||
// Create properties with single (cm:addressee) and multi-valued (cm:addressees) values
|
||||
@@ -410,11 +411,15 @@ public class FacetedSearchTest extends AbstractSearchServicesE2ETest
|
||||
RestGenericBucketModel bucket = model.getBuckets().get(0);
|
||||
bucket.assertThat().field("label").is("{en}first");
|
||||
bucket.assertThat().field("filterQuery").is("cm:addressees:\"{en}first\"");
|
||||
bucket.assertThat().field("metrics").is("[{entry=null, type=count, value={count=1}}]");
|
||||
bucket.assertThat().field("metrics.entry").is("[null]")
|
||||
.and().field("metrics.type").is("[count]")
|
||||
.and().field("metrics.value").is("[{count=1}]");
|
||||
bucket = model.getBuckets().get(1);
|
||||
bucket.assertThat().field("label").is("{en}second");
|
||||
bucket.assertThat().field("filterQuery").is("cm:addressees:\"{en}second\"");
|
||||
bucket.assertThat().field("metrics").is("[{entry=null, type=count, value={count=1}}]");
|
||||
bucket.assertThat().field("metrics.entry").is("[null]")
|
||||
.and().field("metrics.type").is("[count]")
|
||||
.and().field("metrics.value").is("[{count=1}]");
|
||||
|
||||
// Facets for cm:addressee (singel valued)
|
||||
model = response.getContext().getFacets().get(1);
|
||||
@@ -423,7 +428,8 @@ public class FacetedSearchTest extends AbstractSearchServicesE2ETest
|
||||
bucket = model.getBuckets().get(0);
|
||||
bucket.assertThat().field("label").is("{en}first");
|
||||
bucket.assertThat().field("filterQuery").is("cm:addressee:\"{en}first\"");
|
||||
bucket.assertThat().field("metrics").is("[{entry=null, type=count, value={count=1}}]");
|
||||
|
||||
bucket.assertThat().field("metrics.entry").is("[null]")
|
||||
.and().field("metrics.type").is("[count]")
|
||||
.and().field("metrics.value").is("[{count=1}]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,259 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Search Services E2E Test
|
||||
* %%
|
||||
* 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.test.search.functional.searchServices.search;
|
||||
|
||||
import org.alfresco.rest.search.FacetFieldBucket;
|
||||
import org.alfresco.rest.search.RestRequestFacetFieldModel;
|
||||
import org.alfresco.rest.search.RestRequestFacetFieldsModel;
|
||||
import org.alfresco.rest.search.RestRequestQueryModel;
|
||||
import org.alfresco.rest.search.RestResultBucketsModel;
|
||||
import org.alfresco.rest.search.SearchRequest;
|
||||
import org.alfresco.rest.search.SearchResponse;
|
||||
import org.alfresco.utility.Utility;
|
||||
import org.alfresco.utility.model.FileModel;
|
||||
import org.alfresco.utility.model.FileType;
|
||||
import org.hamcrest.Matchers;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SearchCasesTest extends AbstractSearchServicesE2ETest
|
||||
{
|
||||
@BeforeClass(alwaysRun = true)
|
||||
public void dataPreparation() throws Exception
|
||||
{
|
||||
searchServicesDataPreparation();
|
||||
Assert.assertTrue(waitForContentIndexing(file4.getContent(), true));
|
||||
}
|
||||
|
||||
@Test(priority=1)
|
||||
public void testSearchNameField()
|
||||
{
|
||||
SearchResponse response = queryAsUser(testUser, "cm:name:pangram");
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
response.assertThat().entriesListIsNotEmpty();
|
||||
}
|
||||
|
||||
@Test(priority=2)
|
||||
public void testSearchTitleField()
|
||||
{
|
||||
SearchResponse response2 = queryAsUser(testUser, "cm:title:cars");
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
response2.assertThat().entriesListIsNotEmpty();
|
||||
}
|
||||
|
||||
@Test(priority=3)
|
||||
public void testSearchDescriptionField()
|
||||
{
|
||||
SearchResponse response3 = queryAsUser(testUser, "cm:description:alfresco");
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
response3.assertThat().entriesListIsNotEmpty();
|
||||
}
|
||||
|
||||
@Test(priority=4)
|
||||
public void testSearchTextFile()
|
||||
{
|
||||
SearchResponse response6 = queryAsUser(testUser, "cm:name:pangram.txt");
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
response6.assertThat().entriesListIsNotEmpty();
|
||||
}
|
||||
|
||||
@Test(priority=5)
|
||||
public void testSearchPDFFile()
|
||||
{
|
||||
SearchResponse response6 = queryAsUser(testUser, "cm:name:cars.PDF");
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
response6.assertThat().entriesListIsNotEmpty();
|
||||
}
|
||||
|
||||
@Test(priority=6)
|
||||
public void testSearchODTFile()
|
||||
{
|
||||
SearchResponse response6 = queryAsUser(testUser, "cm:name:unique.ODT");
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
response6.assertThat().entriesListIsNotEmpty();
|
||||
}
|
||||
|
||||
@Test(priority=7)
|
||||
public void testSearchPhraseQueries()
|
||||
{
|
||||
SearchResponse response6 = queryAsUser(testUser, "The quick brown fox jumps over the lazy dog");
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
response6.assertThat().entriesListIsNotEmpty();
|
||||
}
|
||||
|
||||
@Test(priority=8)
|
||||
public void testSearchExactTermQueries()
|
||||
{
|
||||
SearchResponse response6 = queryAsUser(testUser, "=alfresco");
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
response6.assertThat().entriesListIsNotEmpty();
|
||||
}
|
||||
|
||||
@Test(priority=9)
|
||||
public void testSearchConjunctionQueries()
|
||||
{
|
||||
SearchResponse response6 = queryAsUser(testUser, "unique AND search");
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
response6.assertThat().entriesListIsNotEmpty();
|
||||
}
|
||||
|
||||
@Test(priority=10)
|
||||
public void testSearchDisjunctionQueries()
|
||||
{
|
||||
SearchResponse response6 = queryAsUser(testUser, "file OR discovery");
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
response6.assertThat().entriesListIsNotEmpty();
|
||||
}
|
||||
|
||||
@Test(priority=11)
|
||||
public void testSearchNegationQueries()
|
||||
{
|
||||
SearchResponse response6 = queryAsUser(testUser, "pangram NOT pan");
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
response6.assertThat().entriesListIsNotEmpty();
|
||||
}
|
||||
|
||||
@Test(priority=12)
|
||||
public void testSearchWildcardQueries()
|
||||
{
|
||||
SearchResponse response6 = queryAsUser(testUser, "al?res*");
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
response6.assertThat().entriesListIsNotEmpty();
|
||||
}
|
||||
|
||||
@Test(priority=13)
|
||||
public void testSearchUpdateContent() throws InterruptedException
|
||||
{
|
||||
String originalText = String.valueOf(System.currentTimeMillis());
|
||||
String newText = String.valueOf(System.currentTimeMillis() + 300000);
|
||||
|
||||
// Create test file to be accessed only by this test method to avoid inconsistent results when querying updates
|
||||
FileModel updateableFile = createFileWithProvidedText(originalText + ".txt", originalText);
|
||||
|
||||
// Verify that 1 occurrence of the original text is found
|
||||
SearchResponse response1 = queryAsUser(testUser, "cm:content:" + originalText);
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
Assert.assertEquals(response1.getEntries().size(), 1, "Expected 1 original text before update");
|
||||
|
||||
// Verify that 0 occurrences of the replacement text are found
|
||||
SearchResponse response2 = queryAsUser(testUser, "cm:content:" + newText);
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
Assert.assertEquals(response2.getEntries().size(), 0, "Expected 0 new text before update");
|
||||
|
||||
// Update the content
|
||||
String newContent = "Description: Contains provided string: " + newText;
|
||||
dataContent.usingUser(adminUserModel).usingSite(testSite).usingResource(updateableFile)
|
||||
.updateContent(newContent);
|
||||
Assert.assertTrue(waitForContentIndexing(newText, true));
|
||||
|
||||
// Verify that 0 occurrences of the original text are found
|
||||
SearchResponse response3 = queryAsUser(testUser, "cm:content:" + originalText);
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
Assert.assertEquals(response3.getEntries().size(), 0, "Expected 0 original text after update");
|
||||
|
||||
// Verify that 1 occurrence of the replacement text is found
|
||||
SearchResponse response4 = queryAsUser(testUser, "cm:content:" + newText);
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
Assert.assertEquals(response4.getEntries().size(), 1, "Expected 1 new text before update");
|
||||
}
|
||||
|
||||
/**
|
||||
* {
|
||||
* "query": {
|
||||
* "query": "*"
|
||||
* },
|
||||
* "facetFields": {
|
||||
* "facets": [{"field": "cm:mimetype"},{"field": "modifier"}]
|
||||
* }
|
||||
* }
|
||||
*/
|
||||
@Test(priority=14)
|
||||
public void searchWithFacedFields() throws InterruptedException
|
||||
{
|
||||
String uniqueText = String.valueOf(System.currentTimeMillis());
|
||||
|
||||
// Create test file to be accessed only by this test method to avoid inconsistent results
|
||||
createFileWithProvidedText(uniqueText + ".ODT", uniqueText);
|
||||
|
||||
SearchRequest query = new SearchRequest();
|
||||
RestRequestQueryModel queryReq = new RestRequestQueryModel();
|
||||
queryReq.setQuery("cm:content:" + uniqueText);
|
||||
query.setQuery(queryReq);
|
||||
|
||||
RestRequestFacetFieldsModel facetFields = new RestRequestFacetFieldsModel();
|
||||
List<RestRequestFacetFieldModel> facets = new ArrayList<>();
|
||||
facets.add(new RestRequestFacetFieldModel("cm:mimetype"));
|
||||
facets.add(new RestRequestFacetFieldModel("modifier"));
|
||||
facetFields.setFacets(facets);
|
||||
query.setFacetFields(facetFields);
|
||||
|
||||
SearchResponse response = query(query);
|
||||
|
||||
Assert.assertNotNull(response.getContext().getFacetsFields());
|
||||
Assert.assertFalse(response.getContext().getFacetsFields().isEmpty());
|
||||
Assert.assertNull(response.getContext().getFacetQueries());
|
||||
Assert.assertNull(response.getContext().getFacets());
|
||||
|
||||
RestResultBucketsModel model = response.getContext().getFacetsFields().get(0);
|
||||
Assert.assertEquals(model.getLabel(), "modifier");
|
||||
|
||||
model.assertThat().field("label").is("modifier");
|
||||
FacetFieldBucket bucket1 = model.getBuckets().get(0);
|
||||
bucket1.assertThat().field("label").is(testUser.getUsername());
|
||||
bucket1.assertThat().field("display").is("FN-" + testUser.getUsername() + " LN-" + testUser.getUsername());
|
||||
bucket1.assertThat().field("filterQuery").is("modifier:\"" + testUser.getUsername() + "\"");
|
||||
bucket1.assertThat().field("count").is(1);
|
||||
}
|
||||
|
||||
@Test(priority=15)
|
||||
public void searchSpecialCharacters()
|
||||
{
|
||||
String specialCharfileName = "è¥äæ§ç§-åæ.pdf";
|
||||
FileModel file = new FileModel(specialCharfileName, "è¥äæ§ç§-忬¯¸" + "è¥äæ§ç§-忬¯¸", "è¥äæ§ç§-忬¯¸", FileType.TEXT_PLAIN,
|
||||
"Text file with Special Characters: " + specialCharfileName);
|
||||
dataContent.usingUser(testUser).usingSite(testSite).createContent(file);
|
||||
|
||||
waitForIndexing(file.getName(), true);
|
||||
|
||||
SearchRequest searchReq = createQuery("name:'" + specialCharfileName + "'");
|
||||
SearchResponse nodes = query(searchReq);
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
|
||||
int searchCount = 0;
|
||||
while (nodes.isEmpty() && searchCount < SEARCH_MAX_ATTEMPTS)
|
||||
{
|
||||
// Wait for the solr indexing (eventual consistency).
|
||||
Utility.waitToLoopTime(properties.getSolrWaitTimeInSeconds(), "Wait For Results After Indexing. Retry Attempt: " + (searchCount + 1));
|
||||
nodes = query(searchReq);
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
}
|
||||
|
||||
nodes.assertThat().entriesListIsNotEmpty();
|
||||
restClient.onResponse().assertThat().body("list.entries.entry[0].name", Matchers.equalToIgnoringCase(specialCharfileName));
|
||||
}
|
||||
}
|
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Search Services E2E Test
|
||||
* %%
|
||||
* 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.test.search.functional.searchServices.search;
|
||||
|
||||
import org.alfresco.rest.search.SearchResponse;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
public class SearchSimpleCasesTest extends AbstractSearchServicesE2ETest
|
||||
{
|
||||
@BeforeClass(alwaysRun = true)
|
||||
public void dataPreparation() throws Exception
|
||||
{
|
||||
searchServicesDataPreparation();
|
||||
waitForContentIndexing(file4.getContent(), true);
|
||||
}
|
||||
|
||||
@Test(priority=1)
|
||||
public void testSearchContentField()
|
||||
{
|
||||
SearchResponse response4 = queryUntilResponseEntriesListNotEmpty(testUser, "cm:content:unique");
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
response4.assertThat().entriesListIsNotEmpty();
|
||||
}
|
||||
|
||||
@Test(priority=2)
|
||||
public void testSearchDocxFile()
|
||||
{
|
||||
SearchResponse response6 = queryUntilResponseEntriesListNotEmpty(testUser, "cm:name:alfresco.docx");
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
response6.assertThat().entriesListIsNotEmpty();
|
||||
}
|
||||
}
|
@@ -115,9 +115,9 @@ public class SearchTest extends AbstractSearchServicesE2ETest
|
||||
public void searchWithOneSortClause()
|
||||
{
|
||||
// Tests the ascending order first
|
||||
List<String> expectedOrder = asList("alfresco.txt", "cars.txt", "pangram.txt");
|
||||
List<String> expectedOrder = asList("alfresco.docx", "cars.PDF", "pangram.txt");
|
||||
|
||||
SearchRequest searchRequest = createQuery("cm_name:alfresco\\.txt cm_name:cars\\.txt cm_name:pangram\\.txt");
|
||||
SearchRequest searchRequest = createQuery("cm_name:alfresco\\.docx cm_name:cars\\.PDF cm_name:pangram\\.txt");
|
||||
searchRequest.addSortClause("FIELD", "name", true);
|
||||
|
||||
RestRequestFilterQueryModel filters = new RestRequestFilterQueryModel();
|
||||
@@ -162,9 +162,9 @@ public class SearchTest extends AbstractSearchServicesE2ETest
|
||||
public void searchWithTwoSortClauses()
|
||||
{
|
||||
// Tests the ascending order first
|
||||
List<String> expectedOrder = asList("alfresco.txt", "cars.txt", "pangram.txt");
|
||||
List<String> expectedOrder = asList("alfresco.docx", "cars.PDF", "pangram.txt");
|
||||
|
||||
SearchRequest searchRequest = createQuery("cm_name:alfresco\\.txt cm_name:cars\\.txt cm_name:pangram\\.txt");
|
||||
SearchRequest searchRequest = createQuery("cm_name:alfresco\\.docx cm_name:cars\\.PDF cm_name:pangram\\.txt");
|
||||
searchRequest.addSortClause("FIELD", "name", true);
|
||||
searchRequest.addSortClause("FIELD", "createdByUser.id", true);
|
||||
|
||||
|
@@ -45,12 +45,12 @@ import org.testng.annotations.Test;
|
||||
public class SearchSolrAPITest extends AbstractE2EFunctionalTest
|
||||
{
|
||||
@Test(priority = 1)
|
||||
public void testGetSolrConfig() throws Exception
|
||||
public void testGetSolrConfig()
|
||||
{
|
||||
RestTextResponse response = restClient.authenticateUser(adminUserModel).withSolrAPI().getConfig();
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
|
||||
restClient.onResponse().assertThat().content(Matchers.containsString("config"));
|
||||
restClient.onResponse().assertThat().body(Matchers.containsString("config"));
|
||||
Assert.assertNotNull(response.getJsonValueByPath("config.requestHandler"));
|
||||
Assert.assertNotNull(response.getJsonObjectByPath("config.requestHandler"));
|
||||
|
||||
@@ -65,7 +65,7 @@ public class SearchSolrAPITest extends AbstractE2EFunctionalTest
|
||||
}
|
||||
|
||||
@Test(priority = 2)
|
||||
public void testEditSolrConfig() throws Exception
|
||||
public void testEditSolrConfig()
|
||||
{
|
||||
String expectedError = "solrconfig editing is not enabled due to disable.configEdit";
|
||||
|
||||
@@ -85,7 +85,7 @@ public class SearchSolrAPITest extends AbstractE2EFunctionalTest
|
||||
restClient.authenticateUser(adminUserModel).withSolrAPI().postConfig(postBody);
|
||||
restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN);
|
||||
|
||||
restClient.onResponse().assertThat().content(Matchers.containsString(expectedError));
|
||||
restClient.onResponse().assertThat().body(Matchers.containsString(expectedError));
|
||||
|
||||
// TODO: Following asserts fail with error:
|
||||
/*
|
||||
@@ -97,21 +97,21 @@ public class SearchSolrAPITest extends AbstractE2EFunctionalTest
|
||||
}
|
||||
|
||||
@Test(priority = 3)
|
||||
public void testGetSolrConfigOverlay() throws Exception
|
||||
public void testGetSolrConfigOverlay()
|
||||
{
|
||||
restClient.authenticateUser(adminUserModel).withSolrAPI().getConfigOverlay();
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
|
||||
restClient.onResponse().assertThat().content(Matchers.containsString("overlay"));
|
||||
restClient.onResponse().assertThat().body(Matchers.containsString("overlay"));
|
||||
}
|
||||
|
||||
@Test(priority = 4)
|
||||
public void testGetSolrConfigParams() throws Exception
|
||||
public void testGetSolrConfigParams()
|
||||
{
|
||||
restClient.authenticateUser(adminUserModel).withSolrAPI().getConfigParams();
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
|
||||
restClient.onResponse().assertThat().content(Matchers.containsString("response"));
|
||||
restClient.onResponse().assertThat().body(Matchers.containsString("response"));
|
||||
}
|
||||
|
||||
@Test(priority = 5)
|
||||
@@ -127,4 +127,4 @@ public class SearchSolrAPITest extends AbstractE2EFunctionalTest
|
||||
String errorMsg = "No QueryObjectBuilder defined for node a in {q={!xmlparser";
|
||||
Assert.assertTrue(restClient.onResponse().getResponse().body().xmlPath().getString("response").contains(errorMsg));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
16
e2e-test/src/test/resources/PipelineSuite.xml
Normal file
16
e2e-test/src/test/resources/PipelineSuite.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
|
||||
|
||||
<suite name="PipelineSuite" 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="Pipeline">
|
||||
<classes>
|
||||
<class name="org.alfresco.test.search.functional.searchServices.search.SearchSimpleCasesTest" />
|
||||
</classes>
|
||||
</test>
|
||||
|
||||
</suite>
|
270
pom.xml
270
pom.xml
@@ -7,9 +7,9 @@
|
||||
<version>12</version>
|
||||
</parent>
|
||||
<artifactId>alfresco-search-and-insight-parent</artifactId>
|
||||
<version>2.0.5</version>
|
||||
<version>2.0.9</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Alfresco Search And Insight Parent</name>
|
||||
<name>Alfresco Search And Insight Engine</name>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>alfresco-enterprise-releases</id>
|
||||
@@ -38,88 +38,221 @@
|
||||
<connection>scm:git:https://github.com/Alfresco/InsightEngine.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/Alfresco/InsightEngine.git</developerConnection>
|
||||
<url>https://github.com/Alfresco/InsightEngine</url>
|
||||
<tag>2.0.5</tag>
|
||||
<tag>2.0.9</tag>
|
||||
</scm>
|
||||
<properties>
|
||||
<maven.build.sourceVersion>11</maven.build.sourceVersion>
|
||||
<solr.base.version>6.6.5</solr.base.version>
|
||||
<solr.version>${solr.base.version}-patched.9</solr.version>
|
||||
<solr.version>${solr.base.version}-patched.11</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 -->
|
||||
<solr.zip>https://artifacts.alfresco.com/nexus/content/repositories/public/org/apache/solr/solr/solr-${solr.version}/solr-solr-${solr.version}.zip</solr.zip>
|
||||
<solr.directory>${project.build.directory}/solr-${solr.version}</solr.directory>
|
||||
<license-maven-plugin.version>2.0.1.alfresco-1</license-maven-plugin.version>
|
||||
<license-maven-plugin.version>2.0.1</license-maven-plugin.version>
|
||||
<licenseName>enterprise</licenseName>
|
||||
<license.update.dryrun>true</license.update.dryrun>
|
||||
<license.update.copyright>false</license.update.copyright>
|
||||
<dependency.apache-commons-compress.version>1.21</dependency.apache-commons-compress.version>
|
||||
|
||||
<dependency.alfresco.xml-factory.version>1.3</dependency.alfresco.xml-factory.version>
|
||||
<dependency.alfresco-data-model.version>17.190</dependency.alfresco-data-model.version>
|
||||
|
||||
<dependency.jackson.version>2.15.2</dependency.jackson.version>
|
||||
|
||||
<dependency.google.guava.version>32.1.1-jre</dependency.google.guava.version>
|
||||
<dependency.apache-commons-compress.version>1.23.0</dependency.apache-commons-compress.version>
|
||||
<dependency.apache-commons-lang3.version>3.12.0</dependency.apache-commons-lang3.version>
|
||||
<dependency.apache-commons-lang.version>2.6</dependency.apache-commons-lang.version>
|
||||
<dependency.jakarta.xml.bind-api.version>3.0.1</dependency.jakarta.xml.bind-api.version>
|
||||
<dependency.tika.version>1.27</dependency.tika.version>
|
||||
<dependency.hadoop.version>2.7.7</dependency.hadoop.version>
|
||||
<dependency.restlet.version>2.3.12</dependency.restlet.version>
|
||||
<dependency.jdom2.version>2.0.6.1</dependency.jdom2.version>
|
||||
<dependency.spring.version>5.3.18</dependency.spring.version>
|
||||
<dependency.httpclient.version>4.5.13</dependency.httpclient.version>
|
||||
<dependency.httpclient.version>4.5.14</dependency.httpclient.version>
|
||||
<dependency.codehaus.jackson.version>1.9.14-atlassian-6</dependency.codehaus.jackson.version>
|
||||
<dependency.carrotsearch.thirdpaty.simple-xml-safe.version>2.7.1</dependency.carrotsearch.thirdpaty.simple-xml-safe.version>
|
||||
|
||||
<dependency.xpp3.version>1.1.4c</dependency.xpp3.version>
|
||||
<dependency.jaxen.version>1.2.0</dependency.jaxen.version>
|
||||
<dependency.jaxb-xjc.version>4.0.3</dependency.jaxb-xjc.version>
|
||||
|
||||
<dependency.calcite.version>1.32.0</dependency.calcite.version>
|
||||
<dependency.slf4j.version>1.7.36</dependency.slf4j.version>
|
||||
<dependency.cxf.version>3.4.8</dependency.cxf.version>
|
||||
|
||||
<dependency.javax.servlet.api.version>3.1.0</dependency.javax.servlet.api.version>
|
||||
|
||||
<dependency.junit.version>4.13.2</dependency.junit.version>
|
||||
<dependency.mockito.version>5.4.0</dependency.mockito.version>
|
||||
<dependency.carrotsearch.randomizedtesting.version>2.8.1</dependency.carrotsearch.randomizedtesting.version>
|
||||
<dependency.chemistry.opencmis.version>1.1.0</dependency.chemistry.opencmis.version>
|
||||
<dependency.protobuf.version>3.23.4</dependency.protobuf.version>
|
||||
<dependency.jayway.jsonpath.version>2.8.0</dependency.jayway.jsonpath.version>
|
||||
<dependency.janino.version>3.1.10</dependency.janino.version>
|
||||
</properties>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.janino</groupId>
|
||||
<artifactId>commons-compiler</artifactId>
|
||||
<version>${dependency.janino.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.janino</groupId>
|
||||
<artifactId>janino</artifactId>
|
||||
<version>${dependency.janino.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jayway.jsonpath</groupId>
|
||||
<artifactId>json-path</artifactId>
|
||||
<version>${dependency.jayway.jsonpath.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<version>${dependency.protobuf.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<version>${dependency.jackson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<version>${dependency.jackson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${dependency.jackson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-smile</artifactId>
|
||||
<version>${dependency.jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>${dependency.javax.servlet.api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.carrotsearch.thirdparty</groupId>
|
||||
<artifactId>simple-xml-safe</artifactId>
|
||||
<version>${dependency.carrotsearch.thirdpaty.simple-xml-safe.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.calcite</groupId>
|
||||
<artifactId>calcite-core</artifactId>
|
||||
<version>${dependency.calcite.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.bind</groupId>
|
||||
<artifactId>jaxb-xjc</artifactId>
|
||||
<version>${dependency.jaxb-xjc.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jaxen</groupId>
|
||||
<artifactId>jaxen</artifactId>
|
||||
<version>${dependency.jaxen.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xpp3</groupId>
|
||||
<artifactId>xpp3</artifactId>
|
||||
<version>${dependency.xpp3.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>${dependency.google.guava.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-xmlfactory</artifactId>
|
||||
<version>${dependency.alfresco.xml-factory.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<version>${dependency.apache-commons-lang.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-core</artifactId>
|
||||
<version>${dependency.cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-bindings-soap</artifactId>
|
||||
<version>${dependency.cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-bindings-xml</artifactId>
|
||||
<version>${dependency.cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-databinding-jaxb</artifactId>
|
||||
<version>${dependency.cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-frontend-jaxws</artifactId>
|
||||
<version>${dependency.cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-frontend-simple</artifactId>
|
||||
<version>${dependency.cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-transports-http</artifactId>
|
||||
<version>${dependency.cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-ws-addr</artifactId>
|
||||
<version>${dependency.cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-ws-policy</artifactId>
|
||||
<version>${dependency.cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-wsdl</artifactId>
|
||||
<version>${dependency.cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>${dependency.apache-commons-lang3.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${dependency.slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-reload4j</artifactId>
|
||||
<version>${dependency.slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
<version>${dependency.apache-commons-compress.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tika</groupId>
|
||||
<artifactId>tika-core</artifactId>
|
||||
<version>${dependency.tika.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tika</groupId>
|
||||
<artifactId>tika-java7</artifactId>
|
||||
<version>${dependency.tika.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tika</groupId>
|
||||
<artifactId>tika-parsers</artifactId>
|
||||
<version>${dependency.tika.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.tika</groupId>
|
||||
<artifactId>tika-xmp</artifactId>
|
||||
<version>${dependency.tika.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.xml.bind</groupId>
|
||||
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||
<version>${dependency.jakarta.xml.bind-api.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.adobe.xmp</groupId>
|
||||
<artifactId>xmpcore</artifactId>
|
||||
<version>6.1.11</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.hadoop</groupId>
|
||||
<artifactId>hadoop-annotations</artifactId>
|
||||
<version>${dependency.hadoop.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.hadoop</groupId>
|
||||
<artifactId>hadoop-auth</artifactId>
|
||||
<version>${dependency.hadoop.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.hadoop</groupId>
|
||||
<artifactId>hadoop-common</artifactId>
|
||||
<version>${dependency.hadoop.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.hadoop</groupId>
|
||||
<artifactId>hadoop-hdfs</artifactId>
|
||||
<version>${dependency.hadoop.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.restlet.jee</groupId>
|
||||
<artifactId>org.restlet</artifactId>
|
||||
@@ -130,11 +263,6 @@
|
||||
<artifactId>org.restlet.ext.servlet</artifactId>
|
||||
<version>${dependency.restlet.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jdom</groupId>
|
||||
<artifactId>jdom2</artifactId>
|
||||
<version>${dependency.jdom2.version}</version>
|
||||
</dependency>
|
||||
<!-- spring framework is defined in "search-services" and "insight-engine" because "e2e-test" uses different versions -->
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
@@ -151,6 +279,26 @@
|
||||
<artifactId>jackson-mapper-asl</artifactId>
|
||||
<version>${dependency.codehaus.jackson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>${dependency.junit.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>${dependency.mockito.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.carrotsearch.randomizedtesting</groupId>
|
||||
<artifactId>randomizedtesting-runner</artifactId>
|
||||
<version>${dependency.carrotsearch.randomizedtesting.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.chemistry.opencmis</groupId>
|
||||
<artifactId>chemistry-opencmis-client-impl</artifactId>
|
||||
<version>${dependency.chemistry.opencmis.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<modules>
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-search-parent</artifactId>
|
||||
<version>2.0.5</version>
|
||||
<version>2.0.9</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-solrclient-lib</artifactId>
|
||||
<version>2.0.5</version>
|
||||
<version>2.0.9</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
@@ -42,6 +42,38 @@
|
||||
<version>${solr.version}</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-smile</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.janino</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.calcite</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.calcite.avatica</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.hadoop</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>jdk.tools</groupId>
|
||||
<artifactId>jdk.tools</artifactId>
|
||||
@@ -52,26 +84,92 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.solr</groupId>
|
||||
<artifactId>solr-analysis-extras</artifactId>
|
||||
<version>${solr.version}</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-smile</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.janino</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.calcite</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.calcite.avatica</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.calcite.avatica</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.hadoop</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.solr</groupId>
|
||||
<artifactId>solr-langid</artifactId>
|
||||
<version>${solr.version}</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-smile</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.janino</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.adobe.xmp</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.calcite</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.calcite.avatica</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<groupId>xerces</groupId>
|
||||
@@ -88,19 +186,66 @@
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcprov-jdk15on</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.hadoop</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.tika</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.pdfbox</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.solr</groupId>
|
||||
<artifactId>solr-clustering</artifactId>
|
||||
<version>${solr.version}</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-smile</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.janino</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.calcite</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.calcite.avatica</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.hadoop</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.simpleframework</groupId>
|
||||
<artifactId>simple-xml</artifactId>
|
||||
@@ -115,119 +260,103 @@
|
||||
<dependency>
|
||||
<groupId>com.carrotsearch.thirdparty</groupId>
|
||||
<artifactId>simple-xml-safe</artifactId>
|
||||
<version>2.7.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-reload4j</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jaxen</groupId>
|
||||
<artifactId>jaxen</artifactId>
|
||||
<version>1.2.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.sun.xml.bind</groupId>
|
||||
<artifactId>jaxb-xjc</artifactId>
|
||||
<version>2.3.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.11</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-core</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-bindings-soap</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-bindings-xml</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-databinding-jaxb</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-frontend-jaxws</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-frontend-simple</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-transports-http</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-ws-addr</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-ws-policy</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf</groupId>
|
||||
<artifactId>cxf-rt-wsdl</artifactId>
|
||||
<version>${cxf.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xpp3</groupId>
|
||||
<artifactId>xpp3</artifactId>
|
||||
<version>1.1.4c</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-xmlfactory</artifactId>
|
||||
<version>1.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- DATE Functions (YEAR, MONTH, ...) are broken in Calcite 1.11.0 (default
|
||||
version provided by SOLR 6.6.x)
|
||||
Upgrading manually Calcite version to 1.15.0
|
||||
to support this kind of functions -->
|
||||
<dependency>
|
||||
<groupId>org.apache.calcite</groupId>
|
||||
<artifactId>calcite-core</artifactId>
|
||||
<version>1.13.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.calcite</groupId>
|
||||
<artifactId>calcite-linq4j</artifactId>
|
||||
<version>1.13.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.calcite.avatica</groupId>
|
||||
<artifactId>avatica-core</artifactId>
|
||||
<version>1.13.0</version>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.calcite</groupId>
|
||||
<artifactId>calcite-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.janino</groupId>
|
||||
<artifactId>commons-compiler</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.janino</groupId>
|
||||
<artifactId>janino</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jayway.jsonpath</groupId>
|
||||
<artifactId>json-path</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
@@ -238,14 +367,12 @@
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.13</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>3.4.6</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -255,6 +382,38 @@
|
||||
<version>${solr.version}</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-smile</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.janino</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.calcite</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.calcite.avatica</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.hadoop</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
@@ -264,13 +423,11 @@
|
||||
<dependency>
|
||||
<groupId>com.carrotsearch.randomizedtesting</groupId>
|
||||
<artifactId>randomizedtesting-runner</artifactId>
|
||||
<version>2.7.8</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.chemistry.opencmis</groupId>
|
||||
<artifactId>chemistry-opencmis-client-impl</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
@@ -470,6 +627,7 @@
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>0.8.10</version>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>**/AnnotationWriter.*</exclude>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Search Services
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 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
|
||||
@@ -121,7 +121,6 @@ import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
|
||||
import com.carrotsearch.hppc.IntArrayList;
|
||||
@@ -367,6 +366,7 @@ public class SolrInformationServer implements InformationServer
|
||||
|
||||
private static final String CONTENT_LOCALE = "contentLocale";
|
||||
private static final String CONTENT_LOCALE_FIELD = "content@s__locale@{http://www.alfresco.org/model/content/1.0}content";
|
||||
private static final String CONTENT_TRANSFORM_STATUS_FIELD = "content@s__tr_status@{http://www.alfresco.org/model/content/1.0}content";
|
||||
private static final Set<String> ID_AND_CONTENT_VERSION_ID_AND_CONTENT_LOCALE =
|
||||
new HashSet<>(asList(FIELD_SOLR4_ID, LATEST_APPLIED_CONTENT_VERSION_ID, CONTENT_LOCALE_FIELD));
|
||||
|
||||
@@ -933,11 +933,13 @@ public class SolrInformationServer implements InformationServer
|
||||
|
||||
DelegatingCollector delegatingCollector = new TxnCacheFilter(cleanContentCache); //Filter transactions that have already been processed.
|
||||
delegatingCollector.setLastDelegate(collector);
|
||||
|
||||
searcher.search(documentsWithTransformFailedQuery(), collector);
|
||||
|
||||
searcher.search(documentsWithOutdatedContentQuery(), delegatingCollector);
|
||||
|
||||
LOGGER.debug("{}-[CORE {}] Processing {} documents with content to be indexed", Thread.currentThread().getId(), core.getName(), collector.getTotalHits());
|
||||
|
||||
|
||||
if(collector.getTotalHits() == 0)
|
||||
{
|
||||
LOGGER.debug("No documents with outdated text content have been found.");
|
||||
@@ -947,6 +949,10 @@ public class SolrInformationServer implements InformationServer
|
||||
LOGGER.debug("Found {} documents with outdated text content.", collector.getTotalHits());
|
||||
|
||||
ScoreDoc[] scoreDocs = collector.topDocs().scoreDocs;
|
||||
if(scoreDocs.length == 0)
|
||||
{
|
||||
return emptyList();
|
||||
}
|
||||
List<LeafReaderContext> leaves = searcher.getTopReaderContext().leaves();
|
||||
int index = ReaderUtil.subIndex(scoreDocs[0].doc, leaves);
|
||||
LeafReaderContext context = leaves.get(index);
|
||||
@@ -957,6 +963,7 @@ public class SolrInformationServer implements InformationServer
|
||||
//The TxnCollector collects the transaction ids from the matching documents
|
||||
//The txnIds are limited to a range >= the txnFloor and < an arbitrary transaction ceiling.
|
||||
TxnCollector txnCollector = new TxnCollector(txnFloor);
|
||||
searcher.search(documentsWithTransformFailedQuery(), txnCollector);
|
||||
searcher.search(documentsWithOutdatedContentQuery(), txnCollector);
|
||||
LongHashSet txnSet = txnCollector.getTxnSet();
|
||||
|
||||
@@ -981,13 +988,19 @@ public class SolrInformationServer implements InformationServer
|
||||
|
||||
//Get the docs with dirty content for the transactions gathered above.
|
||||
DocListCollector docListCollector = new DocListCollector();
|
||||
DocListCollector transformFailedDocListCollector = new DocListCollector();
|
||||
BooleanQuery.Builder builder2 = new BooleanQuery.Builder();
|
||||
BooleanQuery.Builder builder3 = new BooleanQuery.Builder();
|
||||
|
||||
builder2.add(documentsWithOutdatedContentQuery(), BooleanClause.Occur.MUST);
|
||||
builder2.add(new QueryWrapperFilter(txnFilterQuery), BooleanClause.Occur.MUST);
|
||||
builder3.add(documentsWithTransformFailedQuery(), BooleanClause.Occur.MUST);
|
||||
|
||||
searcher.search(builder2.build(), docListCollector);
|
||||
IntArrayList docList = docListCollector.getDocs();
|
||||
int beforeTransformFailedSize = docList.size();
|
||||
searcher.search(builder3.build(), transformFailedDocListCollector);
|
||||
docList.addAll(transformFailedDocListCollector.getDocs());
|
||||
int size = docList.size();
|
||||
|
||||
List<Long> processedTxns = new ArrayList<>();
|
||||
@@ -1001,7 +1014,9 @@ public class SolrInformationServer implements InformationServer
|
||||
|
||||
long txnId = longs.get(doc - context.docBase);
|
||||
|
||||
if(!cleanContentCache.containsKey(txnId))
|
||||
boolean isTransformFailed = i >= beforeTransformFailedSize;
|
||||
|
||||
if(!cleanContentCache.containsKey(txnId) || isTransformFailed)
|
||||
{
|
||||
processedTxns.add(txnId);
|
||||
IndexableField id = document.getField(FIELD_SOLR4_ID);
|
||||
@@ -1010,11 +1025,11 @@ public class SolrInformationServer implements InformationServer
|
||||
|
||||
tenantAndDbId.addContentPropertiesSpecs(
|
||||
enabledIndexCustomContent
|
||||
? document.getFields().stream()
|
||||
.filter(field -> field.name().startsWith(AlfrescoSolrDataModel.CONTENT_S_LOCALE_PREFIX))
|
||||
.map(field -> new AlfrescoSolrDataModel.ContentPropertySpecs(field.name(),field.stringValue()))
|
||||
.collect(toList())
|
||||
: ofNullable(document.getField(CONTENT_LOCALE_FIELD))
|
||||
? document.getFields().stream()
|
||||
.filter(field -> field.name().startsWith(AlfrescoSolrDataModel.CONTENT_S_LOCALE_PREFIX))
|
||||
.map(field -> new AlfrescoSolrDataModel.ContentPropertySpecs(field.name(), field.stringValue()))
|
||||
.collect(toList())
|
||||
: ofNullable(document.getField(CONTENT_LOCALE_FIELD))
|
||||
.map(IndexableField::stringValue)
|
||||
.map(value -> new AlfrescoSolrDataModel.ContentPropertySpecs(CONTENT_LOCALE_FIELD, value))
|
||||
.map(Collections::singletonList)
|
||||
@@ -1767,7 +1782,7 @@ public class SolrInformationServer implements InformationServer
|
||||
.map(StringPropertyValue::getValue)
|
||||
.map(Boolean::parseBoolean)
|
||||
.orElse(true);
|
||||
|
||||
|
||||
addDocCmd.solrDoc = isIndexed
|
||||
? populateWithMetadata(
|
||||
basicDocument(nodeMetaData, DOC_TYPE_NODE, PartialSolrInputDocument::new),
|
||||
@@ -2175,7 +2190,12 @@ public class SolrInformationServer implements InformationServer
|
||||
document,
|
||||
contentIndexingHasBeenEnabledOnThisInstance);
|
||||
|
||||
keepContentFields(document);
|
||||
if( isContentIndexedForNode( metadata.getProperties()) )
|
||||
{
|
||||
keepContentFields(document);
|
||||
} else {
|
||||
deleteContentField(document);
|
||||
}
|
||||
|
||||
LOGGER.debug("Document size (fields) after getting properties from node {} metadata: {}", metadata.getId(), document.size());
|
||||
|
||||
@@ -2817,7 +2837,7 @@ public class SolrInformationServer implements InformationServer
|
||||
}
|
||||
}
|
||||
|
||||
private void keepContentFields(PartialSolrInputDocument doc)
|
||||
private void applyContentFields(PartialSolrInputDocument doc, BiConsumer<PartialSolrInputDocument, String> consumer)
|
||||
{
|
||||
String qNamePart = CONTENT_LOCALE_FIELD.substring(AlfrescoSolrDataModel.CONTENT_S_LOCALE_PREFIX.length());
|
||||
QName propertyQName = QName.createQName(qNamePart);
|
||||
@@ -2825,20 +2845,41 @@ public class SolrInformationServer implements InformationServer
|
||||
dataModel.getIndexedFieldForSpecializedPropertyMetadata(propertyQName, AlfrescoSolrDataModel.SpecializedFieldType.TRANSFORMATION_STATUS)
|
||||
.getFields()
|
||||
.stream()
|
||||
.forEach(field -> doc.keepField(field.getField()));
|
||||
.forEach(field -> consumer.accept(doc, field.getField()));
|
||||
|
||||
dataModel.getIndexedFieldForSpecializedPropertyMetadata(propertyQName, AlfrescoSolrDataModel.SpecializedFieldType.TRANSFORMATION_EXCEPTION)
|
||||
.getFields()
|
||||
.stream()
|
||||
.forEach(field -> doc.keepField(field.getField()));
|
||||
.forEach(field -> consumer.accept(doc, field.getField()));
|
||||
|
||||
dataModel.getIndexedFieldForSpecializedPropertyMetadata(propertyQName, AlfrescoSolrDataModel.SpecializedFieldType.TRANSFORMATION_TIME)
|
||||
.getFields()
|
||||
.stream()
|
||||
.forEach(field -> doc.keepField(field.getField()));
|
||||
.forEach(field -> consumer.accept(doc, field.getField()));
|
||||
|
||||
doc.keepField(FINGERPRINT_FIELD);
|
||||
doc.keepField(dataModel.getStoredContentField(propertyQName));
|
||||
consumer.accept(doc, FINGERPRINT_FIELD);
|
||||
|
||||
List<String> contentProperties = doc.getFieldNames().stream()
|
||||
.filter(field -> field.startsWith(AlfrescoSolrDataModel.CONTENT_S_LOCALE_PREFIX))
|
||||
.map(field -> {
|
||||
String part = field.substring(AlfrescoSolrDataModel.CONTENT_S_LOCALE_PREFIX.length());
|
||||
QName property = QName.createQName(part);
|
||||
return dataModel.getStoredContentField(property);
|
||||
})
|
||||
.collect(toList());
|
||||
|
||||
for (String contentProperty : contentProperties)
|
||||
{
|
||||
consumer.accept(doc, contentProperty);
|
||||
}
|
||||
}
|
||||
|
||||
private void deleteContentField(PartialSolrInputDocument doc) {
|
||||
applyContentFields( doc, (doc2, field) -> doc2.removeField(field) );
|
||||
}
|
||||
private void keepContentFields(PartialSolrInputDocument doc)
|
||||
{
|
||||
applyContentFields(doc, (doc2, field) -> doc2.keepField(field));
|
||||
}
|
||||
|
||||
private String languageFrom(String locale)
|
||||
@@ -3865,6 +3906,13 @@ public class SolrInformationServer implements InformationServer
|
||||
.build();
|
||||
}
|
||||
|
||||
private Query documentsWithTransformFailedQuery()
|
||||
{
|
||||
Query q = new TermQuery(new Term(CONTENT_TRANSFORM_STATUS_FIELD, "transform_failed"));
|
||||
|
||||
return new BooleanQuery.Builder().add(q, BooleanClause.Occur.MUST).build();
|
||||
}
|
||||
|
||||
private void deleteById(String field, Long id) throws IOException
|
||||
{
|
||||
String query = field + ":" + id;
|
||||
|
@@ -765,7 +765,6 @@ public class AclTracker extends ActivatableTracker
|
||||
{
|
||||
aclCount = indexBatchOfChangeSets(changeSetBatch);
|
||||
// Update last committed transactions
|
||||
setLastChangeSetIdAndCommitTimeInTrackerState(changeSetBatch, state);
|
||||
indexAclChangeSetAfterWorker(changeSetBatch, state);
|
||||
|
||||
long endElapsed = System.nanoTime();
|
||||
@@ -774,6 +773,9 @@ public class AclTracker extends ActivatableTracker
|
||||
totalAclCount += aclCount;
|
||||
}
|
||||
|
||||
// Update state with server data on last transactions processed
|
||||
setLastChangeSetIdAndCommitTimeInTrackerState(aclChangeSets.getAclChangeSets(), state);
|
||||
|
||||
}
|
||||
catch(InterruptedException | ExecutionException e)
|
||||
{
|
||||
|
@@ -937,9 +937,7 @@ public class MetadataTracker extends ActivatableTracker
|
||||
*/
|
||||
this.state = getTrackerState();
|
||||
|
||||
Long fromCommitTime = getTxFromCommitTime(txnsFound,
|
||||
state.getLastIndexedTxCommitTime() == 0 ? state.getLastGoodTxCommitTimeInIndex()
|
||||
: state.getLastIndexedTxCommitTime());
|
||||
Long fromCommitTime = getTxFromCommitTime(txnsFound,state.getLastGoodTxCommitTimeInIndex());
|
||||
|
||||
// Get transaction list to be indexed
|
||||
if (docRouter instanceof DBIDRangeRouter && txIntervalCommitTimeServiceAvailable)
|
||||
|
@@ -28,7 +28,7 @@ function getSummary() {
|
||||
{
|
||||
resultStr = resultStr + "<dt style=\"width: 45%;\">" + index + ": </dt><dd style=\"width: 45%;\">" + responseObj.Summary.alfresco[summaryList[index]] + "</dd>"
|
||||
}
|
||||
document.getElementById("summaryReportLink").innerHTML = "<a href=\"" + window.location.pathname + "admin/cores?action=SUMMARY&wt=xml\" target=\"new\">View full report (opens in a new window)</a>";
|
||||
document.getElementById("summaryReportLink").innerHTML = "<a href=\"" + encodeURI(window.location.pathname) + "admin/cores?action=SUMMARY&wt=xml\" target=\"new\">View full report (opens in a new window)</a>";
|
||||
document.getElementById("reportSummaryResults").innerHTML = resultStr;
|
||||
}
|
||||
}
|
||||
@@ -71,7 +71,7 @@ function getftsStatus() {
|
||||
var newVal = (ftsValues["New"]) ? (ftsValues["New"]) : 0;
|
||||
resultStr = resultStr + "<dt>FTS Status New: </dt><dd>" + newVal + "</dd>";
|
||||
|
||||
document.getElementById("ftsStatusReportLink").innerHTML = "<a href=\"" + window.location.pathname + "admin/cores?action=REPORT&wt=xml\" target=\"_blank\">View full report (opens in a new window)</a><br/>Note: The FTS status report can take some time to generate";
|
||||
document.getElementById("ftsStatusReportLink").innerHTML = "<a href=\"" + encodeURI(window.location.pathname) + "admin/cores?action=REPORT&wt=xml\" target=\"_blank\">View full report (opens in a new window)</a><br/>Note: The FTS status report can take some time to generate";
|
||||
|
||||
document.getElementById("reportFTSStatusResults").innerHTML = resultStr;
|
||||
}
|
||||
@@ -141,9 +141,9 @@ getftsStatus();
|
||||
<div>
|
||||
|
||||
<script type="text/javascript">
|
||||
document.getElementById("errorLink").innerHTML = "<a href=\"" + window.location.pathname + "alfresco/query?q=ERROR*&wt=xml\" target=\"_blank\">Solr Errors</a>";
|
||||
document.getElementById("exceptionMessageLink").innerHTML = "<a href=\"" + window.location.pathname + "alfresco/query?q=EXCEPTIONMESSAGE:*&wt=xml\" target=\"_blank\">Solr Exception Messages</a>";
|
||||
document.getElementById("exceptionStackLink").innerHTML = "<a href=\"" + window.location.pathname + "alfresco/query?q=EXCEPTIONSTACK:*\" target=\"_blank\">Solr Exceptions Stack</a>";
|
||||
document.getElementById("errorLink").innerHTML = "<a href=\"" + ncodeURI(window.location.pathname) + "alfresco/query?q=ERROR*&wt=xml\" target=\"_blank\">Solr Errors</a>";
|
||||
document.getElementById("exceptionMessageLink").innerHTML = "<a href=\"" + encodeURI(window.location.pathname) + "alfresco/query?q=EXCEPTIONMESSAGE:*&wt=xml\" target=\"_blank\">Solr Exception Messages</a>";
|
||||
document.getElementById("exceptionStackLink").innerHTML = "<a href=\"" + encodeURI(window.location.pathname) + "alfresco/query?q=EXCEPTIONSTACK:*\" target=\"_blank\">Solr Exceptions Stack</a>";
|
||||
</script>
|
||||
|
||||
|
||||
|
@@ -921,103 +921,6 @@
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/admin/luke" class="org.apache.solr.handler.component.AlfrescoLukeRequestHandler" />
|
||||
|
||||
<!-- A Robust Example
|
||||
|
||||
This example SearchHandler declaration shows off usage of the
|
||||
SearchHandler with many defaults declared
|
||||
|
||||
Note that multiple instances of the same Request Handler
|
||||
(SearchHandler) can be registered multiple times with different
|
||||
names (and different init parameters)
|
||||
-->
|
||||
<requestHandler name="/browse" class="solr.SearchHandler">
|
||||
<lst name="defaults">
|
||||
<str name="echoParams">explicit</str>
|
||||
|
||||
<!-- VelocityResponseWriter settings -->
|
||||
<str name="wt">velocity</str>
|
||||
<str name="v.template">browse</str>
|
||||
<str name="v.layout">layout</str>
|
||||
<str name="title">Solritas</str>
|
||||
|
||||
<!-- Query settings -->
|
||||
<str name="defType">edismax</str>
|
||||
<str name="qf">
|
||||
text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
|
||||
title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
|
||||
</str>
|
||||
<str name="df">text</str>
|
||||
<str name="mm">100%</str>
|
||||
<str name="q.alt">*:*</str>
|
||||
<str name="rows">10</str>
|
||||
<str name="fl">*,score</str>
|
||||
|
||||
<str name="mlt.qf">
|
||||
text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
|
||||
title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
|
||||
</str>
|
||||
<str name="mlt.fl">text,features,name,sku,id,manu,cat,title,description,keywords,author,resourcename</str>
|
||||
<int name="mlt.count">3</int>
|
||||
|
||||
<!-- Faceting defaults -->
|
||||
<str name="facet">on</str>
|
||||
<str name="facet.field">cat</str>
|
||||
<str name="facet.field">manu_exact</str>
|
||||
<str name="facet.field">content_type</str>
|
||||
<str name="facet.field">author_s</str>
|
||||
<str name="facet.query">ipod</str>
|
||||
<str name="facet.query">GB</str>
|
||||
<str name="facet.mincount">1</str>
|
||||
<str name="facet.pivot">cat,inStock</str>
|
||||
<str name="facet.range.other">after</str>
|
||||
<str name="facet.range">price</str>
|
||||
<int name="f.price.facet.range.start">0</int>
|
||||
<int name="f.price.facet.range.end">600</int>
|
||||
<int name="f.price.facet.range.gap">50</int>
|
||||
<str name="facet.range">popularity</str>
|
||||
<int name="f.popularity.facet.range.start">0</int>
|
||||
<int name="f.popularity.facet.range.end">10</int>
|
||||
<int name="f.popularity.facet.range.gap">3</int>
|
||||
<str name="facet.range">manufacturedate_dt</str>
|
||||
<str name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
|
||||
<str name="f.manufacturedate_dt.facet.range.end">NOW</str>
|
||||
<str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
|
||||
<str name="f.manufacturedate_dt.facet.range.other">before</str>
|
||||
<str name="f.manufacturedate_dt.facet.range.other">after</str>
|
||||
|
||||
<!-- Highlighting defaults -->
|
||||
<str name="hl">on</str>
|
||||
<str name="hl.fl">content features title name</str>
|
||||
<str name="hl.encoder">html</str>
|
||||
<str name="hl.simple.pre"><b></str>
|
||||
<str name="hl.simple.post"></b></str>
|
||||
<str name="f.title.hl.fragsize">0</str>
|
||||
<str name="f.title.hl.alternateField">title</str>
|
||||
<str name="f.name.hl.fragsize">0</str>
|
||||
<str name="f.name.hl.alternateField">name</str>
|
||||
<str name="f.content.hl.snippets">3</str>
|
||||
<str name="f.content.hl.fragsize">200</str>
|
||||
<str name="f.content.hl.alternateField">content</str>
|
||||
<str name="f.content.hl.maxAlternateFieldLength">750</str>
|
||||
|
||||
<!-- Spell checking defaults -->
|
||||
<str name="spellcheck">on</str>
|
||||
<str name="spellcheck.extendedResults">false</str>
|
||||
<str name="spellcheck.count">5</str>
|
||||
<str name="spellcheck.alternativeTermCount">2</str>
|
||||
<str name="spellcheck.maxResultsForSuggest">5</str>
|
||||
<str name="spellcheck.collate">true</str>
|
||||
<str name="spellcheck.collateExtendedResults">true</str>
|
||||
<str name="spellcheck.maxCollationTries">5</str>
|
||||
<str name="spellcheck.maxCollations">3</str>
|
||||
</lst>
|
||||
|
||||
<!-- append spellchecking to our list of components -->
|
||||
<arr name="last-components">
|
||||
<str>spellcheck</str>
|
||||
</arr>
|
||||
</requestHandler>
|
||||
|
||||
|
||||
<!-- Update Request Handler.
|
||||
@@ -1736,12 +1639,6 @@
|
||||
-->
|
||||
<str name="content-type">text/plain; charset=UTF-8</str>
|
||||
</queryResponseWriter>
|
||||
|
||||
<!--
|
||||
Custom response writers can be declared as needed...
|
||||
-->
|
||||
<queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy"/>
|
||||
|
||||
|
||||
<!-- XSLT response writer transforms the XML output by any xslt file found
|
||||
in Solr's conf/xslt directory. Changes to xslt files are checked for
|
||||
|
@@ -28,7 +28,8 @@ function getSummary() {
|
||||
{
|
||||
resultStr = resultStr + "<dt style=\"width: 45%;\">" + index + ": </dt><dd style=\"width: 45%;\">" + responseObj.Summary.alfresco[summaryList[index]] + "</dd>"
|
||||
}
|
||||
document.getElementById("summaryReportLink").innerHTML = "<a href=\"" + window.location.pathname + "admin/cores?action=SUMMARY&wt=xml\" target=\"new\">View full report (opens in a new window)</a>";
|
||||
|
||||
document.getElementById("summaryReportLink").innerHTML = "<a href=\"" + encodeURI(window.location.pathname) + "admin/cores?action=SUMMARY&wt=xml\" target=\"new\">View full report (opens in a new window)</a>";
|
||||
document.getElementById("reportSummaryResults").innerHTML = resultStr;
|
||||
}
|
||||
}
|
||||
@@ -71,7 +72,7 @@ function getftsStatus() {
|
||||
var newVal = (ftsValues["New"]) ? (ftsValues["New"]) : 0;
|
||||
resultStr = resultStr + "<dt>FTS Status New: </dt><dd>" + newVal + "</dd>";
|
||||
|
||||
document.getElementById("ftsStatusReportLink").innerHTML = "<a href=\"" + window.location.pathname + "admin/cores?action=REPORT&wt=xml\" target=\"_blank\">View full report (opens in a new window)</a><br/>Note: The FTS status report can take some time to generate";
|
||||
document.getElementById("ftsStatusReportLink").innerHTML = "<a href=\"" + encodeURI(window.location.pathname) + "admin/cores?action=REPORT&wt=xml\" target=\"_blank\">View full report (opens in a new window)</a><br/>Note: The FTS status report can take some time to generate";
|
||||
|
||||
document.getElementById("reportFTSStatusResults").innerHTML = resultStr;
|
||||
}
|
||||
@@ -141,9 +142,9 @@ getftsStatus();
|
||||
<div>
|
||||
|
||||
<script type="text/javascript">
|
||||
document.getElementById("errorLink").innerHTML = "<a href=\"" + window.location.pathname + "alfresco/query?q=ERROR*&wt=xml\" target=\"_blank\">Solr Errors</a>";
|
||||
document.getElementById("exceptionMessageLink").innerHTML = "<a href=\"" + window.location.pathname + "alfresco/query?q=EXCEPTIONMESSAGE:*&wt=xml\" target=\"_blank\">Solr Exception Messages</a>";
|
||||
document.getElementById("exceptionStackLink").innerHTML = "<a href=\"" + window.location.pathname + "alfresco/query?q=EXCEPTIONSTACK:*\" target=\"_blank\">Solr Exceptions Stack</a>";
|
||||
document.getElementById("errorLink").innerHTML = "<a href=\"" + encodeURI(window.location.pathname) + "alfresco/query?q=ERROR*&wt=xml\" target=\"_blank\">Solr Errors</a>";
|
||||
document.getElementById("exceptionMessageLink").innerHTML = "<a href=\"" + encodeURI(window.location.pathname) + "alfresco/query?q=EXCEPTIONMESSAGE:*&wt=xml\" target=\"_blank\">Solr Exception Messages</a>";
|
||||
document.getElementById("exceptionStackLink").innerHTML = "<a href=\"" + encodeURI(window.location.pathname) + "alfresco/query?q=EXCEPTIONSTACK:*\" target=\"_blank\">Solr Exceptions Stack</a>";
|
||||
</script>
|
||||
|
||||
|
||||
|
@@ -915,104 +915,6 @@
|
||||
</requestHandler>
|
||||
|
||||
<requestHandler name="/admin/luke" class="org.apache.solr.handler.component.AlfrescoLukeRequestHandler" />
|
||||
|
||||
<!-- A Robust Example
|
||||
|
||||
This example SearchHandler declaration shows off usage of the
|
||||
SearchHandler with many defaults declared
|
||||
|
||||
Note that multiple instances of the same Request Handler
|
||||
(SearchHandler) can be registered multiple times with different
|
||||
names (and different init parameters)
|
||||
-->
|
||||
<requestHandler name="/browse" class="solr.SearchHandler">
|
||||
<lst name="defaults">
|
||||
<str name="echoParams">explicit</str>
|
||||
|
||||
<!-- VelocityResponseWriter settings -->
|
||||
<str name="wt">velocity</str>
|
||||
<str name="v.template">browse</str>
|
||||
<str name="v.layout">layout</str>
|
||||
<str name="title">Solritas</str>
|
||||
|
||||
<!-- Query settings -->
|
||||
<str name="defType">edismax</str>
|
||||
<str name="qf">
|
||||
text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
|
||||
title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
|
||||
</str>
|
||||
<str name="df">text</str>
|
||||
<str name="mm">100%</str>
|
||||
<str name="q.alt">*:*</str>
|
||||
<str name="rows">10</str>
|
||||
<str name="fl">*,score</str>
|
||||
|
||||
<str name="mlt.qf">
|
||||
text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4
|
||||
title^10.0 description^5.0 keywords^5.0 author^2.0 resourcename^1.0
|
||||
</str>
|
||||
<str name="mlt.fl">text,features,name,sku,id,manu,cat,title,description,keywords,author,resourcename</str>
|
||||
<int name="mlt.count">3</int>
|
||||
|
||||
<!-- Faceting defaults -->
|
||||
<str name="facet">on</str>
|
||||
<str name="facet.field">cat</str>
|
||||
<str name="facet.field">manu_exact</str>
|
||||
<str name="facet.field">content_type</str>
|
||||
<str name="facet.field">author_s</str>
|
||||
<str name="facet.query">ipod</str>
|
||||
<str name="facet.query">GB</str>
|
||||
<str name="facet.mincount">1</str>
|
||||
<str name="facet.pivot">cat,inStock</str>
|
||||
<str name="facet.range.other">after</str>
|
||||
<str name="facet.range">price</str>
|
||||
<int name="f.price.facet.range.start">0</int>
|
||||
<int name="f.price.facet.range.end">600</int>
|
||||
<int name="f.price.facet.range.gap">50</int>
|
||||
<str name="facet.range">popularity</str>
|
||||
<int name="f.popularity.facet.range.start">0</int>
|
||||
<int name="f.popularity.facet.range.end">10</int>
|
||||
<int name="f.popularity.facet.range.gap">3</int>
|
||||
<str name="facet.range">manufacturedate_dt</str>
|
||||
<str name="f.manufacturedate_dt.facet.range.start">NOW/YEAR-10YEARS</str>
|
||||
<str name="f.manufacturedate_dt.facet.range.end">NOW</str>
|
||||
<str name="f.manufacturedate_dt.facet.range.gap">+1YEAR</str>
|
||||
<str name="f.manufacturedate_dt.facet.range.other">before</str>
|
||||
<str name="f.manufacturedate_dt.facet.range.other">after</str>
|
||||
|
||||
<!-- Highlighting defaults -->
|
||||
<str name="hl">on</str>
|
||||
<str name="hl.fl">content features title name</str>
|
||||
<str name="hl.encoder">html</str>
|
||||
<str name="hl.simple.pre"><b></str>
|
||||
<str name="hl.simple.post"></b></str>
|
||||
<str name="f.title.hl.fragsize">0</str>
|
||||
<str name="f.title.hl.alternateField">title</str>
|
||||
<str name="f.name.hl.fragsize">0</str>
|
||||
<str name="f.name.hl.alternateField">name</str>
|
||||
<str name="f.content.hl.snippets">3</str>
|
||||
<str name="f.content.hl.fragsize">200</str>
|
||||
<str name="f.content.hl.alternateField">content</str>
|
||||
<str name="f.content.hl.maxAlternateFieldLength">750</str>
|
||||
|
||||
<!-- Spell checking defaults -->
|
||||
<str name="spellcheck">on</str>
|
||||
<str name="spellcheck.extendedResults">false</str>
|
||||
<str name="spellcheck.count">5</str>
|
||||
<str name="spellcheck.alternativeTermCount">2</str>
|
||||
<str name="spellcheck.maxResultsForSuggest">5</str>
|
||||
<str name="spellcheck.collate">true</str>
|
||||
<str name="spellcheck.collateExtendedResults">true</str>
|
||||
<str name="spellcheck.maxCollationTries">5</str>
|
||||
<str name="spellcheck.maxCollations">3</str>
|
||||
</lst>
|
||||
|
||||
<!-- append spellchecking to our list of components -->
|
||||
<arr name="last-components">
|
||||
<str>spellcheck</str>
|
||||
</arr>
|
||||
</requestHandler>
|
||||
|
||||
|
||||
<!-- Update Request Handler.
|
||||
|
||||
@@ -1759,11 +1661,6 @@
|
||||
<str name="content-type">text/plain; charset=UTF-8</str>
|
||||
</queryResponseWriter>
|
||||
|
||||
<!--
|
||||
Custom response writers can be declared as needed...
|
||||
-->
|
||||
<queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" startup="lazy"/>
|
||||
|
||||
|
||||
<!-- XSLT response writer transforms the XML output by any xslt file found
|
||||
in Solr's conf/xslt directory. Changes to xslt files are checked for
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Search Services
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
@@ -28,7 +28,7 @@ package org.alfresco.repo.search.impl.lucene.analysis;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.fail;
|
||||
import static org.mockito.Matchers.any;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -51,7 +51,7 @@ import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.runners.MockitoJUnitRunner;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
|
||||
/**
|
||||
* Retrofitted tests for the {@link MLAnalayser} class. These
|
||||
|
@@ -42,7 +42,6 @@ import org.apache.chemistry.opencmis.commons.impl.json.JSONValue;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.hadoop.util.Time;
|
||||
import org.apache.lucene.search.Query;
|
||||
import org.apache.lucene.search.TopDocs;
|
||||
import org.apache.solr.SolrTestCaseJ4;
|
||||
@@ -277,7 +276,7 @@ public abstract class AbstractAlfrescoSolrIT implements SolrTestFiles, AlfrescoS
|
||||
if (CORE_NOT_YET_CREATED)
|
||||
{
|
||||
|
||||
testExecutionSolrHome = TEST_EXECUTION_FOLDER + "/" + Time.now() + "/solrhome";
|
||||
testExecutionSolrHome = TEST_EXECUTION_FOLDER + "/" + System.currentTimeMillis() + "/solrhome";
|
||||
testSolrCollection = testExecutionSolrHome + "/collection1";
|
||||
testSolrConf = testSolrCollection + "/conf/";
|
||||
templateConf = testExecutionSolrHome + "/templates/%s/conf/";
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Search Services
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 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
|
||||
@@ -75,7 +75,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
import java.util.stream.Stream;
|
||||
|
@@ -52,12 +52,6 @@ import org.apache.lucene.search.TermQuery;
|
||||
import org.apache.solr.SolrTestCaseJ4;
|
||||
import org.apache.solr.client.solrj.response.QueryResponse;
|
||||
import org.apache.solr.common.params.HighlightParams;
|
||||
import org.apache.solr.handler.component.AlfrescoSolrHighlighter;
|
||||
import org.apache.solr.handler.component.HighlightComponent;
|
||||
import org.apache.solr.highlight.SolrHighlighter;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Search Services
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
@@ -35,7 +35,6 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Search Services
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 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
|
||||
@@ -41,7 +41,6 @@ import static org.alfresco.solr.AlfrescoSolrUtils.list;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.search.adaptor.QueryConstants;
|
||||
@@ -51,8 +50,8 @@ import org.alfresco.solr.AbstractAlfrescoSolrIT;
|
||||
import org.alfresco.solr.client.Acl;
|
||||
import org.alfresco.solr.client.AclChangeSet;
|
||||
import org.alfresco.solr.client.AclReaders;
|
||||
import org.alfresco.solr.client.ContentPropertyValue;
|
||||
import org.alfresco.solr.client.Node;
|
||||
import org.alfresco.solr.client.Node.SolrApiNodeStatus;
|
||||
import org.alfresco.solr.client.NodeMetaData;
|
||||
import org.alfresco.solr.client.SOLRAPIQueueClient;
|
||||
import org.alfresco.solr.client.StringPropertyValue;
|
||||
@@ -98,6 +97,7 @@ public class AlfrescoSolrTrackerIT extends AbstractAlfrescoSolrIT
|
||||
SOLRAPIQueueClient.ACL_READERS_MAP.clear();
|
||||
SOLRAPIQueueClient.ACL_MAP.clear();
|
||||
SOLRAPIQueueClient.NODE_MAP.clear();
|
||||
SOLRAPIQueueClient.NODE_FAILED_TRANSFORM_LIST.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -144,20 +144,23 @@ public class AlfrescoSolrTrackerIT extends AbstractAlfrescoSolrIT
|
||||
//Next create two nodes to update for the transaction
|
||||
Node folderNode = getNode(txn, acl, Node.SolrApiNodeStatus.UPDATED);
|
||||
Node fileNode = getNode(txn, acl, Node.SolrApiNodeStatus.UPDATED);
|
||||
Node transformFailedNode = getNode(txn, acl, SolrApiNodeStatus.UPDATED);
|
||||
Node errorNode = getNode(txn, acl, Node.SolrApiNodeStatus.UPDATED);
|
||||
logger.info("######### error node:"+errorNode.getId());
|
||||
|
||||
//Next create the NodeMetaData for each node. TODO: Add more metadata
|
||||
NodeMetaData folderMetaData = getNodeMetaData(folderNode, txn, acl, "mike", null, false);
|
||||
NodeMetaData fileMetaData = getNodeMetaData(fileNode, txn, acl, "mike", ancestors(folderMetaData.getNodeRef()), false);
|
||||
NodeMetaData fileMetaData = getNodeMetaData(fileNode, txn, acl, "mike", ancestors(folderMetaData.getNodeRef()), false);
|
||||
NodeMetaData transformFailedMetaData = getNodeMetaData(transformFailedNode, txn, acl, "lisa", ancestors(folderMetaData.getNodeRef()), false);
|
||||
//The errorNodeMetaData will cause an exception.
|
||||
NodeMetaData errorMetaData = getNodeMetaData(errorNode, txn, acl, "lisa", ancestors(folderMetaData.getNodeRef()), true);
|
||||
NodeMetaData errorMetaData = getNodeMetaData(errorNode, txn, acl, "lisa", ancestors(folderMetaData.getNodeRef()), true);
|
||||
SOLRAPIQueueClient.NODE_FAILED_TRANSFORM_LIST.add(transformFailedNode.getId());
|
||||
|
||||
//Index the transaction, nodes, and nodeMetaDatas.
|
||||
//Note that the content is automatically created by the test framework.
|
||||
indexTransaction(txn,
|
||||
list(errorNode, folderNode, fileNode),
|
||||
list(errorMetaData, folderMetaData, fileMetaData));
|
||||
list(errorNode, folderNode, fileNode, transformFailedNode),
|
||||
list(errorMetaData, folderMetaData, fileMetaData, transformFailedMetaData));
|
||||
|
||||
//Check for the TXN state stamp.
|
||||
logger.info("#################### Started Second Test ##############################");
|
||||
@@ -195,16 +198,24 @@ public class AlfrescoSolrTrackerIT extends AbstractAlfrescoSolrIT
|
||||
logger.info("#################### Passed Fourth Test ##############################");
|
||||
|
||||
|
||||
|
||||
|
||||
//Check for the error doc
|
||||
|
||||
waitForDocCount(new TermQuery(new Term(QueryConstants.FIELD_DOC_TYPE, "ErrorNode")), 1, MAX_WAIT_TIME);
|
||||
|
||||
logger.info("#################### Passed Fifth Test ##############################");
|
||||
|
||||
builder = new BooleanQuery.Builder();
|
||||
builder.add(new BooleanClause(new TermQuery(new Term("content@s__tr_status@{http://www.alfresco.org/model/content/1.0}content", "transform_failed")), BooleanClause.Occur.MUST));
|
||||
waitForDocCount(builder.build(), 1, MAX_WAIT_TIME);
|
||||
|
||||
SOLRAPIQueueClient.NODE_FAILED_TRANSFORM_LIST.clear();
|
||||
|
||||
//Check if the node with the transform_failed status has been reindexed
|
||||
builder = new BooleanQuery.Builder();
|
||||
builder.add(new BooleanClause(new TermQuery(new Term("content@s__tr_status@{http://www.alfresco.org/model/content/1.0}content", "transform_failed")), BooleanClause.Occur.MUST));
|
||||
waitForDocCount(builder.build(), 0, MAX_WAIT_TIME);
|
||||
|
||||
logger.info("#################### Passed Sixth Test ##############################");
|
||||
|
||||
//Mark the folder as needing cascade
|
||||
Transaction txn1 = getTransaction(0, 1);
|
||||
@@ -228,7 +239,7 @@ public class AlfrescoSolrTrackerIT extends AbstractAlfrescoSolrIT
|
||||
builder.add(new BooleanClause(LegacyNumericRangeQuery.newLongRange(QueryConstants.FIELD_S_TXID, txn1.getId(), txn1.getId() + 1, true, false), BooleanClause.Occur.MUST));
|
||||
waitForDocCount(builder.build(), 1, MAX_WAIT_TIME);
|
||||
|
||||
logger.info("#################### Passed Sixth Test ##############################");
|
||||
logger.info("#################### Passed Seventh Test ##############################");
|
||||
|
||||
|
||||
TermQuery termQuery1 = new TermQuery(new Term(QueryConstants.FIELD_ANCESTOR, nodeRef.toString()));
|
||||
@@ -246,31 +257,15 @@ public class AlfrescoSolrTrackerIT extends AbstractAlfrescoSolrIT
|
||||
assertQ(req, "*[count(//doc)=1]","//result/doc[1]/long[@name='DBID'][.='" + fileNode.getId() + "']");
|
||||
|
||||
|
||||
logger.info("#################### Passed Seventh Test ##############################");
|
||||
|
||||
|
||||
//Check that both documents have been indexed and have content.
|
||||
waitForDocCount(new TermQuery(new Term("content@s___t@{http://www.alfresco.org/model/content/1.0}content", "world")), 2, MAX_WAIT_TIME);
|
||||
|
||||
logger.info("#################### Passed Eighth Test ##############################");
|
||||
|
||||
|
||||
//Add document with isContentIndexed=false
|
||||
//Check that both documents have been indexed and have content.
|
||||
waitForDocCount(new TermQuery(new Term("content@s___t@{http://www.alfresco.org/model/content/1.0}content", "world")), 3, MAX_WAIT_TIME);
|
||||
|
||||
Transaction txnNoContent = getTransaction(0, 1);
|
||||
Node noContentNode = getNode(txnNoContent, acl, Node.SolrApiNodeStatus.UPDATED);
|
||||
NodeMetaData noContentMetaData = getNodeMetaData(noContentNode, txnNoContent, acl, "mike", null, false);
|
||||
noContentMetaData.getProperties().put(ContentModel.PROP_IS_CONTENT_INDEXED, new StringPropertyValue("false"));
|
||||
noContentMetaData.getProperties().put(ContentModel.PROP_CONTENT, new ContentPropertyValue(Locale.UK, 298L, "UTF-8", "text/json", null));
|
||||
indexTransaction(txnNoContent, list(noContentNode), list(noContentMetaData));
|
||||
|
||||
//This tests that the mime type has been added for this document. It is the only document with text/json in the index.
|
||||
waitForDocCount(new TermQuery(new Term("content@s__mimetype@{http://www.alfresco.org/model/content/1.0}content", "text/json")), 1, MAX_WAIT_TIME);
|
||||
//Many of the tests beyond this point rely on a specific count of documents in the index that have content.
|
||||
//This document should not have had the content indexed so the tests following will pass.
|
||||
//If the content had been indexed the tests following this one would have failed.
|
||||
//This proves that the ContentModel.PROP_IS_CONTENT_INDEXED property is being followed by the tracker
|
||||
logger.info("#################### Passed Ninth Test ##############################");
|
||||
|
||||
testIsContentIndexed(acl);
|
||||
|
||||
//Try bulk loading
|
||||
|
||||
@@ -289,9 +284,9 @@ public class AlfrescoSolrTrackerIT extends AbstractAlfrescoSolrIT
|
||||
|
||||
logger.info("############################ Bulk Nodes:" + nodes.size());
|
||||
indexTransaction(txn2, nodes, nodeMetaDatas);
|
||||
waitForDocCount(new TermQuery(new Term("content@s___t@{http://www.alfresco.org/model/content/1.0}content", "world")), 552, MAX_WAIT_TIME);
|
||||
waitForDocCount(new TermQuery(new Term("content@s___t@{http://www.alfresco.org/model/content/1.0}content", "world")), 553, MAX_WAIT_TIME);
|
||||
|
||||
logger.info("#################### Passed Ninth Test ##############################");
|
||||
logger.info("#################### Passed Tenth Test ##############################");
|
||||
|
||||
for(int i=0; i<1000; i++)
|
||||
{
|
||||
@@ -305,9 +300,9 @@ public class AlfrescoSolrTrackerIT extends AbstractAlfrescoSolrIT
|
||||
indexTransaction(txnX, nodesX, nodeMetaDatasX);
|
||||
}
|
||||
|
||||
waitForDocCount(new TermQuery(new Term("content@s___t@{http://www.alfresco.org/model/content/1.0}content", "world")), 1552, MAX_WAIT_TIME);
|
||||
waitForDocCount(new TermQuery(new Term("content@s___t@{http://www.alfresco.org/model/content/1.0}content", "world")), 1553, MAX_WAIT_TIME);
|
||||
|
||||
logger.info("#################### Passed Tenth Test ##############################");
|
||||
logger.info("#################### Passed Eleventh Test ##############################");
|
||||
|
||||
|
||||
//Test the maintenance methods
|
||||
@@ -324,7 +319,7 @@ public class AlfrescoSolrTrackerIT extends AbstractAlfrescoSolrIT
|
||||
builder.add(new BooleanClause(new TermQuery(new Term(QueryConstants.FIELD_OWNER, "amy")), BooleanClause.Occur.MUST));
|
||||
waitForDocCount(builder.build(), 1, MAX_WAIT_TIME);
|
||||
|
||||
logger.info("#################### Passed Eleventh Test ##############################");
|
||||
logger.info("#################### Passed Twelfth Test ##############################");
|
||||
|
||||
|
||||
// Wait for a document that has the new owner and the content populated.
|
||||
@@ -333,7 +328,7 @@ public class AlfrescoSolrTrackerIT extends AbstractAlfrescoSolrIT
|
||||
builder.add(new BooleanClause(new TermQuery(new Term(QueryConstants.FIELD_OWNER, "jill")), BooleanClause.Occur.MUST));
|
||||
waitForDocCount(builder.build(), 1, MAX_WAIT_TIME);
|
||||
|
||||
logger.info("#################### Passed Twelth Test ##############################");
|
||||
logger.info("#################### Passed Thirteenth Test ##############################");
|
||||
|
||||
|
||||
|
||||
@@ -415,7 +410,7 @@ public class AlfrescoSolrTrackerIT extends AbstractAlfrescoSolrIT
|
||||
|
||||
waitForDocCount(new TermQuery(new Term(QueryConstants.FIELD_READER, "paul")), 0, MAX_WAIT_TIME); //paul should be purged
|
||||
waitForDocCount(new TermQuery(new Term("content@s___t@{http://www.alfresco.org/model/content/1.0}content", Long.toString(fileNode.getId()))), 0, MAX_WAIT_TIME);
|
||||
waitForDocCount(new TermQuery(new Term("content@s___t@{http://www.alfresco.org/model/content/1.0}content", "world")), 1001, MAX_WAIT_TIME); // Refects the purged node and transaction
|
||||
waitForDocCount(new TermQuery(new Term("content@s___t@{http://www.alfresco.org/model/content/1.0}content", "world")), 1002, MAX_WAIT_TIME); // Refects the purged node and transaction
|
||||
|
||||
logger.info("#################### Passed Eighteenth Test ##############################");
|
||||
|
||||
@@ -435,4 +430,48 @@ public class AlfrescoSolrTrackerIT extends AbstractAlfrescoSolrIT
|
||||
waitForDocCount(new TermQuery(new Term("content@s___t@{http://www.alfresco.org/model/content/1.0}content", Long.toString(errorNode.getId()))), 1, MAX_WAIT_TIME);
|
||||
logger.info("#################### Passed Nineteenth Test ##############################");
|
||||
}
|
||||
|
||||
// test cm:isContentIndexed property
|
||||
private void testIsContentIndexed(Acl acl) throws Exception
|
||||
{
|
||||
// number of existing documents before running this test
|
||||
final int previousNumberOfDocuments = 3;
|
||||
|
||||
waitForDocCount(new TermQuery(new Term("content@s___t@{http://www.alfresco.org/model/content/1.0}content", "world")), previousNumberOfDocuments, MAX_WAIT_TIME);
|
||||
|
||||
// adds a document with cm:indexControl aspect with "cm:isIndexed" as true and "cm:isContentIndexed" is false
|
||||
Transaction txnWithAspect = getTransaction(0, 1);
|
||||
Node aspectNode = getNode(txnWithAspect, acl, Node.SolrApiNodeStatus.UPDATED);
|
||||
NodeMetaData aspectNodeMetaData = getNodeMetaData(aspectNode, txnWithAspect, acl, "mike", null, false);
|
||||
aspectNodeMetaData.getAspects().add(ContentModel.ASPECT_INDEX_CONTROL);
|
||||
aspectNodeMetaData.getProperties().put(ContentModel.PROP_IS_INDEXED, new StringPropertyValue("true"));
|
||||
aspectNodeMetaData.getProperties().put(ContentModel.PROP_IS_CONTENT_INDEXED, new StringPropertyValue("false"));
|
||||
indexTransaction(txnWithAspect, list(aspectNode), list(aspectNodeMetaData));
|
||||
|
||||
// the new document is not supposed to be indexed
|
||||
waitForDocCount(new TermQuery(new Term("content@s___t@{http://www.alfresco.org/model/content/1.0}content", "world")), previousNumberOfDocuments, MAX_WAIT_TIME);
|
||||
|
||||
// switch "cm:isContentIndexed" from false to true
|
||||
Transaction txnContentIndexedFromTrueToFalse = getTransaction(0, 1);
|
||||
aspectNodeMetaData.getProperties().put(ContentModel.PROP_IS_CONTENT_INDEXED, new StringPropertyValue("true"));
|
||||
indexTransaction(txnContentIndexedFromTrueToFalse, list(aspectNode), list(aspectNodeMetaData));
|
||||
|
||||
// it's supposed the new document to be indexed
|
||||
waitForDocCount(new TermQuery(new Term("content@s___t@{http://www.alfresco.org/model/content/1.0}content", "world")), previousNumberOfDocuments+1, MAX_WAIT_TIME);
|
||||
|
||||
// switch "cm:isContentIndexed" from true to false
|
||||
Transaction txnContentIndexedFromFalseToTrue = getTransaction(0, 1);
|
||||
aspectNodeMetaData.getProperties().put(ContentModel.PROP_IS_CONTENT_INDEXED, new StringPropertyValue("false"));
|
||||
indexTransaction(txnContentIndexedFromFalseToTrue, list(aspectNode), list(aspectNodeMetaData));
|
||||
|
||||
// it's supposed the new document not to be indexed again
|
||||
waitForDocCount(new TermQuery(new Term("content@s___t@{http://www.alfresco.org/model/content/1.0}content", "world")), previousNumberOfDocuments, MAX_WAIT_TIME);
|
||||
|
||||
// delete document
|
||||
Transaction txnDeleteContentIndexed = getTransaction(1, 0);
|
||||
indexTransaction(txnDeleteContentIndexed, list(aspectNode), list(aspectNodeMetaData));
|
||||
|
||||
// it's supposed to the new document disappear
|
||||
waitForDocCount(new TermQuery(new Term("content@s___t@{http://www.alfresco.org/model/content/1.0}content", "world")), previousNumberOfDocuments, MAX_WAIT_TIME);
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Search Services
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
@@ -30,8 +30,6 @@ import static java.util.Arrays.stream;
|
||||
import static java.util.stream.IntStream.range;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Mockito.reset;
|
||||
import static org.mockito.Mockito.when;
|
||||
import static org.alfresco.solr.AlfrescoSolrUtils.randomPositiveInteger;
|
||||
import static org.alfresco.solr.AlfrescoSolrUtils.randomShardCountGreaterThanOne;
|
||||
|
||||
|
@@ -26,27 +26,6 @@
|
||||
|
||||
package org.alfresco.solr.tracker;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.solr.AbstractAlfrescoDistributedIT;
|
||||
import org.alfresco.solr.client.Acl;
|
||||
import org.alfresco.solr.client.ContentPropertyValue;
|
||||
import org.alfresco.solr.client.Node;
|
||||
import org.alfresco.solr.client.NodeMetaData;
|
||||
import org.alfresco.solr.client.Transaction;
|
||||
import org.apache.lucene.index.Term;
|
||||
import org.apache.lucene.search.TermQuery;
|
||||
import org.apache.solr.SolrTestCaseJ4;
|
||||
import org.junit.After;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static java.util.Collections.singletonList;
|
||||
import static java.util.stream.Collectors.toList;
|
||||
import static java.util.stream.IntStream.range;
|
||||
@@ -59,6 +38,32 @@ import static org.alfresco.solr.AlfrescoSolrUtils.getNodeMetaData;
|
||||
import static org.alfresco.solr.AlfrescoSolrUtils.getTransaction;
|
||||
import static org.alfresco.solr.AlfrescoSolrUtils.indexAclChangeSet;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.solr.AbstractAlfrescoDistributedIT;
|
||||
import org.alfresco.solr.client.Acl;
|
||||
import org.alfresco.solr.client.ContentPropertyValue;
|
||||
import org.alfresco.solr.client.Node;
|
||||
import org.alfresco.solr.client.NodeMetaData;
|
||||
import org.alfresco.solr.client.Transaction;
|
||||
import org.apache.lucene.index.Term;
|
||||
import org.apache.lucene.search.BooleanClause;
|
||||
import org.apache.lucene.search.BooleanQuery;
|
||||
import org.apache.lucene.search.BooleanQuery.Builder;
|
||||
import org.apache.lucene.search.TermQuery;
|
||||
import org.apache.solr.SolrTestCaseJ4;
|
||||
import org.apache.solr.client.solrj.SolrClient;
|
||||
import org.apache.solr.client.solrj.response.QueryResponse;
|
||||
import org.junit.After;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
@SolrTestCaseJ4.SuppressSSL
|
||||
public class DistributedContentPropertiesIT extends AbstractAlfrescoDistributedIT
|
||||
{
|
||||
@@ -340,6 +345,83 @@ public class DistributedContentPropertiesIT extends AbstractAlfrescoDistributedI
|
||||
0, MAX_WAIT_TIME);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMNT23669() throws Exception
|
||||
{
|
||||
putHandleDefaults();
|
||||
|
||||
// ACL
|
||||
var aclChangeSet = getAclChangeSet(1, 1);
|
||||
var acl = getAcl(aclChangeSet);
|
||||
var aclReaders = getAclReaders(aclChangeSet, acl, singletonList("joel"), singletonList("phil"), null);
|
||||
indexAclChangeSet(aclChangeSet, singletonList(acl), singletonList(aclReaders));
|
||||
|
||||
// Nodes
|
||||
var howManyTestNodes = 2;
|
||||
var transaction = getTransaction(0, howManyTestNodes);
|
||||
var nodes = nodes(howManyTestNodes, transaction, acl);
|
||||
var metadata =
|
||||
metadata(nodes, transaction, acl)
|
||||
.stream()
|
||||
.peek(nodeMetadata -> nodeMetadata.getProperties().put(ContentModel.PROP_PERSONDESC, new ContentPropertyValue(Locale.US, 0L, "UTF-8", "text/plain", null)))
|
||||
.collect(toList());
|
||||
|
||||
var howManyNodesWithContent = howManyTestNodes;
|
||||
var baseCmContentText = "Test default content property";
|
||||
var basePersonDescriptionText = "custom content property text";
|
||||
|
||||
// Index for the first time
|
||||
indexTransactionWithMultipleContentFields(
|
||||
transaction,
|
||||
nodes,
|
||||
metadata,
|
||||
textContentWithMultipleContentFields(nodes, baseCmContentText, basePersonDescriptionText, howManyNodesWithContent));
|
||||
|
||||
// Ensure nodes are searchable using the current value
|
||||
waitForDocCount(
|
||||
new TermQuery(new Term("content@s___t@{http://www.alfresco.org/model/content/1.0}" + ContentModel.PROP_PERSONDESC.getLocalName(), "custom")),
|
||||
howManyNodesWithContent,
|
||||
MAX_WAIT_TIME);
|
||||
|
||||
// New transaction
|
||||
transaction = getTransaction(0, howManyTestNodes);
|
||||
for (var node : nodes)
|
||||
{
|
||||
node.setTxnId(transaction.getId());
|
||||
}
|
||||
|
||||
// Reindex nodes with a new custom content property value
|
||||
basePersonDescriptionText = "changing value for person description";
|
||||
indexTransactionWithMultipleContentFields(
|
||||
transaction,
|
||||
nodes,
|
||||
metadata,
|
||||
textContentWithMultipleContentFields(nodes, baseCmContentText, basePersonDescriptionText, howManyNodesWithContent));
|
||||
|
||||
// Build query that will search for old OR new value
|
||||
Builder builder = new BooleanQuery.Builder();
|
||||
Builder customContentBuilder = new BooleanQuery.Builder();
|
||||
TermQuery oldValueQuery = new TermQuery(new Term("content@s___t@{http://www.alfresco.org/model/content/1.0}" + ContentModel.PROP_PERSONDESC.getLocalName(), "custom"));
|
||||
TermQuery newValueQuery = new TermQuery(new Term("content@s___t@{http://www.alfresco.org/model/content/1.0}" + ContentModel.PROP_PERSONDESC.getLocalName(), "changing"));
|
||||
customContentBuilder.add(new BooleanClause(oldValueQuery, BooleanClause.Occur.SHOULD));
|
||||
customContentBuilder.add(new BooleanClause(newValueQuery, BooleanClause.Occur.SHOULD));
|
||||
builder.add(new BooleanClause(customContentBuilder.build(), BooleanClause.Occur.MUST));
|
||||
|
||||
// The query always has to return the expected number of results which means node are always searchable, either by the old OR new value
|
||||
SolrClient client = getStandaloneClients().get(0);
|
||||
int totalHits = 0;
|
||||
for (int i = 0; i < 15; i++)
|
||||
{
|
||||
QueryResponse response = client.query(luceneToSolrQuery(builder.build()));
|
||||
totalHits = (int) response.getResults().getNumFound();
|
||||
if (totalHits != howManyNodesWithContent)
|
||||
{
|
||||
fail("(" + i + ") Expecting " + howManyNodesWithContent + " results but " + totalHits + " have been returned");
|
||||
}
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
}
|
||||
|
||||
private List<Node> nodes(int howMany, Transaction transaction, Acl acl)
|
||||
{
|
||||
return range(0, howMany)
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Search Services
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
@@ -127,7 +127,7 @@ public class MetadataTrackerTest
|
||||
// Subsequent calls to getTransactions must return a different set of transactions to avoid an infinite loop
|
||||
when(repositoryClient.getTransactions(anyLong(), anyLong(), anyLong(), anyLong(), anyInt())).thenReturn(txs)
|
||||
.thenReturn(txs).thenReturn(mock(Transactions.class));
|
||||
when(repositoryClient.getTransactions(anyLong(), anyLong(), anyLong(), anyLong(), anyInt(), isNull(ShardState.class))).thenReturn(txs)
|
||||
when(repositoryClient.getTransactions(anyLong(), anyLong(), anyLong(), anyLong(), anyInt(), isNull())).thenReturn(txs)
|
||||
.thenReturn(txs).thenReturn(mock(Transactions.class));
|
||||
when(repositoryClient.getTransactions(anyLong(), anyLong(), anyLong(), anyLong(), anyInt(), any(ShardState.class))).thenReturn(txs)
|
||||
.thenReturn(txs).thenReturn(mock(Transactions.class));
|
||||
@@ -157,7 +157,7 @@ public class MetadataTrackerTest
|
||||
List<Transaction> txsList = new ArrayList<>();
|
||||
when(txs.getTransactions()).thenReturn(txsList);
|
||||
|
||||
when(repositoryClient.getTransactions(anyLong(), anyLong(), anyLong(), anyLong(), anyInt(), isNull(ShardState.class))).thenReturn(txs);
|
||||
when(repositoryClient.getTransactions(anyLong(), anyLong(), anyLong(), anyLong(), anyInt(), isNull())).thenReturn(txs);
|
||||
when(repositoryClient.getTransactions(anyLong(), anyLong(), anyLong(), anyLong(), anyInt(), any(ShardState.class))).thenReturn(txs);
|
||||
when(repositoryClient.getTransactions(anyLong(), anyLong(), anyLong(), anyLong(), anyInt())).thenReturn(txs);
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Search Services
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
@@ -28,9 +28,7 @@ package org.alfresco.solr.tracker;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Matchers.any;
|
||||
import static org.mockito.Matchers.anyString;
|
||||
import static org.mockito.Matchers.eq;
|
||||
import static org.mockito.ArgumentMatchers.*;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.spy;
|
||||
import static org.mockito.Mockito.verify;
|
||||
@@ -61,7 +59,7 @@ import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.runners.MockitoJUnitRunner;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class ModelTrackerIT
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Search Services
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
@@ -33,7 +33,7 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.runners.MockitoJUnitRunner;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
import org.quartz.JobDataMap;
|
||||
import org.quartz.JobDetail;
|
||||
import org.quartz.JobExecutionContext;
|
||||
|
@@ -1829,6 +1829,17 @@
|
||||
<mandatory>false</mandatory>
|
||||
<index enabled="true"/>
|
||||
</property>
|
||||
<property name="audio:trackType">
|
||||
<title>Track Number</title>
|
||||
<type>d:text</type>
|
||||
<mandatory>false</mandatory>
|
||||
<index enabled="true">
|
||||
<atomic>true</atomic>
|
||||
<stored>true</stored>
|
||||
<tokenised>false</tokenised>
|
||||
<facetable>false</facetable>
|
||||
</index>
|
||||
</property>
|
||||
<property name="audio:releaseDate">
|
||||
<title>Release Date</title>
|
||||
<type>d:date</type>
|
||||
|
@@ -188,7 +188,7 @@
|
||||
<queryResponseWriter name="xml" default="true"
|
||||
class="solr.XMLResponseWriter" />
|
||||
|
||||
<requestHandler name="/replication" class="org.alfresco.solr.handler.AlfrescoReplicationHandler">
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler">
|
||||
<lst name="master">
|
||||
<str name="replicateAfter">commit</str>
|
||||
<str name="confFiles">schema.xml</str>
|
||||
|
@@ -192,7 +192,7 @@
|
||||
<queryResponseWriter name="xml" default="true"
|
||||
class="solr.XMLResponseWriter" />
|
||||
|
||||
<requestHandler name="/replication" class="org.alfresco.solr.handler.AlfrescoReplicationHandler">
|
||||
<requestHandler name="/replication" class="solr.ReplicationHandler">
|
||||
<lst name="slave">
|
||||
<str name="masterUrl">{masterURL}</str>
|
||||
<str name="pollInterval">00:00:02</str>
|
||||
|
@@ -7,51 +7,53 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-search-parent</artifactId>
|
||||
<version>2.0.5</version>
|
||||
<version>2.0.9</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<dependency.alfresco-data-model.version>13.4</dependency.alfresco-data-model.version>
|
||||
<dependency.jackson.version>2.12.2</dependency.jackson.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-data-model</artifactId>
|
||||
<version>${dependency.alfresco-data-model.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.apache.hadoop</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.tika</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>com.zaxxer</groupId>
|
||||
<artifactId>SparseBitSet</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<version>${dependency.jackson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<version>${dependency.jackson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>${dependency.jackson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||
<artifactId>jackson-dataformat-smile</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
@@ -61,26 +63,22 @@
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.13.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>3.8.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-reload4j</artifactId>
|
||||
<version>${slf4j.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>solrclient</finalName>
|
||||
<plugins>
|
||||
<!-- Create a jar of test classes -->
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<executions>
|
||||
@@ -98,7 +96,7 @@
|
||||
<configuration>
|
||||
<excludes>
|
||||
<!-- Excluding this test, because it requires the
|
||||
keystore which is a part of SystemBuildTest. TODO: Consider moving this test
|
||||
keystore which is a part of SystemBuildTest.
|
||||
into that project or making it pass on its own. -->
|
||||
<exclude>**/SOLRAPIClientTest.java</exclude>
|
||||
</excludes>
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Search Services
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 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
|
||||
@@ -36,7 +36,6 @@ import java.net.ConnectException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -66,6 +65,7 @@ public class SOLRAPIQueueClient extends SOLRAPIClient
|
||||
public final static Map<Long, List<Node>> NODE_MAP = Collections.synchronizedMap(new HashMap<>());
|
||||
public final static Map<Long, NodeMetaData> NODE_META_DATA_MAP = Collections.synchronizedMap(new HashMap<>());
|
||||
public final static Map<Long, Map<QName, String>> NODE_CONTENT_MAP = Collections.synchronizedMap(new HashMap<>());
|
||||
public final static List<Long> NODE_FAILED_TRANSFORM_LIST = Collections.synchronizedList(new ArrayList<>());
|
||||
|
||||
private static boolean throwException;
|
||||
|
||||
@@ -362,6 +362,11 @@ public class SOLRAPIQueueClient extends SOLRAPIClient
|
||||
throw new ConnectException("THROWING EXCEPTION, better be ready!");
|
||||
}
|
||||
|
||||
if(NODE_FAILED_TRANSFORM_LIST.contains(nodeId))
|
||||
{
|
||||
return new GetTextContentResponse(new DummyTransformFailedResponse("transformFailed"));
|
||||
}
|
||||
|
||||
if(NODE_CONTENT_MAP.containsKey(nodeId))
|
||||
{
|
||||
return new GetTextContentResponse(new DummyResponse(NODE_CONTENT_MAP.get(nodeId).get(propertyQName)));
|
||||
@@ -410,6 +415,50 @@ public class SOLRAPIQueueClient extends SOLRAPIClient
|
||||
}
|
||||
}
|
||||
|
||||
private static class DummyTransformFailedResponse implements Response
|
||||
{
|
||||
private final String text;
|
||||
|
||||
public DummyTransformFailedResponse(String text)
|
||||
{
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStream getContentAsStream()
|
||||
{
|
||||
return new ByteArrayInputStream(text.getBytes());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStatus()
|
||||
{
|
||||
return HttpStatus.SC_NO_CONTENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void release()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHeader(String key)
|
||||
{
|
||||
if("X-Alfresco-transformStatus".equals(key))
|
||||
{
|
||||
return "transformFailed";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContentType()
|
||||
{
|
||||
return "text/html";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close()
|
||||
{
|
||||
|
@@ -1,41 +1,39 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Search Services
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 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%
|
||||
*/
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Search Services
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 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.solr.tracker;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import javax.annotation.concurrent.NotThreadSafe;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.alfresco.solr.InformationServerCollectionProvider;
|
||||
import org.alfresco.solr.adapters.ISimpleOrderedMap;
|
||||
import org.alfresco.util.Pair;
|
||||
@@ -287,10 +285,10 @@ public class TrackerStats
|
||||
map.add("StdDev", getStandardDeviation());
|
||||
if (incdludeDetail)
|
||||
{
|
||||
for (Entry<String, IncrementalStats> copy : copies.entrySet())
|
||||
{
|
||||
map.add(copy.getKey(), copy.getValue().getNamedList(includeHist, includeValues));
|
||||
}
|
||||
for (Entry<String, IncrementalStats> copy : copies.entrySet())
|
||||
{
|
||||
map.add(copy.getKey(), copy.getValue().getNamedList(includeHist, includeValues));
|
||||
}
|
||||
}
|
||||
|
||||
return map;
|
||||
@@ -385,7 +383,6 @@ public class TrackerStats
|
||||
|
||||
}
|
||||
|
||||
@NotThreadSafe
|
||||
public static class IncrementalStats
|
||||
{
|
||||
Date start = new Date();
|
||||
|
@@ -1,47 +1,48 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Search Services
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 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%
|
||||
*/
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Search Services
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 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.solr.client;
|
||||
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNotSame;
|
||||
import static org.junit.Assert.assertSame;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import org.alfresco.encryption.KeyResourceLoader;
|
||||
import org.alfresco.repo.dictionary.NamespaceDAO;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.solr.client.SOLRAPIClient;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.runners.MockitoJUnitRunner;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNotSame;
|
||||
import static org.junit.Assert.assertSame;
|
||||
import static org.mockito.Mockito.anyString;
|
||||
import static org.mockito.Mockito.eq;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class SOLRAPIClientFactoryTest
|
||||
|
@@ -4,9 +4,13 @@ alfresco.search.logs=SOLR_LOGS_DIR=../../logs\
|
||||
${line.separator}LOG4J_PROPS=$SOLR_LOGS_DIR/log4j.properties
|
||||
alfresco.gc.logs=GC_LOG_OPTS=""
|
||||
alfresco.gc.logs.win=REM set "GC_LOG_OPTS= "
|
||||
alfresco.gc.tune=GC_TUNE="-XX:+UseG1GC -XX:+PerfDisableSharedMem -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=250 -XX:+UseLargePages -XX:+AlwaysPreTouch -XX:+ExplicitGCInvokesConcurrent"
|
||||
alfresco.gc.tune.win=set GC_TUNE=-XX:+UseG1GC -XX:+PerfDisableSharedMem -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=250 -XX:+UseLargePages -XX:+AlwaysPreTouch -XX:+ExplicitGCInvokesConcurrent
|
||||
alfresco.search.logs.win=set SOLR_LOGS_DIR=..\\..\\logs\
|
||||
${line.separator}set LOG4J_CONFIG=file:!SOLR_LOGS_DIR!\\log4j.properties
|
||||
alfresco.search.config=# Alfresco configuration. This file is automatically included by solr. You can define your custom settings here\
|
||||
${line.separator}SOLR_OPTS="$SOLR_OPTS -Dsolr.jetty.request.header.size=1000000 -Dsolr.jetty.threads.stop.timeout=300000 -Ddisable.configEdit=true"
|
||||
alfresco.search.config.win=REM Alfresco configuration. This file is automatically included by solr. You can define your custom settings here\
|
||||
${line.separator}set SOLR_OPTS=%SOLR_OPTS% -Dsolr.jetty.request.header.size=1000000 -Dsolr.jetty.threads.stop.timeout=300000 -Ddisable.configEdit=true
|
||||
${line.separator}set SOLR_OPTS=%SOLR_OPTS% -Dsolr.jetty.request.header.size=1000000 -Dsolr.jetty.threads.stop.timeout=300000 -Ddisable.configEdit=true
|
||||
solr.gc.token=#GC_TUNE="-XX:NewRatio=3 -XX:SurvivorRatio=4 etc.
|
||||
solr.gc.token.win=REM set GC_TUNE=-XX:NewRatio=3 -XX:SurvivorRatio=4 etc.
|
@@ -12,7 +12,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-search-parent</artifactId>
|
||||
<version>2.0.5</version>
|
||||
<version>2.0.9</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<dependencies>
|
||||
@@ -32,7 +32,6 @@
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.13</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
@@ -159,23 +158,32 @@
|
||||
<configuration>
|
||||
<target>
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/jackson-annotations-2.5.4.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/janino-2.7.6.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/commons-compiler-2.7.6.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/jackson-core-2.5.4.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/jackson-databind-2.5.4.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/jackson-dataformat-smile-2.5.4.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/jackson-annotations-2.12.2.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/jackson-core-2.12.2.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/jackson-databind-2.12.2.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/jackson-dataformat-smile-2.12.2.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/jackson-core-asl-1.9.13.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/jackson-mapper-asl-1.9.13.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/dom4j-1.6.1.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/woodstox-core-asl-4.4.1.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/calcite-core-1.11.0.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/calcite-linq4j-1.11.0.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/hadoop-annotations-2.7.4.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/hadoop-auth-2.7.4.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/hadoop-common-2.7.4.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/hadoop-hdfs-2.7.4.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/hadoop-annotations-2.10.1.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/hadoop-auth-2.10.1.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/hadoop-common-2.10.1.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/hadoop-hdfs-2.10.1.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/hadoop-hdfs-client-2.10.1.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/avatica-core-1.9.0.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/org.restlet-2.3.0.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/org.restlet.ext.servlet-2.3.0.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/httpclient-4.4.1.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/guava-14.0.1.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/protobuf-java-3.6.1.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/libs/jquery-2.1.3.min.js" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/js/lib/jquery-1.7.2.min.js" />
|
||||
</target>
|
||||
@@ -214,6 +222,12 @@
|
||||
<replace token="GC logging" value="GC logging${line.separator}${alfresco.gc.logs.win}" dir="${solr.directory}">
|
||||
<include name="**/bin/solr.in.cmd" />
|
||||
</replace>
|
||||
<replace token="${solr.gc.token}" value="${alfresco.gc.tune}" dir="${solr.directory}">
|
||||
<include name="**/bin/solr.in.sh" />
|
||||
</replace>
|
||||
<replace token="${solr.gc.token.win}" value="${alfresco.gc.tune.win}" dir="${solr.directory}">
|
||||
<include name="**/bin/solr.in.cmd" />
|
||||
</replace>
|
||||
<replace token="# Anything you add to the SOLR_OPTS" value="${alfresco.search.config}${line.separator}${line.separator}# Anything you add to the SOLR_OPTS" dir="${solr.directory}">
|
||||
<include name="**/bin/solr.in.sh" />
|
||||
</replace>
|
||||
@@ -389,4 +403,4 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
</project>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Alfresco Search Services ${project.version} Docker Image
|
||||
|
||||
FROM alfresco/alfresco-base-java:11.0.13-centos-7@sha256:c1e399d1bbb5d08e0905f1a9ef915ee7c5ea0c0ede11cc9bd7ca98532a9b27fa
|
||||
FROM alfresco/alfresco-base-java:jre17-rockylinux8-202302221525
|
||||
LABEL creator="Alfresco" maintainer="Alfresco"
|
||||
|
||||
ENV DIST_DIR /opt/alfresco-search-services
|
||||
|
@@ -18,7 +18,7 @@ LOG_PROPERTIES=$PWD/logs/log4j.properties
|
||||
|
||||
if [[ $REPLICATION_TYPE == "master" ]]; then
|
||||
|
||||
findStringMaster='<requestHandler name="\/replication" class="org\.alfresco\.solr\.handler\.AlfrescoReplicationHandler">'
|
||||
findStringMaster='<requestHandler name="\/replication" class="solr\.ReplicationHandler">'
|
||||
|
||||
replaceStringMaster="\n\t<lst name=\"master\"> \n"
|
||||
|
||||
@@ -63,7 +63,7 @@ if [[ $REPLICATION_TYPE == "slave" ]]; then
|
||||
REPLICATION_POLL_INTERVAL=00:00:30
|
||||
fi
|
||||
|
||||
sed -i 's/<requestHandler name="\/replication" class="org\.alfresco\.solr\.handler\.AlfrescoReplicationHandler">/<requestHandler name="\/replication" class="org\.alfresco\.solr\.handler\.AlfrescoReplicationHandler">\
|
||||
sed -i 's/<requestHandler name="\/replication" class="solr\.ReplicationHandler">/<requestHandler name="\/replication" class="solr\.ReplicationHandler">\
|
||||
<lst name="slave">\
|
||||
<str name="masterUrl">'$REPLICATION_MASTER_PROTOCOL':\/\/'$REPLICATION_MASTER_HOST':'$REPLICATION_MASTER_PORT'\/solr\/${solr.core.name}<\/str>\
|
||||
<str name="pollInterval">'$REPLICATION_POLL_INTERVAL'<\/str>\
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2005-2019 Alfresco Software, Ltd. and others.
|
||||
Copyright (c) 2005-2023 Alfresco Software, Ltd. and others.
|
||||
All rights reserved. This program and the accompanying materials are made available under the terms of the Alfresco
|
||||
agreement located at www.alfresco.com/legal/agreements/ or other commercial agreement between Alfresco Software, Ltd.
|
||||
("Alfresco") and the user of this program.
|
||||
@@ -14,61 +14,63 @@ The Apache Lucene project page is https://lucene.apache.org/
|
||||
=== Common Public 1.0 ===
|
||||
wsdl4j-1.6.3.jar http://sourceforge.net/projects/wsdl4j
|
||||
|
||||
|
||||
=== BSD 3 ===
|
||||
antlr-runtime-3.5.2.jar http://www.antlr.org/
|
||||
ST4-4.0.8.jar https://www.stringtemplate.org/license.html
|
||||
antlr-3.5.2.jar http://www.antlr.org/
|
||||
antlr-runtime-3.5.3.jar http://www.antlr.org/
|
||||
ST4-4.3.1.jar https://www.stringtemplate.org/license.html
|
||||
antlr-3.5.3.jar http://www.antlr.org/
|
||||
jaxen-1.2.0.jar http://www.cafeconleche.org/jaxen/
|
||||
jsr305-3.0.1.jar http://code.google.com/p/jsr-305/
|
||||
|
||||
|
||||
=== BSD variant License ===
|
||||
xpp3-1.1.4c.jar http://www.extreme.indiana.edu/dist/java-repository/xpp3/licenses/LICENSE.txt
|
||||
|
||||
|
||||
=== JSON ===
|
||||
json-20210307.jar https://github.com/stleary/JSON-java
|
||||
|
||||
=== Public Domain ===
|
||||
json-20231013.jar https://github.com/stleary/JSON-java
|
||||
|
||||
=== Apache 2.0 ===
|
||||
error_prone_annotations-2.18.0.jar https://github.com/google/error-prone
|
||||
jsr305-3.0.2.jar https://mvnrepository.com/artifact/com.google.code.findbugs/jsr305/1.3.9
|
||||
geronimo-jta_1.1_spec-1.1.1.jar https://mvnrepository.com/artifact/org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1
|
||||
proj4j-1.1.5.jar https://github.com/locationtech/proj4j
|
||||
j2objc-annotations-2.8.jar https://github.com/google/j2objc
|
||||
json-path-2.8.0.jar https://github.com/json-path/JsonPath
|
||||
json-simple-1.1.1.jar https://github.com/fangyidong/json-simple
|
||||
apiguardian-api-1.1.2.jar https://github.com/apiguardian-team/apiguardian
|
||||
xml-resolver-1.2.jar https://github.com/FasterXML/jackson
|
||||
neethi-3.1.1.jar http://ws.apache.org/commons/neethi/
|
||||
commons-dbcp-1.4.jar http://jakarta.apache.org/commons/
|
||||
commons-logging-1.2.jar http://jakarta.apache.org/commons/
|
||||
commons-lang3-3.11.jar http://jakarta.apache.org/commons/
|
||||
commons-pool-1.5.4.jar http://jakarta.apache.org/commons/
|
||||
commons-compress-1.21.jar https://commons.apache.org/proper/commons-compress/
|
||||
commons-lang3-3.12.0.jar http://jakarta.apache.org/commons/
|
||||
commons-compress-1.23.0.jar https://commons.apache.org/proper/commons-compress/
|
||||
chemistry-opencmis-commons-impl-1.1.0.jar http://chemistry.apache.org/
|
||||
chemistry-opencmis-commons-api-1.1.0.jar http://chemistry.apache.org/
|
||||
xmlschema-core-2.2.5.jar http://ws.apache.org/commons/XmlSchema/
|
||||
HikariCP-java7-2.4.13.jar https://github.com/brettwooldridge/HikariCP
|
||||
cxf-core-3.2.14.jar https://cxf.apache.org/
|
||||
cxf-rt-bindings-soap-3.2.14.jar https://cxf.apache.org/
|
||||
cxf-rt-bindings-xml-3.2.14.jar https://cxf.apache.org/
|
||||
cxf-rt-databinding-jaxb-3.2.14.jar https://cxf.apache.org/
|
||||
cxf-rt-frontend-jaxws-3.2.14.jar https://cxf.apache.org/
|
||||
cxf-rt-frontend-simple-3.2.14.jar https://cxf.apache.org/
|
||||
cxf-rt-transports-http-3.2.14.jar https://cxf.apache.org/
|
||||
cxf-rt-ws-addr-3.2.14.jar https://cxf.apache.org/
|
||||
cxf-rt-ws-policy-3.2.14.jar https://cxf.apache.org/
|
||||
cxf-rt-wsdl-3.2.14.jar https://cxf.apache.org/
|
||||
cxf-core-3.4.8.jar https://cxf.apache.org/
|
||||
cxf-rt-bindings-soap-3.4.8.jar https://cxf.apache.org/
|
||||
cxf-rt-bindings-xml-3.4.8.jar https://cxf.apache.org/
|
||||
cxf-rt-databinding-jaxb-3.4.8.jar https://cxf.apache.org/
|
||||
cxf-rt-frontend-jaxws-3.4.8.jar https://cxf.apache.org/
|
||||
cxf-rt-frontend-simple-3.4.8.jar https://cxf.apache.org/
|
||||
cxf-rt-transports-http-3.4.8.jar https://cxf.apache.org/
|
||||
cxf-rt-ws-addr-3.4.8.jar https://cxf.apache.org/
|
||||
cxf-rt-ws-policy-3.4.8.jar https://cxf.apache.org/
|
||||
cxf-rt-wsdl-3.4.8.jar https://cxf.apache.org/
|
||||
chemistry-opencmis-server-support-1.0.0.jar http://chemistry.apache.org/
|
||||
chemistry-opencmis-server-bindings-1.0.0.jar http://chemistry.apache.org/
|
||||
failureaccess-1.0.1.jar https://mvnrepository.com/artifact/com.google.guava/failureaccess/1.0.1
|
||||
listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar https://mvnrepository.com/artifact/com.google.guava/listenablefuture
|
||||
quartz-2.3.2.jar http://quartz-scheduler.org/
|
||||
jackson-core-2.12.2.jar https://github.com/FasterXML/jackson
|
||||
jackson-annotations-2.12.2.jar https://github.com/FasterXML/jackson
|
||||
jackson-databind-2.12.2.jar https://github.com/FasterXML/jackson
|
||||
jackson-dataformat-smile-2.12.2.jar https://github.com/FasterXML/jackson
|
||||
commons-httpclient-3.1.jar http://jakarta.apache.org/commons/
|
||||
spring-aop-5.3.18.jar http://projects.spring.io/spring-framework/
|
||||
spring-beans-5.3.18.jar http://projects.spring.io/spring-framework/
|
||||
spring-context-5.3.18.jar http://projects.spring.io/spring-framework/
|
||||
spring-core-5.3.18.jar http://projects.spring.io/spring-framework/
|
||||
spring-expression-5.3.18.jar http://projects.spring.io/spring-framework/
|
||||
spring-jdbc-5.3.18.jar http://projects.spring.io/spring-framework/
|
||||
spring-orm-5.3.18.jar http://projects.spring.io/spring-framework/
|
||||
spring-tx-5.3.18.jar http://projects.spring.io/spring-framework/
|
||||
jackson-core-2.15.2.jar https://github.com/FasterXML/jackson
|
||||
jackson-annotations-2.15.2.jar https://github.com/FasterXML/jackson
|
||||
jackson-databind-2.15.2.jar https://github.com/FasterXML/jackson
|
||||
commons-httpclient-3.1-HTTPCLIENT-1265.jar http://jakarta.apache.org/commons/
|
||||
spring-aop-5.3.23.jar http://projects.spring.io/spring-framework/
|
||||
spring-beans-5.3.23.jar http://projects.spring.io/spring-framework/
|
||||
spring-context-5.3.23.jar http://projects.spring.io/spring-framework/
|
||||
spring-core-5.3.23.jar http://projects.spring.io/spring-framework/
|
||||
spring-expression-5.3.23.jar http://projects.spring.io/spring-framework/
|
||||
spring-jdbc-5.3.23.jar http://projects.spring.io/spring-framework/
|
||||
spring-orm-5.3.23.jar http://projects.spring.io/spring-framework/
|
||||
spring-tx-5.3.23.jar http://projects.spring.io/spring-framework/
|
||||
guessencoding-1.4.jar http://docs.codehaus.org/display/GUESSENC/
|
||||
jug-2.0.0-asl.jar http://jug.safehaus.org/
|
||||
acegi-security-0.8.2_patched.jar http://sourceforge.net/projects/acegisecurity/
|
||||
@@ -85,26 +87,7 @@ jetty-servlets-9.3.30.v20211001.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-util-9.3.30.v20211001.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-webapp-9.3.30.v20211001.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-xml-9.3.30.v20211001.jar https://www.eclipse.org/jetty/licenses.html
|
||||
woodstox-core-5.0.3.jar https://github.com/FasterXML/woodstox
|
||||
aggdesigner-algorithm-6.0.jar https://github.com/julianhyde/aggdesigner
|
||||
tika-core-1.27.jar https://github.com/apache/tika/blob/1.27/LICENSE.txt
|
||||
tika-java7-1.27.jar https://github.com/apache/tika/blob/1.27/LICENSE.txt
|
||||
tika-parsers-1.27.jar https://github.com/apache/tika/blob/1.27/LICENSE.txt
|
||||
tika-xmp-1.27.jar https://github.com/apache/tika/blob/1.27/LICENSE.txt
|
||||
jcommander-1.81.jar https://github.com/cbeust/jcommander/blob/1.81/license.txt
|
||||
preflight-2.0.24.jar https://github.com/apache/pdfbox/blob/2.0.24/LICENSE.txt
|
||||
xmpbox-2.0.24.jar https://github.com/apache/pdfbox/blob/2.0.24/LICENSE.txt
|
||||
isoparser-1.9.41.7.jar http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
metadata-extractor-2.15.0.1.jar http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
hadoop-annotations-2.7.7.jar https://github.com/apache/hadoop/blob/rel/release-2.7.7/LICENSE.txt
|
||||
hadoop-auth-2.7.7.jar https://github.com/apache/hadoop/blob/rel/release-2.7.7/LICENSE.txt
|
||||
hadoop-common-2.7.7.jar https://github.com/apache/hadoop/blob/rel/release-2.7.7/LICENSE.txt
|
||||
hadoop-hdfs-2.7.7.jar https://github.com/apache/hadoop/blob/rel/release-2.7.7/LICENSE.txt
|
||||
hadoop-annotations-2.10.1.jar https://github.com/apache/hadoop/blob/rel/release-2.10.1/LICENSE.txt
|
||||
hadoop-auth-2.10.1.jar https://github.com/apache/hadoop/blob/rel/release-2.10.1/LICENSE.txt
|
||||
hadoop-common-2.10.1.jar https://github.com/apache/hadoop/blob/rel/release-2.10.1/LICENSE.txt
|
||||
hadoop-hdfs-2.10.1.jar https://github.com/apache/hadoop/blob/rel/release-2.10.1/LICENSE.txt
|
||||
hadoop-hdfs-client-2.10.1.jar https://github.com/apache/hadoop/blob/rel/release-2.10.1/LICENSE.txt
|
||||
woodstox-core-6.2.8.jar https://github.com/FasterXML/woodstox
|
||||
org.restlet-2.3.12.jar https://github.com/restlet/restlet-framework-java/blob/2.3.12/README.md
|
||||
org.restlet.ext.servlet-2.3.12.jar https://github.com/restlet/restlet-framework-java/blob/2.3.12/README.md
|
||||
xercesImpl-2.11.0-alfresco-patched-20180402.jar http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
@@ -113,15 +96,12 @@ simple-xml-safe-2.7.1.jar https://github.com/carrotsearch/simplexml-safe/blob/re
|
||||
reload4j-1.2.18.3.jar http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
jackson-core-asl-1.9.14-atlassian-6.jar http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
jackson-mapper-asl-1.9.14-atlassian-6.jar http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
|
||||
|
||||
=== Creative Commons Public Domain ===
|
||||
jcip-annotations-1.0.jar https://jcip.net/listings.html
|
||||
gson-2.8.9.jar https://github.com/google/gson/blob/gson-parent-2.8.9/LICENSE
|
||||
|
||||
|
||||
=== CDDL 1.1 ===
|
||||
jaxb-impl-2.3.3.jar http://jaxb.java.net/
|
||||
jaxb-xjc-2.3.3.jar http://jaxb.java.net/
|
||||
jaxb-core-4.0.3.jar http://jaxb.java.net/
|
||||
jaxb-xjc-4.0.3.jar http://jaxb.java.net/
|
||||
|
||||
|
||||
=== Eclipse Distribution License 1.0 (BSD) ===
|
||||
@@ -129,10 +109,11 @@ jakarta.activation-1.2.2.jar https://eclipse-ee4j.github.io/jaf
|
||||
jakarta.activation-api-1.2.2.jar https://eclipse-ee4j.github.io/jaf
|
||||
jakarta.jws-api-2.1.0.jar https://projects.eclipse.org/projects/ee4j.websocket/releases/1.1.1
|
||||
jakarta.xml.bind-api-3.0.1.jar https://projects.eclipse.org/projects/ee4j.jaxb
|
||||
istack-commons-runtime-3.0.11.jar https://projects.eclipse.org/projects/ee4j.jaxb-impl
|
||||
txw2-2.3.3.jar https://eclipse-ee4j.github.io/jaxb-ri
|
||||
jaxb-runtime-2.3.3.jar https://github.com/eclipse-ee4j/jaxb-ri/blob/2.3.4-RI/LICENSE.md
|
||||
|
||||
jakarta.xml.soap-api-1.4.2.jar https://projects.eclipse.org/projects/ee4j.jaxb
|
||||
jakarta.xml.ws-api-2.3.3.jar https://projects.eclipse.org/projects/ee4j.jaxb
|
||||
istack-commons-runtime-3.0.12.jar https://github.com/eclipse-ee4j/jaxb-istack-commons
|
||||
txw2-2.3.4.jar https://eclipse-ee4j.github.io/jaxb-ri
|
||||
jaxb-runtime-2.3.4.jar https://github.com/eclipse-ee4j/jaxb-ri/blob/2.3.4-RI/LICENSE.md
|
||||
|
||||
=== Eclipse Public License 1.0 ===
|
||||
|
||||
@@ -140,18 +121,15 @@ jaxb-runtime-2.3.3.jar https://github.com/eclipse-ee4j/jaxb-ri/blob/2.3.4-RI/LI
|
||||
=== Eclipse Public License 2.0 ===
|
||||
jakarta.annotation-api-1.3.5.jar https://projects.eclipse.org/projects/ee4j.ca
|
||||
jakarta.transaction-api-1.3.3.jar https://projects.eclipse.org/projects/ee4j.jta
|
||||
|
||||
jts-io-common-1.19.0.jar https://locationtech.github.io/jts/
|
||||
jts-core-1.19.0.jar https://locationtech.github.io/jts/
|
||||
|
||||
=== BSD ===
|
||||
jibx-run-1.3.3.jar http://jibx.sourceforge.net/
|
||||
dom4j-2.1.3.jar https://github.com/dom4j/dom4j/blob/master/LICENSE
|
||||
xmpcore-6.1.11.jar https://github.com/adobe/XMP-Toolkit-SDK/blob/main/LICENSE
|
||||
xmpcore-shaded-6.1.11.jar https://github.com/tballison/xmpcore-shaded/blob/6.1.11/src/main/resources/META-INF/LICENSE
|
||||
|
||||
|
||||
=== MIT ===
|
||||
dd-plist-1.23.jar https://github.com/3breadt/dd-plist/blob/dd-plist-1.23/LICENSE.txt
|
||||
|
||||
checker-qual-3.33.0.jar https://checkerframework.org/
|
||||
|
||||
=== Part of Apache Solr (Licenses listed separately) ===
|
||||
antlr4-runtime-4.5.1-1.jar
|
||||
@@ -163,72 +141,71 @@ aspectjrt-1.8.0.jar
|
||||
attributes-binder-1.3.1.jar
|
||||
boilerpipe-1.1.0.jar
|
||||
caffeine-2.4.0.jar
|
||||
calcite-core-1.13.0.jar
|
||||
calcite-linq4j-1.13.0.jar
|
||||
avatica-core-1.13.0.jar
|
||||
avatica-metrics-1.13.0.jar
|
||||
carrot2-guava-18.0.jar
|
||||
carrot2-mini-3.15.0.jar
|
||||
commons-cli-1.2.jar
|
||||
commons-codec-1.10.jar
|
||||
commons-collections-3.2.2.jar
|
||||
commons-collections4-4.1.jar
|
||||
commons-compiler-2.7.6.jar
|
||||
commons-configuration-1.6.jar
|
||||
commons-exec-1.3.jar
|
||||
commons-fileupload-1.3.3.jar
|
||||
commons-io-2.5.jar
|
||||
calcite-core-1.32.0.jar
|
||||
calcite-linq4j-1.32.0.jar
|
||||
avatica-core-1.22.0.jar
|
||||
avatica-metrics-1.22.0.jar
|
||||
commons-lang-2.6.jar
|
||||
commons-math3-3.4.1.jar
|
||||
curator-client-2.8.0.jar
|
||||
curator-framework-2.8.0.jar
|
||||
curator-recipes-2.8.0.jar
|
||||
commons-compiler-3.1.10.jar
|
||||
janino-3.1.10.jar
|
||||
curvesapi-1.04.jar
|
||||
eigenbase-properties-1.1.5.jar
|
||||
fontbox-2.0.6.jar
|
||||
gmetric4j-1.0.7.jar
|
||||
guava-14.0.1.jar
|
||||
guava-32.1.1-jre.jar
|
||||
guava-31.1-jre.jar
|
||||
hppc-0.7.1.jar
|
||||
htrace-core-3.2.0-incubating.jar
|
||||
httpclient-4.5.13.jar
|
||||
httpclient-4.5.14.jar
|
||||
httpcore-4.4.1.jar
|
||||
httpmime-4.4.1.jar
|
||||
icu4j-56.1.jar
|
||||
jackcess-2.1.8.jar
|
||||
janino-2.7.6.jar
|
||||
java-libpst-0.8.1.jar
|
||||
javax.servlet-api-3.1.0.jar
|
||||
jcl-over-slf4j-1.7.7.jar
|
||||
jdom-1.0.jar
|
||||
jempbox-1.8.13.jar
|
||||
jmatio-1.2.jar
|
||||
joda-time-2.2.jar
|
||||
jsonic-1.2.7.jar
|
||||
jul-to-slf4j-1.7.7.jar
|
||||
juniversalchardet-1.0.3.jar
|
||||
langdetect-1.1-20120112.jar
|
||||
lucene-analyzers-common-6.6.5-patched.9.jar
|
||||
lucene-analyzers-icu-6.6.5-patched.9.jar
|
||||
lucene-analyzers-kuromoji-6.6.5-patched.9.jar
|
||||
lucene-analyzers-morfologik-6.6.5-patched.9.jar
|
||||
lucene-analyzers-phonetic-6.6.5-patched.9.jar
|
||||
lucene-analyzers-smartcn-6.6.5-patched.9.jar
|
||||
lucene-analyzers-stempel-6.6.5-patched.9.jar
|
||||
lucene-backward-codecs-6.6.5-patched.9.jar
|
||||
lucene-classification-6.6.5-patched.9.jar
|
||||
lucene-codecs-6.6.5-patched.9.jar
|
||||
lucene-core-6.6.5-patched.9.jar
|
||||
lucene-expressions-6.6.5-patched.9.jar
|
||||
lucene-grouping-6.6.5-patched.9.jar
|
||||
lucene-highlighter-6.6.5-patched.9.jar
|
||||
lucene-join-6.6.5-patched.9.jar
|
||||
lucene-memory-6.6.5-patched.9.jar
|
||||
lucene-misc-6.6.5-patched.9.jar
|
||||
lucene-queries-6.6.5-patched.9.jar
|
||||
lucene-queryparser-6.6.5-patched.9.jar
|
||||
lucene-sandbox-6.6.5-patched.9.jar
|
||||
lucene-spatial-extras-6.6.5-patched.9.jar
|
||||
lucene-suggest-6.6.5-patched.9.jar
|
||||
lucene-analyzers-common-6.6.5-patched.11.jar
|
||||
lucene-analyzers-icu-6.6.5-patched.11.jar
|
||||
lucene-analyzers-kuromoji-6.6.5-patched.11.jar
|
||||
lucene-analyzers-morfologik-6.6.5-patched.11.jar
|
||||
lucene-analyzers-phonetic-6.6.5-patched.11.jar
|
||||
lucene-analyzers-smartcn-6.6.5-patched.11.jar
|
||||
lucene-analyzers-stempel-6.6.5-patched.11.jar
|
||||
lucene-backward-codecs-6.6.5-patched.11.jar
|
||||
lucene-classification-6.6.5-patched.11.jar
|
||||
lucene-codecs-6.6.5-patched.11.jar
|
||||
lucene-core-6.6.5-patched.11.jar
|
||||
lucene-expressions-6.6.5-patched.11.jar
|
||||
lucene-grouping-6.6.5-patched.11.jar
|
||||
lucene-highlighter-6.6.5-patched.11.jar
|
||||
lucene-join-6.6.5-patched.11.jar
|
||||
lucene-memory-6.6.5-patched.11.jar
|
||||
lucene-misc-6.6.5-patched.11.jar
|
||||
lucene-queries-6.6.5-patched.11.jar
|
||||
lucene-queryparser-6.6.5-patched.11.jar
|
||||
lucene-sandbox-6.6.5-patched.11.jar
|
||||
lucene-spatial-extras-6.6.5-patched.11.jar
|
||||
lucene-suggest-6.6.5-patched.11.jar
|
||||
metrics-core-3.2.2.jar
|
||||
metrics-ganglia-3.2.2.jar
|
||||
metrics-graphite-3.2.2.jar
|
||||
@@ -238,21 +215,15 @@ morfologik-fsa-2.1.1.jar
|
||||
morfologik-polish-2.1.1.jar
|
||||
morfologik-stemming-2.1.1.jar
|
||||
noggit-0.6.jar
|
||||
pdfbox-2.0.6.jar
|
||||
pdfbox-tools-2.0.6.jar
|
||||
poi-3.17-beta1.jar
|
||||
poi-ooxml-3.17-beta1.jar
|
||||
poi-ooxml-schemas-3.17-beta1.jar
|
||||
poi-scratchpad-3.17-beta1.jar
|
||||
protobuf-java-3.6.1.jar
|
||||
protobuf-java-3.23.4.jar
|
||||
rome-1.5.1.jar
|
||||
slf4j-api-1.7.7.jar
|
||||
slf4j-log4j12-1.7.7.jar
|
||||
solr-analysis-extras-6.6.5-patched.9.jar
|
||||
solr-clustering-6.6.5-patched.9.jar
|
||||
solr-core-6.6.5-patched.9.jar
|
||||
solr-langid-6.6.5-patched.9.jar
|
||||
solr-solrj-6.6.5-patched.9.jar
|
||||
solr-analysis-extras-6.6.5-patched.11.jar
|
||||
solr-clustering-6.6.5-patched.11.jar
|
||||
solr-core-6.6.5-patched.11.jar
|
||||
solr-langid-6.6.5-patched.11.jar
|
||||
solr-solrj-6.6.5-patched.11.jar
|
||||
spatial4j-0.6.jar
|
||||
start.jar
|
||||
stax2-api-3.1.4.jar
|
||||
|
@@ -4,18 +4,13 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-search-and-insight-parent</artifactId>
|
||||
<version>2.0.5</version>
|
||||
<version>2.0.9</version>
|
||||
</parent>
|
||||
<!-- The groupId and version are required by the maven pom extractor plugin on Bamboo - more details in this issue:
|
||||
https://bitbucket.org/dehringer/bamboo-maven-pom-extractor-plugin/issues/18/groupid-not-populated-if-using-parent-pom -->
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-search-parent</artifactId>
|
||||
<version>2.0.5</version>
|
||||
<version>2.0.9</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Alfresco Solr Search parent</name>
|
||||
<properties>
|
||||
<slf4j.version>1.7.36</slf4j.version>
|
||||
<cxf.version>3.2.14</cxf.version>
|
||||
<licenseName>community</licenseName>
|
||||
</properties>
|
||||
<modules>
|
||||
@@ -71,30 +66,4 @@
|
||||
<url>http://maven.restlet.talend.com</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!-- spring framework (E2E tests works with different versions) -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-orm</artifactId>
|
||||
<version>${dependency.spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>${dependency.spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context-support</artifactId>
|
||||
<version>${dependency.spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<version>${dependency.spring.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
</project>
|
||||
|
Reference in New Issue
Block a user