mirror of
https://github.com/Alfresco/SearchServices.git
synced 2025-09-10 14:11:25 +00:00
Compare commits
299 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
3e8dc4d098 | ||
|
3dc93393e4 | ||
|
4d0cb07254 | ||
|
3052a2129f | ||
|
3278349a86 | ||
|
3bd709022c | ||
|
e967bc58eb | ||
|
ee82766f71 | ||
|
c31c36d83b | ||
|
e4757a3f7c | ||
|
077df81887 | ||
|
8e205e5c75 | ||
|
9fd99ec0bb | ||
|
306f4c972f | ||
|
b09949a1ff | ||
|
6e2f1e1f8e | ||
|
e3c02832ee | ||
|
fb24eba0d8 | ||
|
0d3ea0a012 | ||
|
d7743262dd | ||
|
ef31163679 | ||
|
41dd5d7cb9 | ||
|
e7f8eb02b8 | ||
|
d970e590ca | ||
|
afedbfd058 | ||
|
54efa10347 | ||
|
5bef0651ca | ||
|
466ba39254 | ||
|
2d469878ee | ||
|
5be3d81724 | ||
|
e99caded8c | ||
|
2540eff4d7 | ||
|
48f3ace274 | ||
|
b95c19c425 | ||
|
23787b7d33 | ||
|
87e1b407f4 | ||
|
d64a8d83df | ||
|
34c8bfcf9e | ||
|
66e0d22826 | ||
|
9cb7e76b9d | ||
|
e001cec3c2 | ||
|
64412aa031 | ||
|
2286966303 | ||
|
4d5b92101f | ||
|
8454a008eb | ||
|
d1c6e7f29d | ||
|
0d92a9276e | ||
|
839ee705d0 | ||
|
44097da33a | ||
|
0dd71b7674 | ||
|
94eb146b2f | ||
|
de8733259a | ||
|
167339d324 | ||
|
f21cdf743c | ||
|
8fa07e9821 | ||
|
14577c1dc2 | ||
|
b67a2821d4 | ||
|
607adfea4b | ||
|
4ba6141f7c | ||
|
9691796e67 | ||
|
7893f5b3e5 | ||
|
e836897947 | ||
|
62c694c7ff | ||
|
a4729aa6d6 | ||
|
e4387065f3 | ||
|
b2be2f5390 | ||
|
95a128380d | ||
|
f5c5536446 | ||
|
0df350bec7 | ||
|
116b42e280 | ||
|
4096f6a8bc | ||
|
2f6fbb0a4a | ||
|
9f1e29c9d8 | ||
|
531a103df2 | ||
|
7ed6f25529 | ||
|
5eda09e7d6 | ||
|
1863889eda | ||
|
a21ea2f22c | ||
|
f2556f63a0 | ||
|
b64ac112de | ||
|
b6bc812014 | ||
|
f657b0cbad | ||
|
3faa626918 | ||
|
ab3fb8098d | ||
|
2541dd20e7 | ||
|
50ae7010c8 | ||
|
1430053bbf | ||
|
df627dd61c | ||
|
a2424a784a | ||
|
2b0373ba02 | ||
|
73c6a4b53d | ||
|
cf2f8e5451 | ||
|
50866b2a72 | ||
|
cb82521140 | ||
|
3f54d56534 | ||
|
2dab04861a | ||
|
f2c859464e | ||
|
abbe6da4b4 | ||
|
a24fcb08e3 | ||
|
92a832911e | ||
|
c83850eab1 | ||
|
0146ec8119 | ||
|
eb6e1a0309 | ||
|
0061e3e001 | ||
|
f607ee93c3 | ||
|
3e2d246559 | ||
|
288188adea | ||
|
6bb9d275d1 | ||
|
7bcc684cd6 | ||
|
f393a125d0 | ||
|
01f00f8ff5 | ||
|
83e3f27f77 | ||
|
673625b4c2 | ||
|
7cb94f17f9 | ||
|
e61ede391f | ||
|
d2d22c08db | ||
|
9850e70552 | ||
|
db788acf95 | ||
|
689b3df371 | ||
|
90dc49cbc2 | ||
|
27081a5fc1 | ||
|
910dd69191 | ||
|
abede2a4b4 | ||
|
f36729d461 | ||
|
bda494d061 | ||
|
0d0e077a1d | ||
|
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
|
||||
|
||||
|
@@ -219,13 +219,13 @@ $ yo alfresco-docker-compose --acsVersion=6.2 --alfrescoVersion=community --http
|
||||
Once the files have been generated, just start Docker Compose.
|
||||
|
||||
```
|
||||
$ docker-compose up --build --force-recreate
|
||||
$ docker compose up --build --force-recreate
|
||||
```
|
||||
|
||||
You can shutdown it at any moment using following command.
|
||||
|
||||
```
|
||||
$ docker-compose down
|
||||
$ docker compose down
|
||||
```
|
||||
|
||||
**Community URLs**
|
||||
|
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": {
|
||||
|
@@ -13,8 +13,8 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
export DOCKER_CLIENT_TIMEOUT=120
|
||||
export COMPOSE_HTTP_TIMEOUT=120
|
||||
|
||||
# Build the images and call docker-compose.
|
||||
# Build the images and call docker compose.
|
||||
cd "$DOCKER_RESOURCE_FOLDER"
|
||||
docker-compose up -d --build --force-recreate
|
||||
docker compose up -d --build --force-recreate
|
||||
|
||||
$SCRIPT_DIR/wait-service-to-start.sh
|
||||
|
@@ -3,20 +3,21 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-search-and-insight-parent</artifactId>
|
||||
<version>2.0.5</version>
|
||||
<version>2.0.16-SNAPSHOT</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>
|
||||
@@ -46,6 +50,17 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-framework-bom</artifactId>
|
||||
<version>${dependency.spring-e2e-test.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
@@ -76,6 +91,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 +110,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 +148,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 +179,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 +210,4 @@
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
</project>
|
||||
</project>
|
||||
|
@@ -42,5 +42,5 @@ python3 BuildScripts/generator/generator.py --alfresco=quay.io/alfresco/alfresco
|
||||
# Starting the containers
|
||||
To start the containers you also need to build the images - for example:
|
||||
```
|
||||
docker-compose up --build --force-recreate
|
||||
docker compose up --build --force-recreate
|
||||
```
|
||||
|
@@ -36,7 +36,7 @@ services:
|
||||
- 61616:61616 # OpenWire
|
||||
- 61613:61613 # STOMP
|
||||
transform-core-aio:
|
||||
image: alfresco/alfresco-transform-core-aio:2.3.5
|
||||
image: alfresco/alfresco-transform-core-aio:5.1.2
|
||||
environment:
|
||||
JAVA_OPTS: " -Xms256m -Xmx512m"
|
||||
ACTIVEMQ_URL: "nio://activemq:61616"
|
||||
|
@@ -16,7 +16,7 @@ start-manager: ## 1 - start BM Manager
|
||||
$(helpers)/wait-service-to-start.sh http://localhost:9080/alfresco-bm-manager
|
||||
|
||||
start-drivers: ## 2 - start BM Drivers
|
||||
$(dc) -f docker-compose-drivers.yml pull && docker-compose -f docker-compose-manager.yml -f docker-compose-drivers.yml up -d
|
||||
$(dc) -f docker-compose-drivers.yml pull && docker compose -f docker-compose-manager.yml -f docker-compose-drivers.yml up -d
|
||||
|
||||
start-all: start-manager start-drivers ## 3 - start BM Manager and Driver
|
||||
|
||||
|
@@ -2,23 +2,23 @@
|
||||
* #%L
|
||||
* Alfresco Search Services E2E Test
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2024 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,37 +295,61 @@ 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);
|
||||
|
||||
final int ignoreRuntimeExceptionThreshold = SEARCH_MAX_ATTEMPTS / 10 + 1;
|
||||
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
catch (EmptyJsonResponseException ignore)
|
||||
{
|
||||
}
|
||||
catch (RuntimeException runtimeException)
|
||||
{
|
||||
if (searchCount > ignoreRuntimeExceptionThreshold)
|
||||
{
|
||||
throw runtimeException;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGGER.warn("Ignoring initial Search API failure.", runtimeException);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
// Wait for the solr indexing (eventual consistency).
|
||||
Utility.waitToLoopTime(properties.getSolrWaitTimeInSeconds(), "Wait For Indexing. Retry Attempt: " + (searchCount + 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
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(String.valueOf(HttpStatus.OK.value())))
|
||||
{
|
||||
return isContentInSearchResponse(response, contentName);
|
||||
}
|
||||
else
|
||||
{
|
||||
final String responseBody = restClient.onResponse().getResponse().body().prettyPrint();
|
||||
throw new RuntimeException("API returned status code:" + restClient.getStatusCode() + " Expected: " + HttpStatus.OK.value() + "; Response body: " + responseBody);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to check if the contentName is returned in the SearchResponse.
|
||||
*
|
||||
@@ -439,7 +464,7 @@ public abstract class AbstractE2EFunctionalTest extends AbstractTestNGSpringCont
|
||||
{
|
||||
SearchRequest searchRequest = new SearchRequest();
|
||||
searchRequest.setQuery(queryModel);
|
||||
|
||||
|
||||
if (ofNullable(paging).isPresent())
|
||||
{
|
||||
searchRequest.setPaging(paging);
|
||||
@@ -508,7 +533,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 +547,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 +578,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 +599,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 +609,7 @@ public abstract class AbstractE2EFunctionalTest extends AbstractTestNGSpringCont
|
||||
{
|
||||
paging.setMaxItems(maxItems);
|
||||
}
|
||||
|
||||
|
||||
return paging;
|
||||
}
|
||||
|
||||
@@ -645,7 +670,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 +689,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,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Search Services E2E Test
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2021 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2024 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
@@ -168,8 +168,8 @@ public abstract class AbstractSearchExactTermTest extends AbstractE2EFunctionalT
|
||||
{
|
||||
queryAsUser(testUser, query);
|
||||
Assert.assertTrue(
|
||||
restClient.getStatusCode().equals(String.valueOf(HttpStatus.NOT_IMPLEMENTED)) ||
|
||||
restClient.getStatusCode().equals(String.valueOf(HttpStatus.INTERNAL_SERVER_ERROR)),
|
||||
restClient.getStatusCode().equals(String.valueOf(HttpStatus.NOT_IMPLEMENTED.value())) ||
|
||||
restClient.getStatusCode().equals(String.valueOf(HttpStatus.INTERNAL_SERVER_ERROR.value())),
|
||||
"Status code is not as expected.");
|
||||
}
|
||||
|
||||
|
@@ -2,23 +2,23 @@
|
||||
* #%L
|
||||
* Alfresco Search Services E2E Test
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2024 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(String.valueOf(HttpStatus.OK.value())))
|
||||
{
|
||||
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(String.valueOf(HttpStatus.OK.value())))
|
||||
{
|
||||
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);
|
||||
|
||||
|
@@ -182,7 +182,7 @@ public class SearchExactTermCrossLocaleTest extends AbstractSearchExactTermTest
|
||||
/**
|
||||
* Note these tests are searching in cm:name, cm:title, cm:description and cm:content properties
|
||||
*/
|
||||
@Test
|
||||
@Test(enabled = false)
|
||||
public void exactSearch_multiTerm_shouldReturnResultsContainingExactTerm() throws Exception
|
||||
{
|
||||
/*
|
||||
|
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -609,50 +609,51 @@ public class SolrE2eAdminTest extends AbstractE2EFunctionalTest
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* FIX for specific core.
|
||||
* The test checks the response structure in order to make sure the expected sections are present.
|
||||
*
|
||||
* We are not testing the content of each section because due to the underlying E2E infrastructure, we cannot know
|
||||
* in advance the transactions that will be scheduled for reindexing.
|
||||
*/
|
||||
@Test(priority = 28)
|
||||
public void testFixCore()
|
||||
{
|
||||
DEFAULT_CORE_NAMES.forEach(core -> {
|
||||
try
|
||||
{
|
||||
RestResponse response = restClient.withParams("core=" + core).withSolrAdminAPI().getAction("fix");
|
||||
|
||||
checkResponseStatusOk(response);
|
||||
|
||||
Map<String, Object> txInIndexNotInDb = response.getResponse().body().jsonPath().get("action." + core +".txToReindex.txInIndexNotInDb");
|
||||
Assert.assertNotNull(txInIndexNotInDb, "Expected a list of transactions (even empty) that are in index but not in the database to be reindexed,");
|
||||
|
||||
Map<String, Object> duplicatedTx = response.getResponse().body().jsonPath().get("action." + core +".txToReindex.duplicatedTxInIndex");
|
||||
Assert.assertNotNull(duplicatedTx, "Expected a list of duplicated transactions (even empty) to be reindexed,");
|
||||
|
||||
Map<String, Object> missingTx = response.getResponse().body().jsonPath().get("action." + core +".txToReindex.missingTxInIndex");
|
||||
Assert.assertNotNull(missingTx, "Expected a list of missing transactions (or empty list) to be reindexed,");
|
||||
|
||||
Map<String, Object> aclTxInIndexNotInDb = response.getResponse().body().jsonPath().get("action." + core + ".aclChangeSetToReindex.aclTxInIndexNotInDb");
|
||||
Assert.assertNotNull(aclTxInIndexNotInDb, "Expected a list of ACLs (or empty list) to be reindexed,");
|
||||
|
||||
Map<String, Object> duplicatedAclTxInIndex = response.getResponse().body().jsonPath().get("action." + core + ".aclChangeSetToReindex.duplicatedAclTxInIndex");
|
||||
Assert.assertNotNull(duplicatedAclTxInIndex, "Expected a list of ACLs (or empty list) to be reindexed,");
|
||||
|
||||
Map<String, Object> missingAclTxInIndex = response.getResponse().body().jsonPath().get("action." + core + ".aclChangeSetToReindex.missingAclTxInIndex");
|
||||
Assert.assertNotNull(missingAclTxInIndex, "Expected a list of ACLs (or empty list) to be reindexed,");
|
||||
|
||||
String actionStatus = response.getResponse().body().jsonPath().get("action.status");
|
||||
Assert.assertEquals(actionStatus, "notScheduled");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
// See https://hyland.atlassian.net/browse/ACS-8187
|
||||
// /**
|
||||
// * FIX for specific core.
|
||||
// * The test checks the response structure in order to make sure the expected sections are present.
|
||||
// *
|
||||
// * We are not testing the content of each section because due to the underlying E2E infrastructure, we cannot know
|
||||
// * in advance the transactions that will be scheduled for reindexing.
|
||||
// */
|
||||
// @Test(priority = 28)
|
||||
// public void testFixCore()
|
||||
// {
|
||||
// DEFAULT_CORE_NAMES.forEach(core -> {
|
||||
// try
|
||||
// {
|
||||
// RestResponse response = restClient.withParams("core=" + core).withSolrAdminAPI().getAction("fix");
|
||||
//
|
||||
// checkResponseStatusOk(response);
|
||||
//
|
||||
// Map<String, Object> txInIndexNotInDb = response.getResponse().body().jsonPath().get("action." + core +".txToReindex.txInIndexNotInDb");
|
||||
// Assert.assertNotNull(txInIndexNotInDb, "Expected a list of transactions (even empty) that are in index but not in the database to be reindexed,");
|
||||
//
|
||||
// Map<String, Object> duplicatedTx = response.getResponse().body().jsonPath().get("action." + core +".txToReindex.duplicatedTxInIndex");
|
||||
// Assert.assertNotNull(duplicatedTx, "Expected a list of duplicated transactions (even empty) to be reindexed,");
|
||||
//
|
||||
// Map<String, Object> missingTx = response.getResponse().body().jsonPath().get("action." + core +".txToReindex.missingTxInIndex");
|
||||
// Assert.assertNotNull(missingTx, "Expected a list of missing transactions (or empty list) to be reindexed,");
|
||||
//
|
||||
// Map<String, Object> aclTxInIndexNotInDb = response.getResponse().body().jsonPath().get("action." + core + ".aclChangeSetToReindex.aclTxInIndexNotInDb");
|
||||
// Assert.assertNotNull(aclTxInIndexNotInDb, "Expected a list of ACLs (or empty list) to be reindexed,");
|
||||
//
|
||||
// Map<String, Object> duplicatedAclTxInIndex = response.getResponse().body().jsonPath().get("action." + core + ".aclChangeSetToReindex.duplicatedAclTxInIndex");
|
||||
// Assert.assertNotNull(duplicatedAclTxInIndex, "Expected a list of ACLs (or empty list) to be reindexed,");
|
||||
//
|
||||
// Map<String, Object> missingAclTxInIndex = response.getResponse().body().jsonPath().get("action." + core + ".aclChangeSetToReindex.missingAclTxInIndex");
|
||||
// Assert.assertNotNull(missingAclTxInIndex, "Expected a list of ACLs (or empty list) to be reindexed,");
|
||||
//
|
||||
// String actionStatus = response.getResponse().body().jsonPath().get("action.status");
|
||||
// Assert.assertEquals(actionStatus, "notScheduled");
|
||||
// }
|
||||
// catch (Exception e)
|
||||
// {
|
||||
// throw new RuntimeException(e);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
/**
|
||||
* REINDEX for every core.
|
||||
|
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>
|
325
pom.xml
325
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.16-SNAPSHOT</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,266 @@
|
||||
<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>HEAD</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.21</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>18.20</dependency.alfresco-data-model.version>
|
||||
|
||||
<dependency.jackson.version>2.17.2</dependency.jackson.version>
|
||||
|
||||
<dependency.google.guava.version>33.1.0-jre</dependency.google.guava.version>
|
||||
<dependency.apache-commons-compress.version>1.26.1</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.6.5</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.12.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.25.5</dependency.protobuf.version>
|
||||
<dependency.jayway.jsonpath.version>2.9.0</dependency.jayway.jsonpath.version>
|
||||
<dependency.janino.version>3.1.10</dependency.janino.version>
|
||||
<dependency.commons-fileupload.version>1.6.0</dependency.commons-fileupload.version>
|
||||
<dependency.commons-io.version>2.15.1</dependency.commons-io.version>
|
||||
<dependency.commons-codec.version>1.16.1</dependency.commons-codec.version>
|
||||
<dependency.spring.version>6.2.8</dependency.spring.version>
|
||||
<dependency.spring-e2e-test.version>5.3.39</dependency.spring-e2e-test.version>
|
||||
<dependency.zookeeper.version>3.4.14</dependency.zookeeper.version>
|
||||
<dependency.mime4j.version>0.8.11</dependency.mime4j.version>
|
||||
</properties>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-framework-bom</artifactId>
|
||||
<version>${dependency.spring.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.zookeeper</groupId>
|
||||
<artifactId>zookeeper</artifactId>
|
||||
<version>${dependency.zookeeper.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.github.spotbugs</groupId>
|
||||
<artifactId>spotbugs-annotations</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>${dependency.commons-fileupload.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>${dependency.commons-io.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>${dependency.commons-codec.version}</version>
|
||||
</dependency>
|
||||
<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>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<version>2.12.2</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>4.0.5</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 +308,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 +324,36 @@
|
||||
<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>
|
||||
<dependency>
|
||||
<groupId>org.apache.james</groupId>
|
||||
<artifactId>apache-mime4j-core</artifactId>
|
||||
<version>${dependency.mime4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.james</groupId>
|
||||
<artifactId>apache-mime4j-dom</artifactId>
|
||||
<version>${dependency.mime4j.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
<modules>
|
||||
|
@@ -361,18 +361,7 @@ SOLR Web Console will be available at:
|
||||
|
||||
You will have to provide the `X-Alfresco-Search-Secret` header in the request, specifying as its value the same value that was used for the `-Dalfresco.secureComms.secret` property.
|
||||
|
||||
**Enabling YourKit Java Profiler**
|
||||
|
||||
This Docker Image includes [YourKit Java Profiler](https://www.yourkit.com/java/profiler/) server service. In order to enable this service, so the SOLR JVM can be inspected with the YourKit local program, additional configuration is required to set the YourKit `agentpath`. Mapping the exposed profiling port (10001 by default) is also required.
|
||||
|
||||
Sample Docker command line invocation
|
||||
|
||||
```bash
|
||||
$ docker run -p 8983:8983 -p 10001:10001 \
|
||||
-e SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive \
|
||||
-e SOLR_OPTS="-agentpath:/usr/local/YourKit-JavaProfiler-2019.8/bin/linux-x86-64/libyjpagent.so=port=10001,listen=all" \
|
||||
searchservices:develop
|
||||
```
|
||||
|
||||
Sample Docker Compose service settings
|
||||
|
||||
@@ -392,15 +381,11 @@ solr6:
|
||||
#Create the default alfresco and archive cores
|
||||
SOLR_CREATE_ALFRESCO_DEFAULTS: "alfresco,archive"
|
||||
SOLR_JAVA_MEM: "-Xms2g -Xmx2g"
|
||||
SOLR_OPTS: "
|
||||
-agentpath:/usr/local/YourKit-JavaProfiler-2019.8/bin/linux-x86-64/libyjpagent.so=port=10001,listen=all
|
||||
"
|
||||
JAVA_TOOL_OPTIONS: "
|
||||
-Dalfresco.secureComms.secret=my_super_secret_secret
|
||||
"
|
||||
ports:
|
||||
- 8083:8983 #Browser port
|
||||
- 10001:10001 #YourKit port
|
||||
```
|
||||
|
||||
**Public Docker repository**
|
||||
@@ -509,17 +494,17 @@ docker-compose files can be used to start up Search Services with Alfresco and S
|
||||
|
||||
```bash
|
||||
cd packaging/target/docker-resources/6.x
|
||||
docker-compose up
|
||||
docker compose up
|
||||
```
|
||||
|
||||
##Docker Master-Slave setup
|
||||
We have seperate docker compose file for slave. To setup Master slave setup
|
||||
|
||||
`docker-compose -f docker-compose.yml -f ./master-slave/docker-compose.slave.yml up`
|
||||
`docker compose -f docker-compose.yml -f ./master-slave/docker-compose.slave.yml up`
|
||||
|
||||
The slave running behind the nginx load balancer under 8084, so we can spin up multiple slaves with the same port. To deploy multiple slaves
|
||||
|
||||
`docker-compose -f docker-compose.yml -f ./master-slave/docker-compose.slave.yml up --scale search_slave=2`
|
||||
`docker compose -f docker-compose.yml -f ./master-slave/docker-compose.slave.yml up --scale search_slave=2`
|
||||
|
||||
This will start up Alfresco, Postgres, Share and SearchServices. You can access the applications using the following URLs:
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-search-parent</artifactId>
|
||||
<version>2.0.5</version>
|
||||
<version>2.0.16-SNAPSHOT</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.16-SNAPSHOT</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>
|
||||
|
@@ -121,7 +121,7 @@ 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.stream.LongStream;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
|
||||
import com.carrotsearch.hppc.IntArrayList;
|
||||
@@ -1767,7 +1767,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 +2175,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 +2822,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 +2830,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)
|
||||
@@ -3721,7 +3747,7 @@ public class SolrInformationServer implements InformationServer
|
||||
long iterationStart = batchStartId;
|
||||
NamedList<Integer> idCounts = this.getFacets(request,
|
||||
field + ":[" + batchStartId + " TO " + batchEndId + "]",
|
||||
field, 1); // Min count of 1 ensures that the id returned is in the index
|
||||
field, 1, maxId); // Min count of 1 ensures that the id returned is in the index
|
||||
for (Map.Entry<String, Integer> idCount : idCounts)
|
||||
{
|
||||
idInIndex = Long.parseLong(idCount.getKey());
|
||||
@@ -3759,6 +3785,9 @@ public class SolrInformationServer implements InformationServer
|
||||
break;
|
||||
}
|
||||
}
|
||||
LongStream.rangeClosed(iterationStart, batchEndId)
|
||||
.filter(id -> idsInDb.get(id))
|
||||
.forEach(reporter::reportIdInDbButNotInIndex);
|
||||
|
||||
batchStartId = batchEndId + 1;
|
||||
batchEndId = Math.min(batchStartId + BATCH_FACET_TXS, maxId);
|
||||
@@ -3818,6 +3847,25 @@ public class SolrInformationServer implements InformationServer
|
||||
NamedList facetFields = (NamedList) facetCounts.get("facet_fields");
|
||||
return (NamedList) facetFields.get(field);
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
NamedList<Integer> getFacets(SolrQueryRequest request, String query, String field, int minCount,
|
||||
long maxCount)
|
||||
{
|
||||
ModifiableSolrParams params =
|
||||
new ModifiableSolrParams(request.getParams())
|
||||
.set(CommonParams.Q, query)
|
||||
.set(CommonParams.ROWS, 0)
|
||||
.set(FacetParams.FACET, true)
|
||||
.set(FacetParams.FACET_FIELD, field)
|
||||
.set(FacetParams.FACET_LIMIT, Math.toIntExact(Math.min(maxCount, Integer.MAX_VALUE)))
|
||||
.set(FacetParams.FACET_MINCOUNT, minCount);
|
||||
|
||||
SolrQueryResponse response = cloud.getResponse(nativeRequestHandler, request, params);
|
||||
NamedList facetCounts = (NamedList) response.getValues().get("facet_counts");
|
||||
NamedList facetFields = (NamedList) facetCounts.get("facet_fields");
|
||||
return (NamedList) facetFields.get(field);
|
||||
}
|
||||
|
||||
public int getDocListSize(String query)
|
||||
{
|
||||
|
@@ -119,6 +119,7 @@ import org.apache.solr.handler.component.ShardHandlerFactory;
|
||||
import org.apache.solr.request.SolrQueryRequest;
|
||||
import org.apache.solr.response.DocsStreamer;
|
||||
import org.apache.solr.schema.IndexSchema;
|
||||
import org.apache.solr.schema.NumberType;
|
||||
import org.apache.solr.schema.SchemaField;
|
||||
import org.apache.solr.search.SolrIndexSearcher;
|
||||
import org.apache.solr.update.UpdateShardHandlerConfig;
|
||||
@@ -1517,26 +1518,16 @@ public class Solr4QueryParser extends QueryParser implements QueryConstants
|
||||
// make sure the field exists or return a dummy query so we have no
|
||||
// error ....ACE-3231
|
||||
SchemaField schemaField = schema.getFieldOrNull(field);
|
||||
boolean isNumeric = false;
|
||||
if (schemaField == null)
|
||||
|
||||
if (schemaField == null || schemaField.getType() == null)
|
||||
{
|
||||
return new TermQuery(new Term("_dummy_", "_miss_"));
|
||||
}
|
||||
else
|
||||
}
|
||||
|
||||
NumberType schemaFieldNumberType = schemaField.getType().getNumberType();
|
||||
if (isNonParsableNumberType(schemaFieldNumberType, queryText))
|
||||
{
|
||||
isNumeric = (schemaField.getType().getNumericType() != null);
|
||||
if (isNumeric)
|
||||
{
|
||||
//Check to see if queryText is numeric or else it will fail.
|
||||
try
|
||||
{
|
||||
Double.valueOf(queryText);
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
return new TermQuery(new Term("_dummy_", "_miss_"));
|
||||
}
|
||||
}
|
||||
return new TermQuery(new Term("_dummy_", "_miss_"));
|
||||
}
|
||||
|
||||
// Use the analyzer to get all the tokens, and then build a TermQuery,
|
||||
@@ -2357,7 +2348,8 @@ public class Solr4QueryParser extends QueryParser implements QueryConstants
|
||||
{
|
||||
nextToken = list.get(0);
|
||||
String termText = nextToken.toString();
|
||||
if (!isNumeric && (termText.contains("*") || termText.contains("?")))
|
||||
boolean isNotNumberType = schemaFieldNumberType == null;
|
||||
if (isNotNumberType && (termText.contains("*") || termText.contains("?")))
|
||||
{
|
||||
return newWildcardQuery(new Term(field, termText));
|
||||
}
|
||||
@@ -2642,6 +2634,24 @@ public class Solr4QueryParser extends QueryParser implements QueryConstants
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isNonParsableNumberType(NumberType schemaFieldNumberType, String queryText)
|
||||
{
|
||||
boolean isNumberType = schemaFieldNumberType != null;
|
||||
boolean isNotDate = schemaFieldNumberType != NumberType.DATE;
|
||||
if (isNumberType && isNotDate)
|
||||
{
|
||||
try
|
||||
{
|
||||
Double.parseDouble(queryText);
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list
|
||||
* @return
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Search Services
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2025 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
@@ -79,7 +79,6 @@ public class MetadataTracker extends ActivatableTracker
|
||||
private static final int DEFAULT_NODE_BATCH_SIZE = 50;
|
||||
private static final String DEFAULT_INITIAL_TRANSACTION_RANGE = "0-2000";
|
||||
private static final long DEFAULT_METADATA_TRACKER_TIMESTEP = TIME_STEP_1_HR_IN_MS;
|
||||
private static final long INITIAL_MAX_TXN_ID = 2000L;
|
||||
|
||||
private int matadataTrackerParallelism;
|
||||
private int transactionDocsBatchSize;
|
||||
@@ -355,8 +354,8 @@ public class MetadataTracker extends ActivatableTracker
|
||||
// No firstTransaction checking is required for this case.
|
||||
if (minCommitTime != -1L) {
|
||||
|
||||
firstTransactions = client.getTransactions(minCommitTime, 0L,
|
||||
null, INITIAL_MAX_TXN_ID, 1);
|
||||
firstTransactions = client.getTransactions(minCommitTime, minTxnIdRange.getFirst(),
|
||||
null, minTxnIdRange.getSecond(), 1);
|
||||
if (!firstTransactions.getTransactions().isEmpty())
|
||||
{
|
||||
Transaction firstTransaction = firstTransactions.getTransactions().get(0);
|
||||
@@ -544,7 +543,7 @@ public class MetadataTracker extends ActivatableTracker
|
||||
gnp.setStoreIdentifier(storeRef.getIdentifier());
|
||||
gnp.setCoreName(coreName);
|
||||
List<Node> nodes = client.getNodes(gnp, (int) info.getUpdates());
|
||||
for (Node node : nodes)
|
||||
for (Node node : filterNodes(nodes))
|
||||
{
|
||||
docCount++;
|
||||
if (LOGGER.isDebugEnabled())
|
||||
@@ -937,9 +936,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)
|
||||
@@ -1264,8 +1261,8 @@ public class MetadataTracker extends ActivatableTracker
|
||||
{
|
||||
// DB TX Count
|
||||
long firstTransactionCommitTime = 0;
|
||||
Transactions firstTransactions = client.getTransactions(null, 0L,
|
||||
null, INITIAL_MAX_TXN_ID, 1);
|
||||
Transactions firstTransactions = client.getTransactions(null, minTxnIdRange.getFirst(),
|
||||
null, minTxnIdRange.getSecond(), 1);
|
||||
if(firstTransactions.getTransactions().size() > 0)
|
||||
{
|
||||
Transaction firstTransaction = firstTransactions.getTransactions().get(0);
|
||||
|
@@ -352,9 +352,16 @@ public class AlfrescoSolrHighlighter extends DefaultSolrHighlighter implements P
|
||||
if (highlightFieldEntry.getValue() instanceof String[])
|
||||
{
|
||||
String [] snippets = (String[])highlightFieldEntry.getValue();
|
||||
if (snippets.length > 0)
|
||||
if (snippets != null && snippets.length > 0 && snippets[0] != null)
|
||||
{
|
||||
snippets[0] = snippets[0].charAt(3) == '\u0000' ? snippets[0].substring(4) : snippets[0].substring(5);
|
||||
if (snippets[0].charAt(0) == '\u0000')
|
||||
{
|
||||
int pos = snippets[0].indexOf('\u0000',1);
|
||||
if(pos != -1)
|
||||
{
|
||||
snippets[0] = snippets[0].substring(pos + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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/";
|
||||
|
@@ -100,6 +100,8 @@ public abstract class SolrITInitializer extends SolrTestCaseJ4
|
||||
protected static final int DEFAULT_CONNECTION_TIMEOUT1 = DEFAULT_CONNECTION_TIMEOUT;
|
||||
protected static final int CLIENT_SO_TIMEOUT = 90000;
|
||||
protected final static int INDEX_TIMEOUT = 100000;
|
||||
protected static final String JETTY_CONTEXT = "/solr";
|
||||
protected static final String SHARD_NAME_PREFIX = "shard";
|
||||
|
||||
private static AtomicInteger nodeCnt;
|
||||
protected static boolean useExplicitNodeNames;
|
||||
@@ -107,6 +109,7 @@ public abstract class SolrITInitializer extends SolrTestCaseJ4
|
||||
public static Properties DEFAULT_CORE_PROPS = new Properties();
|
||||
|
||||
protected static Map<String, JettySolrRunner> jettyContainers;
|
||||
protected static int jettyPort;
|
||||
protected static Map<String, SolrClient> solrCollectionNameToStandaloneClient;
|
||||
protected static List<JettySolrRunner> solrShards;
|
||||
protected static List<SolrClient> clientShards;
|
||||
@@ -150,6 +153,9 @@ public abstract class SolrITInitializer extends SolrTestCaseJ4
|
||||
{
|
||||
testClassName = testClassName + "_" + System.currentTimeMillis();
|
||||
|
||||
if (numShards > 0) {
|
||||
jettyPort = getNextAvailablePort();
|
||||
}
|
||||
solrcoreProperties = addExplicitShardingProperty(solrcoreProperties);
|
||||
|
||||
clientShards = new ArrayList<>();
|
||||
@@ -164,6 +170,7 @@ public abstract class SolrITInitializer extends SolrTestCaseJ4
|
||||
String[] coreNames = new String[]{DEFAULT_TEST_CORENAME};
|
||||
|
||||
distribSetUp(testClassName);
|
||||
distribShardsSetUp(numShards);
|
||||
|
||||
RandomSupplier.RandVal.uniqueValues = new HashSet<>(); // reset random values
|
||||
|
||||
@@ -249,6 +256,24 @@ public abstract class SolrITInitializer extends SolrTestCaseJ4
|
||||
System.setProperty("solr.log.dir", testDir.toPath().resolve(serverName).toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Needed to test fix for CVE-2017-3164
|
||||
* @param numShards
|
||||
*/
|
||||
private static void distribShardsSetUp(int numShards){
|
||||
if (numShards <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
StringBuilder shardWhitelistBuilder = new StringBuilder();
|
||||
for (int i = 0; i < numShards; i++)
|
||||
{
|
||||
shardWhitelistBuilder.append("127.0.0.1:").append(jettyPort).append(JETTY_CONTEXT).append("/" + SHARD_NAME_PREFIX + i).append(',');
|
||||
}
|
||||
shardWhitelistBuilder.deleteCharAt(shardWhitelistBuilder.length() - 1);
|
||||
System.setProperty("solr.shardsWhitelist", shardWhitelistBuilder.toString());
|
||||
}
|
||||
|
||||
public static void distribTearDown()
|
||||
{
|
||||
System.clearProperty("solr.directoryFactory");
|
||||
@@ -276,7 +301,7 @@ public abstract class SolrITInitializer extends SolrTestCaseJ4
|
||||
{
|
||||
Path jettySolrHome = testDir.toPath().resolve(jettyKey);
|
||||
seedSolrHome(jettySolrHome);
|
||||
return createJetty(jettySolrHome.toFile(), null, null, false, 0, getSchemaFile(), basicAuth);
|
||||
return createJetty(jettySolrHome.toFile(), null, null, false, jettyPort, getSchemaFile(), basicAuth);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -365,7 +390,7 @@ public abstract class SolrITInitializer extends SolrTestCaseJ4
|
||||
Properties props = new Properties();
|
||||
props.putAll(additionalProperties);
|
||||
|
||||
final String shardname = "shard" + i;
|
||||
final String shardname = SHARD_NAME_PREFIX + i;
|
||||
props.put("shard.instance", Integer.toString(i));
|
||||
props.put("shard.count", Integer.toString(numShards));
|
||||
|
||||
@@ -396,7 +421,7 @@ public abstract class SolrITInitializer extends SolrTestCaseJ4
|
||||
for (int i = 0; i < numShards; i++)
|
||||
{
|
||||
if (sb.length() > 0) sb.append(',');
|
||||
final String shardname = "shard" + i;
|
||||
final String shardname = SHARD_NAME_PREFIX + i;
|
||||
String shardStr = buildUrl(solr.getLocalPort()) + "/" + shardname;
|
||||
LOGGER.info(shardStr);
|
||||
SolrClient clientShard = createNewSolrClient(shardStr);
|
||||
@@ -469,10 +494,10 @@ public abstract class SolrITInitializer extends SolrTestCaseJ4
|
||||
if(basicAuth)
|
||||
{
|
||||
LOGGER.info("###### adding basic auth ######");
|
||||
config = JettyConfig.builder().setContext("/solr").setPort(port).withFilter(BasicAuthFilter.class, "/sql/*").stopAtShutdown(true).withSSLConfig(sslConfig).build();
|
||||
config = JettyConfig.builder().setContext(JETTY_CONTEXT).setPort(port).withFilter(BasicAuthFilter.class, "/sql/*").stopAtShutdown(true).withSSLConfig(sslConfig).build();
|
||||
} else {
|
||||
LOGGER.info("###### no basic auth ######");
|
||||
config = JettyConfig.builder().setContext("/solr").setPort(port).stopAtShutdown(true).withSSLConfig(sslConfig).build();
|
||||
config = JettyConfig.builder().setContext(JETTY_CONTEXT).setPort(port).stopAtShutdown(true).withSSLConfig(sslConfig).build();
|
||||
}
|
||||
|
||||
return new JettySolrRunner(solrHome.getAbsolutePath(), props, config);
|
||||
@@ -514,7 +539,7 @@ public abstract class SolrITInitializer extends SolrTestCaseJ4
|
||||
|
||||
protected static String buildUrl(int port)
|
||||
{
|
||||
return buildUrl(port, "/solr");
|
||||
return buildUrl(port, JETTY_CONTEXT);
|
||||
}
|
||||
|
||||
protected static String getSolrXml()
|
||||
|
@@ -27,7 +27,6 @@
|
||||
package org.alfresco.solr;
|
||||
|
||||
import static java.util.Optional.ofNullable;
|
||||
|
||||
import static org.alfresco.service.cmr.dictionary.DataTypeDefinition.ANY;
|
||||
import static org.alfresco.service.cmr.dictionary.DataTypeDefinition.ASSOC_REF;
|
||||
import static org.alfresco.service.cmr.dictionary.DataTypeDefinition.BOOLEAN;
|
||||
@@ -75,7 +74,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;
|
||||
@@ -533,5 +531,39 @@ public class SolrInformationServerTest
|
||||
// verifies if the method was called
|
||||
verify(updateRequestProcessor).processAdd(any());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testGetFacets()
|
||||
{
|
||||
SimpleOrderedMap<Object> responseContent = new SimpleOrderedMap<>();
|
||||
// Create facet_fields (TXID) as SimpleOrderedMap with Integer as value type
|
||||
SimpleOrderedMap<Object> txidFacet = new SimpleOrderedMap<>();
|
||||
txidFacet.add("1", 1);
|
||||
txidFacet.add("2", 1);
|
||||
txidFacet.add("3", 1);
|
||||
// Create and populate the NamedList to simulate facet_counts
|
||||
NamedList<Object> facetCounts = new NamedList<>();
|
||||
facetCounts.add("facet_queries", new SimpleOrderedMap<>());
|
||||
facetCounts.add("facet_fields", new SimpleOrderedMap<>());
|
||||
// Add TXID facet to facet_fields
|
||||
SimpleOrderedMap<Object> facetFields = (SimpleOrderedMap<Object>) facetCounts.get("facet_fields");
|
||||
facetFields.add("TXID", txidFacet);
|
||||
// Add the facet_counts to the main facetMap
|
||||
responseContent.add("facet_counts", facetCounts);
|
||||
// Set up the request handler to return the fake response.
|
||||
doAnswer(invocation -> {
|
||||
SolrQueryResponse solrQueryResponse = invocation.getArgument(1);
|
||||
solrQueryResponse.setAllValues(responseContent);
|
||||
return null;
|
||||
}).when(handler).handleRequest(any(SolrQueryRequest.class), any(SolrQueryResponse.class));
|
||||
NamedList<Integer> actualResult = infoServer.getFacets(request, "TXID:[1 TO 3]", "TXID", 1, 3);
|
||||
NamedList<Integer> expectedResult = new NamedList<Integer>() {
|
||||
{
|
||||
add("1", 1);
|
||||
add("2", 1);
|
||||
add("3", 1);
|
||||
}
|
||||
};
|
||||
assertEquals(expectedResult, actualResult);
|
||||
}
|
||||
}
|
||||
|
@@ -60,10 +60,11 @@ import org.alfresco.solr.client.PropertyValue;
|
||||
import org.alfresco.solr.client.StringPropertyValue;
|
||||
import org.alfresco.solr.client.Transaction;
|
||||
import org.alfresco.util.ISO9075;
|
||||
import org.apache.solr.client.solrj.io.Tuple;
|
||||
import org.apache.solr.core.SolrCore;
|
||||
import org.apache.solr.util.TestHarness;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZoneOffset;
|
||||
import java.util.AbstractMap;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@@ -814,6 +815,26 @@ public class TestDataProvider implements AlfrescoSolrConstants
|
||||
QName n32QName = QName.createQName(CONTENT_MODEL_1_0_URI, "thirtytwo");
|
||||
ChildAssociationRef n32CAR = new ChildAssociationRef(ASSOC_CONTAINS, rootNodeRef, n32QName, n32NodeRef, true, 0);
|
||||
addNode(core, dataModel, 1, 32, 1, TYPE_CONTENT, null, properties32, null, "system", new ChildAssociationRef[] {n32CAR}, new NodeRef[] {rootNodeRef}, new String[] { "/" + n32QName.toString() }, n32NodeRef, true);
|
||||
|
||||
String acmeNamespaceURI = "http://www.acme.org/model/content/1.0";
|
||||
QName propertyQname = QName.createQName(acmeNamespaceURI, "date");
|
||||
QName acmeDocumentQName = QName.createQName(acmeNamespaceURI, "document");
|
||||
|
||||
Map<QName, PropertyValue> properties33 = new HashMap<>();
|
||||
String todayStartOfDay = LocalDate.now().atStartOfDay().toInstant(ZoneOffset.UTC).toString();
|
||||
properties33.put(propertyQname, value(todayStartOfDay));
|
||||
NodeRef n33NodeRef = newNodeRef();
|
||||
QName n33QName = QName.createQName(acmeNamespaceURI, "thirtythree");
|
||||
ChildAssociationRef n33CAR = new ChildAssociationRef(ASSOC_CONTAINS, rootNodeRef, n33QName, n33NodeRef, true, 0);
|
||||
addNode(core, dataModel, 1, 33, 1, acmeDocumentQName, null, properties33, null, "system", new ChildAssociationRef[] {n33CAR}, new NodeRef[] {rootNodeRef}, new String[] { "/" + n33QName.toString() }, n33NodeRef, true);
|
||||
|
||||
Map<QName, PropertyValue> properties34 = new HashMap<>();
|
||||
String yesterdayStartOfDay = LocalDate.now().atStartOfDay().minusDays(1).toInstant(ZoneOffset.UTC).toString();
|
||||
properties34.put(propertyQname, value(yesterdayStartOfDay));
|
||||
NodeRef n34NodeRef = newNodeRef();
|
||||
QName n34QName = QName.createQName(acmeNamespaceURI, "thirtyfour");
|
||||
ChildAssociationRef n34CAR = new ChildAssociationRef(ASSOC_CONTAINS, rootNodeRef, n34QName, n34NodeRef, true, 0);
|
||||
addNode(core, dataModel, 1, 34, 1, acmeDocumentQName, null, properties34, null, "system", new ChildAssociationRef[] {n34CAR}, new NodeRef[] {rootNodeRef}, new String[] { "/" + n34QName.toString() }, n34NodeRef, true);
|
||||
}
|
||||
|
||||
private Map<QName, PropertyValue> getOrderProperties()
|
||||
@@ -906,4 +927,4 @@ public class TestDataProvider implements AlfrescoSolrConstants
|
||||
{
|
||||
return new StringPropertyValue(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -92,4 +92,18 @@ public class MNTIT extends AbstractRequestHandlerIT
|
||||
assertResponseCardinality("\"AnalystName\" AND !\"AnalystName Craig\"", 1);
|
||||
assertResponseCardinality("cm:name:\"BASF*.txt\"", 4);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void mnt24377()
|
||||
{
|
||||
assertResponseCardinality("acme:date:*", 2); // sanity check to make sure test nodes are indexed
|
||||
|
||||
assertResponseCardinality("acme:date:NOW/DAY+1DAY", 0);
|
||||
assertResponseCardinality("acme:date:NOW/DAY", 1);
|
||||
assertResponseCardinality("acme:date:NOW/DAY-1DAY", 1);
|
||||
assertResponseCardinality("acme:date:NOW/DAY-2DAY", 0);
|
||||
|
||||
assertResponseCardinality("acme:date:TODAY", 1);
|
||||
assertResponseCardinality("acme:date:NOW", 0);
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -254,23 +254,7 @@ public class AlfrescoSolrTrackerIT extends AbstractAlfrescoSolrIT
|
||||
|
||||
logger.info("#################### Passed Eighth Test ##############################");
|
||||
|
||||
|
||||
//Add document with isContentIndexed=false
|
||||
|
||||
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
|
||||
|
||||
testIsContentIndexed(acl);
|
||||
|
||||
//Try bulk loading
|
||||
|
||||
@@ -435,4 +419,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 = 2;
|
||||
|
||||
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;
|
||||
|
||||
|
@@ -0,0 +1,179 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Search Services
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2025 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 org.alfresco.repo.index.shard.ShardMethodEnum;
|
||||
import org.alfresco.repo.search.adaptor.QueryConstants;
|
||||
import org.alfresco.solr.AbstractAlfrescoDistributedIT;
|
||||
import org.alfresco.solr.AlfrescoCoreAdminHandler;
|
||||
import org.alfresco.solr.client.*;
|
||||
import org.apache.lucene.index.Term;
|
||||
import org.apache.lucene.search.BooleanClause;
|
||||
import org.apache.lucene.search.BooleanQuery;
|
||||
import org.apache.lucene.search.LegacyNumericRangeQuery;
|
||||
import org.apache.lucene.search.TermQuery;
|
||||
import org.apache.solr.SolrTestCaseJ4;
|
||||
import org.apache.solr.client.solrj.SolrClient;
|
||||
import org.apache.solr.client.solrj.SolrServerException;
|
||||
import org.apache.solr.client.solrj.response.QueryResponse;
|
||||
import org.apache.solr.common.SolrDocumentList;
|
||||
import org.apache.solr.common.params.CoreAdminParams;
|
||||
import org.apache.solr.common.params.ModifiableSolrParams;
|
||||
import org.apache.solr.core.SolrCore;
|
||||
import org.apache.solr.request.LocalSolrQueryRequest;
|
||||
import org.apache.solr.request.SolrQueryRequest;
|
||||
import org.apache.solr.response.SolrQueryResponse;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.Duration;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.alfresco.solr.AlfrescoSolrUtils.*;
|
||||
|
||||
@SolrTestCaseJ4.SuppressSSL
|
||||
public class DistributedAlfrescoSolrMetadataTrackerReindexingByTransactionIdUsingDbIdShardingMethodIT extends AbstractAlfrescoDistributedIT
|
||||
{
|
||||
private static final int NUMBER_OF_SHARDS = 3;
|
||||
|
||||
@BeforeClass
|
||||
public static void initData() throws Throwable
|
||||
{
|
||||
Properties properties = new Properties();
|
||||
properties.put("shard.method", ShardMethodEnum.DB_ID.toString());
|
||||
initSolrServers(NUMBER_OF_SHARDS, getSimpleClassName(), properties);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void destroyData()
|
||||
{
|
||||
dismissSolrServers();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldReindexNodeOnlyOnShardWhereNodeBelongsTo() throws Exception
|
||||
{
|
||||
//GIVEN
|
||||
putHandleDefaults();
|
||||
Node node = indexNewNode();
|
||||
long nodeId = node.getId();
|
||||
long txnId = node.getTxnId();
|
||||
assertThatNodeIsIndexedOnExactlyOneShard(nodeId);
|
||||
|
||||
//WHEN
|
||||
triggerTransactionReindexing(txnId);
|
||||
|
||||
//THEN
|
||||
for (int assertCount = 1; assertCount <= 10; assertCount++)
|
||||
{
|
||||
assertThatNodeIsIndexedOnExactlyOneShard(nodeId);
|
||||
Thread.sleep(Duration.ofSeconds(1).toMillis());
|
||||
}
|
||||
}
|
||||
|
||||
private void triggerTransactionReindexing(long txnId) throws Exception
|
||||
{
|
||||
final Map<String, SolrCore> cores = getCores(solrShards)
|
||||
.stream()
|
||||
.collect(Collectors.toMap(SolrCore::getName, Function.identity()));
|
||||
|
||||
final List<AlfrescoCoreAdminHandler> adminHandlers = getAdminHandlers(solrShards);
|
||||
assertEquals(NUMBER_OF_SHARDS, adminHandlers.size());
|
||||
|
||||
for (int i = 0; i < NUMBER_OF_SHARDS; i++)
|
||||
{
|
||||
final SolrCore core = cores.get("shard" + i);
|
||||
assertNotNull(core);
|
||||
|
||||
final AlfrescoCoreAdminHandler admin = adminHandlers.get(i);
|
||||
assertNotNull(admin);
|
||||
|
||||
final SolrQueryRequest reindexRequest = new LocalSolrQueryRequest(core,
|
||||
params(
|
||||
CoreAdminParams.ACTION, "REINDEX",
|
||||
CoreAdminParams.CORE, core.getName(),
|
||||
"txid", Long.toString(txnId)
|
||||
)
|
||||
);
|
||||
final SolrQueryResponse reindexResponse = new SolrQueryResponse();
|
||||
|
||||
admin.handleRequestBody(reindexRequest, reindexResponse);
|
||||
assertNull(reindexResponse.getException());
|
||||
}
|
||||
}
|
||||
|
||||
private void assertThatNodeIsIndexedOnExactlyOneShard(long nodeId)
|
||||
{
|
||||
final List<SolrClient> allClients = getShardedClients();
|
||||
assertEquals(NUMBER_OF_SHARDS, allClients.size());
|
||||
|
||||
final ModifiableSolrParams queryParams = params("qt", "/afts", "q", "DBID:" + nodeId);
|
||||
|
||||
final long sumForAllShards = allClients.stream().map(c -> {
|
||||
try
|
||||
{
|
||||
return c.query(queryParams);
|
||||
} catch (SolrServerException | IOException e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}).map(QueryResponse::getResults).mapToLong(SolrDocumentList::getNumFound).sum();
|
||||
|
||||
assertEquals(1, sumForAllShards);
|
||||
}
|
||||
|
||||
private Node indexNewNode() throws Exception
|
||||
{
|
||||
final Transaction tx = getTransaction(0, 1);
|
||||
final Acl acl = getAcl();
|
||||
|
||||
final Node node = getNode(tx, acl, Node.SolrApiNodeStatus.UPDATED);
|
||||
final NodeMetaData nodeMetaData = getNodeMetaData(node, tx, acl, "testOwner", null, false);
|
||||
|
||||
indexTransaction(tx, List.of(node), List.of(nodeMetaData));
|
||||
waitForDocCount(new TermQuery(new Term("content@s___t@{http://www.alfresco.org/model/content/1.0}content", "world")), 1, 100000);
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
private Acl getAcl() throws Exception
|
||||
{
|
||||
TestActChanges testActChanges = new TestActChanges().createBasicTestData();
|
||||
AclChangeSet aclChangeSet = testActChanges.getChangeSet();
|
||||
|
||||
BooleanQuery.Builder builder = new BooleanQuery.Builder();
|
||||
builder.add(new BooleanClause(new TermQuery(new Term(QueryConstants.FIELD_SOLR4_ID, "TRACKER!STATE!ACLTX")), BooleanClause.Occur.MUST));
|
||||
builder.add(new BooleanClause(LegacyNumericRangeQuery.newLongRange(QueryConstants.FIELD_S_ACLTXID, aclChangeSet.getId(), aclChangeSet.getId() + 1, true, false), BooleanClause.Occur.MUST));
|
||||
BooleanQuery waitForQuery = builder.build();
|
||||
waitForDocCountAllCores(waitForQuery, 1, 80000);
|
||||
|
||||
return testActChanges.getFirstAcl();
|
||||
}
|
||||
}
|
@@ -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 - 2024 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,6 +33,7 @@ import java.util.Properties;
|
||||
|
||||
import org.alfresco.httpclient.AuthenticationException;
|
||||
import org.alfresco.repo.index.shard.ShardState;
|
||||
import org.alfresco.solr.AlfrescoCoreAdminHandler;
|
||||
import org.alfresco.solr.InformationServer;
|
||||
import org.alfresco.solr.NodeReport;
|
||||
import org.alfresco.solr.TrackerState;
|
||||
@@ -66,6 +67,7 @@ import static org.mockito.Mockito.inOrder;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.never;
|
||||
import static org.mockito.Mockito.spy;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
@@ -94,6 +96,7 @@ public class MetadataTrackerTest
|
||||
@Before
|
||||
public void setUp()
|
||||
{
|
||||
doReturn("0-2000").when(props).getProperty("solr.initial.transaction.range");
|
||||
doReturn("workspace://SpacesStore").when(props).getProperty("alfresco.stores");
|
||||
when(srv.getTrackerStats()).thenReturn(trackerStats);
|
||||
String coreName = "theCoreName";
|
||||
@@ -127,7 +130,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 +160,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);
|
||||
|
||||
@@ -281,4 +284,34 @@ public class MetadataTrackerTest
|
||||
node.setTxnId(TX_ID);
|
||||
return node;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCheckRepoAndIndexConsistency() throws AuthenticationException, IOException, JSONException
|
||||
{
|
||||
TrackerState state = new TrackerState();
|
||||
ModelTracker modelTracker = mock(ModelTracker.class);
|
||||
when(modelTracker.hasModels()).thenReturn(true);
|
||||
when(this.metadataTracker.getTrackerState()).thenReturn(state);
|
||||
|
||||
TrackerRegistry registry = new TrackerRegistry();
|
||||
registry.setModelTracker(modelTracker);
|
||||
AlfrescoCoreAdminHandler alfrescoCoreAdminHandler = mock(AlfrescoCoreAdminHandler.class);
|
||||
when(this.srv.getAdminHandler()).thenReturn(alfrescoCoreAdminHandler);
|
||||
when(alfrescoCoreAdminHandler.getTrackerRegistry()).thenReturn(registry);
|
||||
|
||||
List<Transaction> txsList = new ArrayList<>();
|
||||
Transaction tx1 = new Transaction();
|
||||
tx1.setCommitTimeMs(1L);
|
||||
tx1.setDeletes(1);
|
||||
tx1.setUpdates(1);
|
||||
txsList.add(tx1);
|
||||
|
||||
Transactions txs = new Transactions(txsList, 0L, 2000L);
|
||||
when(repositoryClient.getTransactions(null, 0L, null, 2000L, 1)).thenReturn(txs);
|
||||
when(repositoryClient.getTransactions(1L, null, 3600001L, null, 2000)).thenReturn(txs);
|
||||
|
||||
this.metadataTracker.doTrack("AnIterationId");
|
||||
|
||||
verify(this.metadataTracker, times(1)).doTrack("AnIterationId");
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<model name="acme:myContentModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
|
||||
|
||||
<!-- Optional meta-data about the model -->
|
||||
<description>Sample Document Model</description>
|
||||
<author>My Name</author>
|
||||
<version>1.0</version>
|
||||
|
||||
<imports>
|
||||
<!-- Import Alfresco Dictionary Definitions -->
|
||||
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
|
||||
<!-- Import Alfresco Content Domain Model Definitions -->
|
||||
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
|
||||
<!-- Import Alfresco System Model Definitions -->
|
||||
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
|
||||
</imports>
|
||||
|
||||
<!-- Custom namespace for the ACME company -->
|
||||
<namespaces>
|
||||
<namespace uri="http://www.acme.org/model/content/1.0" prefix="acme"/>
|
||||
</namespaces>
|
||||
|
||||
<constraints>
|
||||
<constraint name="acme:securityClassificationOptions" type="LIST">
|
||||
<parameter name="allowedValues">
|
||||
<list>
|
||||
<value></value>
|
||||
<!-- Empty for default search-->
|
||||
<value>Public</value>
|
||||
<value>Client Confidential</value>
|
||||
<value>Company Confidential</value>
|
||||
<value>Strictly Confidential</value>
|
||||
</list>
|
||||
</parameter>
|
||||
</constraint>
|
||||
</constraints>
|
||||
|
||||
<!-- ===============================================================================================================
|
||||
Constraints, Types, and Aspects go here...
|
||||
-->
|
||||
|
||||
<types>
|
||||
<!--
|
||||
ACME Enterprise-wide Document root type.
|
||||
All other custom document types would extend this one.
|
||||
-->
|
||||
<type name="acme:document">
|
||||
<title>Sample Document Type</title>
|
||||
<parent>cm:content</parent>
|
||||
<properties>
|
||||
<property name="acme:documentId">
|
||||
<title>Document Identification Number</title>
|
||||
<type>d:text</type>
|
||||
</property>
|
||||
<property name="acme:test">
|
||||
<title>test property</title>
|
||||
<type>d:text</type>
|
||||
<index enabled="true">
|
||||
<atomic>true</atomic>
|
||||
<stored>false</stored>
|
||||
<tokenised>false</tokenised>
|
||||
</index>
|
||||
</property>
|
||||
<property name="acme:date">
|
||||
<type>d:date</type>
|
||||
<index enabled="true">
|
||||
<tokenised>both</tokenised>
|
||||
<facetable>true</facetable>
|
||||
</index>
|
||||
</property>
|
||||
</properties>
|
||||
</type>
|
||||
</types>
|
||||
|
||||
<aspects>
|
||||
<!-- A document can have security classification applied and
|
||||
faceted search is specifically enabled for best performance and we change
|
||||
default index config to not tokenize the value. -->
|
||||
<aspect name="acme:securityClassified">
|
||||
<title>ACME Security Classified</title>
|
||||
<description>Content has been security classified</description>
|
||||
<properties>
|
||||
<property name="acme:securityClassification">
|
||||
<type>d:text</type>
|
||||
<index enabled="true">
|
||||
<atomic>true</atomic>
|
||||
<stored>false</stored>
|
||||
<tokenised>false</tokenised>
|
||||
</index>
|
||||
<constraints>
|
||||
<constraint ref="acme:securityClassificationOptions"/>
|
||||
</constraints>
|
||||
</property>
|
||||
</properties>
|
||||
</aspect>
|
||||
</aspects>
|
||||
|
||||
</model>
|
@@ -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,107 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-search-parent</artifactId>
|
||||
<version>2.0.5</version>
|
||||
<version>2.0.16-SNAPSHOT</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.springframework</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
<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>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>*</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-expression</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>*</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>*</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>*</groupId>
|
||||
<artifactId>*</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-tx</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>*</groupId>
|
||||
<artifactId>*</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 +117,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 +150,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>
|
||||
|
@@ -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.16-SNAPSHOT</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,36 @@
|
||||
<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/commons-io-2.5.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/commons-codec-1.10.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-31.1-jre.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/WEB-INF/lib/commons-fileupload-1.3.3.jar" />
|
||||
<delete file="${project.build.directory}/solr-${solr.version}/server/solr-webapp/webapp/WEB-INF/lib/zookeeper-3.4.10.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 +226,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 +407,4 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
</project>
|
||||
|
@@ -1,6 +1,7 @@
|
||||
# Alfresco Search Services ${project.version} Docker Image
|
||||
|
||||
FROM alfresco/alfresco-base-java:11.0.13-centos-7@sha256:c1e399d1bbb5d08e0905f1a9ef915ee7c5ea0c0ede11cc9bd7ca98532a9b27fa
|
||||
# More infos about this image: https://github.com/Alfresco/alfresco-docker-base-java
|
||||
FROM alfresco/alfresco-base-java:jre17-rockylinux9@sha256:1822d68b272c1b34e0877bed3eb04b34c50500cd5e09bdaf345df31cacd59af7
|
||||
LABEL creator="Alfresco" maintainer="Alfresco"
|
||||
|
||||
ENV DIST_DIR /opt/alfresco-search-services
|
||||
@@ -14,9 +15,6 @@ ENV SOLR_SOLR_MODEL_DIR=${SOLR_SOLR_MODEL_DIR:-$DIST_DIR/data/alfrescoModels}
|
||||
ARG USERNAME=solr
|
||||
ARG USERID=33007
|
||||
|
||||
# YourKit Java Profiler
|
||||
ARG JAVA_PROFILER=YourKit-JavaProfiler-2019.8-b142-docker
|
||||
|
||||
COPY "$SOLR_ZIP" .
|
||||
|
||||
RUN set -x \
|
||||
@@ -54,20 +52,5 @@ VOLUME $DIST_DIR/keystores
|
||||
# SOLR Service Port
|
||||
EXPOSE 8983
|
||||
|
||||
# YourKit - Requires additional setting for the agent in JVM to be used
|
||||
# For Docker Compose solr6 service, add the following lines:
|
||||
# SOLR_OPTS: "
|
||||
# -agentpath:/usr/local/YourKit-JavaProfiler-2019.8/bin/linux-x86-64/libyjpagent.so=port=10001,listen=all
|
||||
# "
|
||||
# ports:
|
||||
# - 10001:10001
|
||||
RUN wget https://archive.yourkit.com/yjp/2019.8/${JAVA_PROFILER}.zip -P /tmp/ && \
|
||||
unzip /tmp/${JAVA_PROFILER}.zip -d /usr/local && \
|
||||
rm /tmp/${JAVA_PROFILER}.zip && \
|
||||
cp /usr/local/YourKit-JavaProfiler*/license-redist.txt /licenses/3rd-party/YourKit-license-redist.txt
|
||||
|
||||
# YourKit Profiling Port
|
||||
EXPOSE 10001
|
||||
|
||||
USER ${USERNAME}
|
||||
CMD $DIST_DIR/solr/bin/search_config_setup.sh "$DIST_DIR/solr/bin/solr start -f"
|
||||
|
@@ -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,114 +14,91 @@ 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 ===
|
||||
audience-annotations-0.5.0.jar https://github.com/apache/yetus
|
||||
error_prone_annotations-2.26.1.jar https://github.com/google/error-prone
|
||||
jsr305-3.0.2.jar https://mvnrepository.com/artifact/com.google.code.findbugs/jsr305/1.3.9
|
||||
proj4j-1.1.5.jar https://github.com/locationtech/proj4j
|
||||
j2objc-annotations-3.0.0.jar https://github.com/google/j2objc
|
||||
json-path-2.9.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/
|
||||
neethi-3.2.1.jar http://ws.apache.org/commons/neethi/
|
||||
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.26.1.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/
|
||||
xmlschema-core-2.3.1.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.6.5.jar https://cxf.apache.org/
|
||||
cxf-rt-bindings-soap-3.6.5.jar https://cxf.apache.org/
|
||||
cxf-rt-bindings-xml-3.6.5.jar https://cxf.apache.org/
|
||||
cxf-rt-databinding-jaxb-3.6.5.jar https://cxf.apache.org/
|
||||
cxf-rt-frontend-jaxws-3.6.5.jar https://cxf.apache.org/
|
||||
cxf-rt-frontend-simple-3.6.5.jar https://cxf.apache.org/
|
||||
cxf-rt-transports-http-4.0.5.jar https://cxf.apache.org/
|
||||
cxf-rt-ws-addr-3.6.5.jar https://cxf.apache.org/
|
||||
cxf-rt-ws-policy-3.6.5.jar https://cxf.apache.org/
|
||||
cxf-rt-wsdl-3.6.5.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.2.jar https://mvnrepository.com/artifact/com.google.guava/failureaccess/1.0.2
|
||||
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.17.2.jar https://github.com/FasterXML/jackson
|
||||
jackson-annotations-2.17.2.jar https://github.com/FasterXML/jackson
|
||||
jackson-databind-2.17.2.jar https://github.com/FasterXML/jackson
|
||||
commons-httpclient-3.1-HTTPCLIENT-1265.jar http://jakarta.apache.org/commons/
|
||||
spring-beans-6.2.8.jar http://projects.spring.io/spring-framework/
|
||||
spring-context-6.2.8.jar http://projects.spring.io/spring-framework/
|
||||
spring-core-6.2.8.jar http://projects.spring.io/spring-framework/
|
||||
spring-expression-6.2.8.jar http://projects.spring.io/spring-framework/
|
||||
spring-tx-6.2.8.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/
|
||||
jetty-continuation-9.3.30.v20211001.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-deploy-9.3.30.v20211001.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-http-9.3.30.v20211001.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-io-9.3.30.v20211001.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-jmx-9.3.30.v20211001.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-rewrite-9.3.30.v20211001.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-security-9.3.30.v20211001.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-server-9.3.30.v20211001.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-servlet-9.3.30.v20211001.jar https://www.eclipse.org/jetty/licenses.html
|
||||
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
|
||||
jetty-continuation-9.4.57.v20241219.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-deploy-9.4.57.v20241219.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-http-9.4.57.v20241219.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-io-9.4.57.v20241219.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-jmx-9.4.57.v20241219.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-rewrite-9.4.57.v20241219.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-security-9.4.57.v20241219.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-server-9.4.57.v20241219.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-servlet-9.4.57.v20241219.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-servlets-9.4.57.v20241219.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-util-9.4.57.v20241219.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-webapp-9.4.57.v20241219.jar https://www.eclipse.org/jetty/licenses.html
|
||||
jetty-xml-9.4.57.v20241219.jar https://www.eclipse.org/jetty/licenses.html
|
||||
woodstox-core-6.6.2.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
|
||||
xercesImpl-2.12.2.jar http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
xml-apis-1.4.01.jar http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
simple-xml-safe-2.7.1.jar https://github.com/carrotsearch/simplexml-safe/blob/release/2.7.1/LICENSE.txt
|
||||
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 +106,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.5.jar https://eclipse-ee4j.github.io/jaxb-ri
|
||||
jaxb-runtime-2.3.5.jar https://github.com/eclipse-ee4j/jaxb-ri/blob/2.3.5-RI/LICENSE.md
|
||||
|
||||
=== Eclipse Public License 1.0 ===
|
||||
|
||||
@@ -140,95 +118,90 @@ 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.42.0.jar https://checkerframework.org/
|
||||
|
||||
=== Part of Apache Solr (Licenses listed separately) ===
|
||||
antlr4-runtime-4.5.1-1.jar
|
||||
apache-mime4j-core-0.7.2.jar
|
||||
apache-mime4j-dom-0.7.2.jar
|
||||
apache-mime4j-core-0.8.11.jar
|
||||
apache-mime4j-dom-0.8.11.jar
|
||||
asm-5.1.jar
|
||||
asm-commons-5.1.jar
|
||||
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-codec-1.16.1.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
|
||||
commons-fileupload-1.6.0.jar
|
||||
commons-io-2.15.1.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-33.1.0-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.21.jar
|
||||
lucene-analyzers-icu-6.6.5-patched.21.jar
|
||||
lucene-analyzers-kuromoji-6.6.5-patched.21.jar
|
||||
lucene-analyzers-morfologik-6.6.5-patched.21.jar
|
||||
lucene-analyzers-phonetic-6.6.5-patched.21.jar
|
||||
lucene-analyzers-smartcn-6.6.5-patched.21.jar
|
||||
lucene-analyzers-stempel-6.6.5-patched.21.jar
|
||||
lucene-backward-codecs-6.6.5-patched.21.jar
|
||||
lucene-classification-6.6.5-patched.21.jar
|
||||
lucene-codecs-6.6.5-patched.21.jar
|
||||
lucene-core-6.6.5-patched.21.jar
|
||||
lucene-expressions-6.6.5-patched.21.jar
|
||||
lucene-grouping-6.6.5-patched.21.jar
|
||||
lucene-highlighter-6.6.5-patched.21.jar
|
||||
lucene-join-6.6.5-patched.21.jar
|
||||
lucene-memory-6.6.5-patched.21.jar
|
||||
lucene-misc-6.6.5-patched.21.jar
|
||||
lucene-queries-6.6.5-patched.21.jar
|
||||
lucene-queryparser-6.6.5-patched.21.jar
|
||||
lucene-sandbox-6.6.5-patched.21.jar
|
||||
lucene-spatial-extras-6.6.5-patched.21.jar
|
||||
lucene-suggest-6.6.5-patched.21.jar
|
||||
metrics-core-3.2.2.jar
|
||||
metrics-ganglia-3.2.2.jar
|
||||
metrics-graphite-3.2.2.jar
|
||||
@@ -238,21 +211,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.25.5.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.21.jar
|
||||
solr-clustering-6.6.5-patched.21.jar
|
||||
solr-core-6.6.5-patched.21.jar
|
||||
solr-langid-6.6.5-patched.21.jar
|
||||
solr-solrj-6.6.5-patched.21.jar
|
||||
spatial4j-0.6.jar
|
||||
start.jar
|
||||
stax2-api-3.1.4.jar
|
||||
@@ -261,4 +228,4 @@ t-digest-3.1.jar
|
||||
vorbis-java-core-0.8.jar
|
||||
vorbis-java-tika-0.8.jar
|
||||
xz-1.6.jar
|
||||
zookeeper-3.4.10.jar
|
||||
zookeeper-3.4.14.jar
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Search Services
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* Copyright (C) 2005 - 2024 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
@@ -26,10 +26,8 @@
|
||||
|
||||
package org.alfresco;
|
||||
|
||||
import static java.util.stream.Collectors.toList;
|
||||
import static java.util.stream.Collectors.toSet;
|
||||
|
||||
import static org.junit.Assert.fail;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
@@ -39,9 +37,9 @@ import java.util.Set;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import org.junit.Test;
|
||||
import static java.util.stream.Collectors.toList;
|
||||
import static java.util.stream.Collectors.toSet;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
/**
|
||||
* Integration tests of the declared third party licenses.
|
||||
@@ -65,7 +63,7 @@ public class ThirdPartyLicensesIT
|
||||
public void testLicensesDeclared() throws Exception
|
||||
{
|
||||
// Get the path to the target directory.
|
||||
Path targetPath = Paths.get(getClass().getProtectionDomain().getCodeSource().getLocation().getPath(), "..");
|
||||
Path targetPath = Paths.get(getClass().getProtectionDomain().getCodeSource().getLocation().toURI()).getParent();
|
||||
|
||||
// Try to find the zip file in the target directory.
|
||||
Path zipPath = Files.find(targetPath, 1,
|
||||
|
@@ -4,18 +4,13 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-search-and-insight-parent</artifactId>
|
||||
<version>2.0.5</version>
|
||||
<version>2.0.16-SNAPSHOT</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.16-SNAPSHOT</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