The product indexer for a product shows the following index for a product in examine:
__IndexType: productvariant __NodeId: 1369 allDocs: 1 ..[removedcontent].. createDate: 20160503130146000 detachedContents: [{"Key":"92cc1914-c39a-4779-89cc-e7d4aaf28f95","DetachedContentType":{"$id":"1","EntityTfKey":"9f923716-a022-4089-a110-1e9b4e1f2ad1","Name":"Bazaar Product","ContentTypeKey":"50318fc4-4534-ae99-7ee1-d14a16a8f4e1","CreateDate":"2016-02-08T18:06:23.007Z","UpdateDate":"2016-03-30T15:13:30.43Z","Key":"ca27b448-cc7c-481a-819d-830184a80369"},"CultureName":"en-US","TemplateId":0,"ProductVariantKey":"ef87a4bd-5bd0-4ad1-a0fa-25390e9e9eed","Slug":"new-era-new-york-yankees-classic-39thirty-cap","CanBeRendered":true,"DetachedDataValues":[{"Key":"description","Value":"\"<p><span>This New York Yankees MLB Fashion Classic 39THIRTY Cap features an embroidered New York Yankees logo on front, stitched New Era® flag at wearer's left side and embroidered alternate team logo on the rear. Interior includes branded taping as well as a moisture absorbing sweatband. Stretch fit on closed back.</span></p>\""},{"Key":"relatedProducts","Value":""},{"Key":"otherImages","Value":"\"1834\""},{"Key":"overview","Value":"\"\""},{"Key":"image","Value":"{\r\n \"focalPoint\": {\r\n \"left\": 0.5,\r\n \"top\": 0.5\r\n },\r\n \"src\": \"/media/1922/new-york-yankees_new_era_cap_1.jpg\"\r\n}"}],"CreateDate":"2016-05-03T13:02:23.397Z","UpdateDate":"2016-05-03T13:06:14.98Z"}] download: False downloadMediaId: -1 ..[removedcontent].. weight: 0.000000 width: 0.000000
But I'm struggling to perform any kind of examine query that matches anything in the detached contents field.
Has anyone managed to this or do I need to look at adding a custom field via onGathering etc to extract out the fields from the detachedcontent fields into their separate fields in the index?
This is closely related to an issue I've run into myself, not with products but with modules of related content that are actually grandchildren of the page they reside on.
Sadly I've not been able to create the relationship between the levels in the examine index but here is a link to my post which has come code snippets and links to other ideas and solutions, as well as a link to the issues tracker where the core are looking into the situation with nested content and searching:
Out of curiosity, how did you relate the flattened json back to the containing page in order to show results?
While I can get the nested content into the index, and return results from the text/lucene search in the back office, trying to transfer the content or "link" the flattened JSON to the grandparent in order to show it seems to be the trade off Matt spoke about?
Product Indexer/Searcher and Detached Content
Hi,
The product indexer for a product shows the following index for a product in examine:
But I'm struggling to perform any kind of examine query that matches anything in the detached contents field.
Has anyone managed to this or do I need to look at adding a custom field via onGathering etc to extract out the fields from the detachedcontent fields into their separate fields in the index?
Trevor,
This is closely related to an issue I've run into myself, not with products but with modules of related content that are actually grandchildren of the page they reside on.
Sadly I've not been able to create the relationship between the levels in the examine index but here is a link to my post which has come code snippets and links to other ideas and solutions, as well as a link to the issues tracker where the core are looking into the situation with nested content and searching:
https://our.umbraco.org/projects/website-utilities/ezsearch/bugs-feedback-suggestions/77305-unable-to-find-search-results-for-multiple-archetypes
Hope this helps, let us know if you come up with anything!
Cheers, Jon
Hi Jon, thanks for the reply.
The solution was as I expected, which was to create an onGathering and flatten the JSON into field(s) as per Matt's example in your link.
Cheers Trevor
Trevor,
Good to hear you got it sorted!
Out of curiosity, how did you relate the flattened json back to the containing page in order to show results?
While I can get the nested content into the index, and return results from the text/lucene search in the back office, trying to transfer the content or "link" the flattened JSON to the grandparent in order to show it seems to be the trade off Matt spoke about?
Thoughts?
I didn't. I'm searching products within Merchello and just needed to know if the search word was in the extended (JSON) content or not.
If I found a match, I showed the product in the search results without displaying the text that was matched on.
You guys figure out a good solution for searching products based on multiple detached content fields? Or better yet, a fast solution that scales?
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.