I'm trying to do a search using the search api to get some of my pages:


The text returned is missing line breaks and some other characters. How do I get the raw text?

  • What do you mean by "raw text" do you mean you want the full text of the pages that were returned as search results? Apr 5 '14 at 12:25
  • I have a lot of pages with a rich text fields for content and I want to display the content of these text fields on another page.
    – jlai
    Apr 5 '14 at 16:20

There are a couple of way to do this. You may try to Manage all of the rich text fields (promote them from crawled properties to managed properties and then do a full crawl). Then reference the fields in your search query. The problem you may find is that you won't actually get all of the info from the field (if there is a lot of data in the field you may not get it all, and you will bloat your index).

An alternative is to use the results data to get a reference to the page and then use jQuery to pull exactly the fields that you want. With this approach, you will get all the data, because you own the whole process. You don't rely on the Search subsystem to return the page data.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.