mirror of
https://github.com/Alfresco/SearchServices.git
synced 2025-09-17 14:21:20 +00:00
Merge pull request #1081 from Alfresco/fix/MNT-22045_minhash_update
[MNT-22045] Prevents MINHASH field from being always added (cherry picked from commit 0830476021049c9e9bb8c3b3e9881937eb726bda)
This commit is contained in:
committed by
Tiago Salvado
parent
d42767866f
commit
1ae7195791
@@ -190,7 +190,7 @@ public class FingerPrintTest extends AbstractE2EFunctionalTest
|
|||||||
testSearchQueryUnordered(fingerprintQuery, expectedNames, SearchLanguage.AFTS);
|
testSearchQueryUnordered(fingerprintQuery, expectedNames, SearchLanguage.AFTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(priority = 5, enabled = false)
|
@Test(priority = 5)
|
||||||
@Bug(id = "SEARCH-2065")
|
@Bug(id = "SEARCH-2065")
|
||||||
public void searchAfterVersionUpdate()
|
public void searchAfterVersionUpdate()
|
||||||
{
|
{
|
||||||
@@ -215,13 +215,13 @@ public class FingerPrintTest extends AbstractE2EFunctionalTest
|
|||||||
Assert.assertTrue(found, "Update File Not found in results for Fingerprint Query with updated content");
|
Assert.assertTrue(found, "Update File Not found in results for Fingerprint Query with updated content");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(priority = 6, enabled = false)
|
@Test(priority = 6)
|
||||||
@Bug(id = "SEARCH-2065")
|
@Bug(id = "SEARCH-2065")
|
||||||
public void searchAfterVersionRevert() throws Exception
|
public void searchAfterVersionRevert() throws Exception
|
||||||
{
|
{
|
||||||
// Revert fileToBeUpdated to previous version
|
// Revert fileToBeUpdated to previous version
|
||||||
restClient.authenticateUser(testUser).withCoreAPI().usingNode(fileToBeUpdated).revertVersion("1.0", "{}");
|
restClient.authenticateUser(testUser).withCoreAPI().usingNode(fileToBeUpdated).revertVersion("1.0", "{}");
|
||||||
String revertedContent = restClient.authenticateUser(testUser).withCoreAPI().usingNode(fileToBeUpdated).getVersionContent("1.2").toString();
|
String revertedContent = restClient.authenticateUser(testUser).withCoreAPI().usingNode(fileToBeUpdated).getVersionContent("1.2").getResponse().asString();
|
||||||
Assert.assertEquals(revertedContent, fileOriginal.getContent(), "Reverted content does not match Original");
|
Assert.assertEquals(revertedContent, fileOriginal.getContent(), "Reverted content does not match Original");
|
||||||
|
|
||||||
// Wair for the new version of the file to be indexed
|
// Wair for the new version of the file to be indexed
|
||||||
@@ -236,7 +236,7 @@ public class FingerPrintTest extends AbstractE2EFunctionalTest
|
|||||||
Assert.assertTrue(notFound, "File appears in the results for Fingerprint Query even after reverting content changes");
|
Assert.assertTrue(notFound, "File appears in the results for Fingerprint Query even after reverting content changes");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(priority = 7, enabled = false)
|
@Test(priority = 7)
|
||||||
@Bug(id = "SEARCH-2065")
|
@Bug(id = "SEARCH-2065")
|
||||||
public void searchAfterVersionDelete() throws Exception
|
public void searchAfterVersionDelete() throws Exception
|
||||||
{
|
{
|
||||||
|
@@ -2749,7 +2749,9 @@ public class SolrInformationServer implements InformationServer
|
|||||||
TokenStream ts = analyzer.tokenStream("dummy_field", textContent);
|
TokenStream ts = analyzer.tokenStream("dummy_field", textContent);
|
||||||
CharTermAttribute termAttribute = ts.getAttribute(CharTermAttribute.class);
|
CharTermAttribute termAttribute = ts.getAttribute(CharTermAttribute.class);
|
||||||
ts.reset();
|
ts.reset();
|
||||||
while (ts.incrementToken()) {
|
doc.removeField(FINGERPRINT_FIELD);
|
||||||
|
while (ts.incrementToken())
|
||||||
|
{
|
||||||
StringBuilder tokenBuff = new StringBuilder();
|
StringBuilder tokenBuff = new StringBuilder();
|
||||||
char[] buff = termAttribute.buffer();
|
char[] buff = termAttribute.buffer();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user