Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Matt 76 posts 280 karma points
    Mar 26, 2014 @ 05:55
    Matt
    0

    Test page I am using

    To test things out I use the following test template.  This is what is associated with a Document type called "Test Page" that has a single RTE property on it with an alias of "content":

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    @using Examine
    @using Examine.SearchCriteria
    @{
        Layout = null;
    }
    <h1>Test Page</h1>
    <p>
        <strong>Server that Rendered this Page (Environment.MachineName):</strong><br />
        @Environment.MachineName
    </p>
    <p>
        <strong>Content Property pulled via Umbraco.Field:</strong><br />
        @Umbraco.Field("content")
    </p>
    <p>
        <strong>Content Property pulled via Examine Index:</strong><br />
        @{
            var searcher = ExamineManager.Instance.SearchProviderCollection["ExternalSearcher"];
            var searchCriteria = searcher.CreateSearchCriteria(Examine.SearchCriteria.BooleanOperation.And);
            IBooleanOperation query = searchCriteria.GroupedOr(new string[] { "nodeTypeAlias" }, "TestPage");
            var searchResults = searcher.Search(query.Compile());
        }
        @foreach (var searchResult in searchResults)
        {
            @Html.Raw(searchResult["__Raw_content"])
        }
    </p>
Please Sign in or register to post replies

Write your reply to:

Draft