Where is the _content field?

Michael D asked on December 10, 2019 20:28

Hi, I've read that "By default search is done against the _content field." Where exactly is the _content field? Can I see what is in there for a given page?

Our web pages are made up of several web parts and I'm wondering if only part of all content on the page is being index or if it's just a single web part.

Thanks

Correct Answer

Brenden Kehren answered on December 10, 2019 21:21

Anything specific to the template would NOT be included in the DocumentContent field. These would be any web part not storing content in the DocumentContent field. Editable Text and Editable Image web parts are the only web parts I'm aware of that store content in the DocumentContent field of a page.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on December 10, 2019 20:42

There is no specific _content field for a page type. This is part of the generic result of the smart search result. You can define, in the page type, under the Search section which fields you want to use for the title, content and image.

0 votesVote for this answer Mark as a Correct answer

Michael D answered on December 10, 2019 20:50

Thanks Brenden. I apologize but can I get more details.

So when they say "By default search is done against the _content field." - Answer 3, are they wrong?

I understand when you go to Page Type > Search fields, then I can check which fields I want searchable. But those fields are all on the Forms tab. How does the content on the page get search? Are all 'Editable text' web part considered _content? What if there is a 'Universal viewer' on the page; is that included in _content?

Thanks again for your time,

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on December 10, 2019 21:00

At the top of Page Type > Search Fields, there are some dropdown boxes. That is where the _content field is defined for that page type. By default, any editable text is included into that _content field. Smart Search creates a generic result set each time you do a search. This result set has the following fields based on the documentation

  • score
  • title
  • content
  • created
  • image
  • index
  • documentextensions
  • and the fields from the page type

Content in the Universial Viewer would be from another location on the site so it wouldn't be included. If you want to get the rendered content on that page, you'd have to use the Pages Crawler index type or a custom index you'd create.

0 votesVote for this answer Mark as a Correct answer

Michael D answered on December 10, 2019 21:17 (last edited on December 10, 2019 21:18)

Thanks! I feel like I'm getting closer :)

So it says Content field: DocumentContent. What exactly is included in that?

All Editable text web parts are included, great. And that the Universal Viewer is not, good to know!

What else is included or not?

  • Static HTML (I assume so).
  • Any custom web parts (I assume not).
  • How about if I do a Smart Search Results web part on a page and it displays content; is that included in DocumentContent?
  • Repeaters?

Thank you so much for all this help!

0 votesVote for this answer Mark as a Correct answer

Michael D answered on December 10, 2019 21:26

So not even Static HTML web part. Good to know.

Thank you again for your time. This was extremely helpful.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.