From 233ed7edc11ae59883c95f9539f93e7d7db13316 Mon Sep 17 00:00:00 2001 From: Mark Rogers Date: Wed, 23 Jul 2014 16:44:52 +0000 Subject: [PATCH] Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud) 77234: Merged PLATFORM1 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud) 76041: Support for ACE-2077 SOLR 4 - Store content, metadata doc & fields for reindex & highlighting - fix up to include content data id git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@78090 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../alfresco/solr/client/ContentPropertyValue.java | 11 +++++++++-- .../java/org/alfresco/solr/client/SOLRAPIClient.java | 4 +++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/search-services/alfresco-solrclient-lib/source/java/org/alfresco/solr/client/ContentPropertyValue.java b/search-services/alfresco-solrclient-lib/source/java/org/alfresco/solr/client/ContentPropertyValue.java index edfaaf0d0..f18b362db 100644 --- a/search-services/alfresco-solrclient-lib/source/java/org/alfresco/solr/client/ContentPropertyValue.java +++ b/search-services/alfresco-solrclient-lib/source/java/org/alfresco/solr/client/ContentPropertyValue.java @@ -13,14 +13,16 @@ public class ContentPropertyValue extends PropertyValue private long length; private String encoding; private String mimetype; + private Long id; - public ContentPropertyValue(Locale locale, long length, String encoding, String mimetype) + public ContentPropertyValue(Locale locale, long length, String encoding, String mimetype, Long id) { super(); this.locale = locale; this.length = length; this.encoding = encoding; this.mimetype = mimetype; + this.id = id; } public String getEncoding() @@ -43,10 +45,15 @@ public class ContentPropertyValue extends PropertyValue return length; } + public Long getId() + { + return id; + } + @Override public String toString() { return "ContentPropertyValue [locale=" + locale + ", length=" + length + ", encoding=" - + encoding + ", mimetype=" + mimetype + "]"; + + encoding + ", mimetype=" + mimetype + ", id="+id+"]"; } } diff --git a/search-services/alfresco-solrclient-lib/source/java/org/alfresco/solr/client/SOLRAPIClient.java b/search-services/alfresco-solrclient-lib/source/java/org/alfresco/solr/client/SOLRAPIClient.java index 4bca0b215..c820427e8 100644 --- a/search-services/alfresco-solrclient-lib/source/java/org/alfresco/solr/client/SOLRAPIClient.java +++ b/search-services/alfresco-solrclient-lib/source/java/org/alfresco/solr/client/SOLRAPIClient.java @@ -650,7 +650,9 @@ public class SOLRAPIClient String encoding = o.has("encoding") ? o.getString("encoding") : null; String mimetype = o.has("mimetype") ? o.getString("mimetype") : null; - ret = new ContentPropertyValue(locale, size, encoding, mimetype); + Long id = o.has("contentId") ? o.getLong("contentId") : null; + + ret = new ContentPropertyValue(locale, size, encoding, mimetype, id); } else {