since ‎03-05-2014
‎10-12-2019
calvin_wong
Level 1
Re: MSRP - How to CRUD image/file attachments?
Avatar

calvin_wong

calvin_wong
- Adobe Experience Manager
Let me take a crack at this. In the ToDoMVC sample, there's an example of using srp.create(), which is probably what you're using to write to SRP. You can use the same API to create attachments.This is roughly the pseudocode to add an attachment to a resource named "resource".Map attachmentProps = new HashMap();attachmentProps.put("nt:file", inputStream); // java.io.InputStreamattachmentProps.put("mimetype", mimeType); // StringattachmentProps.put(SocialUtils.PN_PARENTID, resource.getPath());att...

Views

400

Like

1

Replies

0
Re: SRP API - "Contains" Search or Full Text UGC Filtering?
Avatar

calvin_wong

calvin_wong
- Adobe Experience Manager
Enable DEBUG logging for com.adobe.cq.social.srp.impl.SocialSolrConnector.You should then get the actual Solr query in the debug log. Should look something like this:Query to solr is: sort=timestamp+desc&bl=en&pl=en&start=0&rows=10&q=%2Btitle_t:(*hello*)+%2Bprovider_id:\/content/usergenerated/asi/mongo/content/*+%2Bresource_type_s:*&df=provider_id&trf=verbatim&fq={!cost%3D100}report_suite:mongoThe query is the "q=" part. It's URL encoded, so use a web tool like http://meyerweb.com/eric/tools/den...

Views

352

Like

1

Replies

0
Re: SRP API - "Contains" Search or Full Text UGC Filtering?
Avatar

calvin_wong

calvin_wong
- Adobe Experience Manager
Can you use FullTextConstraint and give it a try?If you're searching for jcr:title or jcr:description, can you also try it in the search component http://host:port/content/community-components/en/search.html?

Views

349

Likes

0

Replies

0
Re: SRP API - "Contains" Search or Full Text UGC Filtering?
Avatar

calvin_wong

calvin_wong
- Adobe Experience Manager
The wildcard search in Solr is a known bug and it has been fixed. The fix is in AEM-6.2-COMMUNITIES-FEATURE-PACK-2, which will be uploaded to package share in the next few days. Will you be able to use this new feature pack? The same fix is also available for AEM 6.1 in AEM-6.1-COMMUNITIES-FEATURE-PACK-6, which will be uploaded to package share at the same time.

Views

359

Likes

0

Replies

0
Re: SRP API - "Contains" Search or Full Text UGC Filtering?
Avatar

calvin_wong

calvin_wong
- Adobe Experience Manager
You can get the search queries, SQL2 for JSRP or Lucene for MSRP, if you enable DEBUG logging for com.adobe.cq.social.ugc.impl.LuceneUgcSearch. With the debug queries, you can try them directly in CRX/DE for JSRP or the Solr Admin console for MSRP.

Views

355

Like

1

Replies

0
Likes from