mirror of
https://github.com/Alfresco/SearchServices.git
synced 2025-09-10 14:11:25 +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);
|
||||
}
|
||||
|
||||
@Test(priority = 5, enabled = false)
|
||||
@Test(priority = 5)
|
||||
@Bug(id = "SEARCH-2065")
|
||||
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");
|
||||
}
|
||||
|
||||
@Test(priority = 6, enabled = false)
|
||||
@Test(priority = 6)
|
||||
@Bug(id = "SEARCH-2065")
|
||||
public void searchAfterVersionRevert() throws Exception
|
||||
{
|
||||
// Revert fileToBeUpdated to previous version
|
||||
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");
|
||||
|
||||
// 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");
|
||||
}
|
||||
|
||||
@Test(priority = 7, enabled = false)
|
||||
@Test(priority = 7)
|
||||
@Bug(id = "SEARCH-2065")
|
||||
public void searchAfterVersionDelete() throws Exception
|
||||
{
|
||||
|
@@ -2749,7 +2749,9 @@ public class SolrInformationServer implements InformationServer
|
||||
TokenStream ts = analyzer.tokenStream("dummy_field", textContent);
|
||||
CharTermAttribute termAttribute = ts.getAttribute(CharTermAttribute.class);
|
||||
ts.reset();
|
||||
while (ts.incrementToken()) {
|
||||
doc.removeField(FINGERPRINT_FIELD);
|
||||
while (ts.incrementToken())
|
||||
{
|
||||
StringBuilder tokenBuff = new StringBuilder();
|
||||
char[] buff = termAttribute.buffer();
|
||||
|
||||
@@ -4102,4 +4104,4 @@ public class SolrInformationServer implements InformationServer
|
||||
return empty();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user