Include attached file content to page search result


I am having a specific page type with a property that is holding a file as this:

        GroupName = SystemTabNames.Content,
        Order = 400)]
    public virtual Url Document { get; set; }

How can I include the content of that file to the page in the find index?

How should I write the search query for finding pages (with attached file) that are matching the search query?

Jun 01, 2023 8:31

Hi Robert,

What type of searching are you implementing unified search, multi-search, typed search? Depending upon this you will basis how you get the document.

Are you trying to search the document? or more just have a query that returns the content and the file?

Would be good to look at to get a basis of what you want.


Edited, Jun 06, 2023 13:59
Edited, Jun 09, 2023 10:00

Hi Robet,

Glad you found a solution that works.

I see that this solution uses conventions to index the document as part of the page model in the index.

You can read more about customizing the indexing behaviour here



Edited, Jun 12, 2023 7:59
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.