Indexing the content fragment's data that every page has referenced.

Avatar

Avatar

ignacio_mancill

Avatar

ignacio_mancill

ignacio_mancill

03-01-2019

Hi there,

We have received a request in order to do a suggestive search service that fetch a list of pages based on a String received in a parameter ( the searched word). The problem came when a pages has a content fragment inside it. The word received needs to be searched into the content fragment inside. For example:

Calling service -> localhost:4502/bin/service.json?searchedString=My text

Searching the string My text into the next structure

/content

     /project

          /page-of-my-text

               /jcr:content

                    property: content-fragment = /content/dam/project/content-fragment

/content

     /dam

          /project

               /content-fragment

                    property:data = "Hey, My text is here"

And the result should be the hits where that string is appearing.

    title:My Test Page

     path: /content/project/page-of-my-text

     string-searched: My Text

We already have how to search all nodes in /content but we don't know how to link the property content-fragment inside in order to index the content fragment that every page has inside.

Do you guys have any idea? We are not using Solr (the request is to use only OOB of Adobe).

Regards.

View Entire Topic

Avatar

Avatar

ignacio_mancill

Avatar

ignacio_mancill

ignacio_mancill

04-01-2019

Hi gauravb10066713,

The cardinality is one page to one content fragment. The code is ready to search under /content. The problem is how to get the data property of each content fragment assoiated to that page in the same search. I mean, basically by searching in the same oak index. We have created our custom Index in order to index some properties.

We would want to create a custom index with the assosiation mentionned. The data of the content fragment referenced to a page.

Regards.