mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
SHA-1771: Search script object updates for highlighting
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@131623 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -759,7 +759,7 @@ public class Search extends BaseScopableProcessorExtension implements Initializi
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Map<Serializable, Serializable> highlighting = (Map<Serializable, Serializable>)def.get("highlighting");
|
Map<Serializable, Serializable> highlighting = (Map<Serializable, Serializable>)def.get("highlight");
|
||||||
if (highlighting != null)
|
if (highlighting != null)
|
||||||
{
|
{
|
||||||
int snippetCount = this.getIntegerValue("snippetCount", 20, highlighting);
|
int snippetCount = this.getIntegerValue("snippetCount", 20, highlighting);
|
||||||
@@ -780,13 +780,16 @@ public class Search extends BaseScopableProcessorExtension implements Initializi
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<FieldHighlightParameters> fieldHighlightParameters = new ArrayList<FieldHighlightParameters>();
|
List<FieldHighlightParameters> fieldHighlightParameters = new ArrayList<FieldHighlightParameters>();
|
||||||
List<Map<Serializable, Serializable>> fields = (List<Map<Serializable, Serializable>>)def.get("fields");
|
List<Map<Serializable, Serializable>> fields = (List<Map<Serializable, Serializable>>)highlighting.get("fields");
|
||||||
for (Map<Serializable, Serializable> field: fields)
|
if (fields != null)
|
||||||
{
|
{
|
||||||
String propertyName = (String) field.get("field");
|
for (Map<Serializable, Serializable> field: fields)
|
||||||
if (propertyName != null)
|
|
||||||
{
|
{
|
||||||
fieldHighlightParameters.add(new FieldHighlightParameters(propertyName, snippetCount, fragmentSize, mergeContiguous, prefix, postfix));
|
String propertyName = (String) field.get("field");
|
||||||
|
if (propertyName != null)
|
||||||
|
{
|
||||||
|
fieldHighlightParameters.add(new FieldHighlightParameters(propertyName, snippetCount, fragmentSize, mergeContiguous, prefix, postfix));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user