Copied to clipboard

Flag this post as spam?

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


  • Anthony Candaele 1197 posts 2049 karma points
    Sep 01, 2011 @ 11:20
    Anthony Candaele
    0

    Question about the ExamineIndex.config file

    Hi, I have a question about the ExamineIndex.config file.

    I don't fully grasp the difference between the IndexAttributeFields node settings and the IndexUserFields node settings:

    <IndexAttributeFields>

                <add Name="id" />

                <add Name="nodeName"/>

                <add Name="updateDate" />            

                <add Name="nodeTypeAlias" />           

            </IndexAttributeFields>

            <IndexUserFields>

                <add Name="pageTitle" />

                <add Name="bodyText" />

                <add Name="executiveName" />

            </IndexUserFields>

    I'm asking this, because when I searched for Executive Members, I got search results, but when I clicked a search result I got an error message because the Executive Member nodes in the content tree hadn't been given a template.

    So I created a template and pointed every Executive Member in the content tree to this template, but when I did a new search on a executive member the Examine search did not hold any search results.

    So I tweaked the ExamineIndex.config file and added the 'executiveName' property to the IndexUserFields node setting but my search for an executive member still does not hold any search results.

    Thanks for your help,

    Anthony Candaele

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Sep 01, 2011 @ 11:35
    Dirk De Grave
    1

    Anthony,

    Difference between attribute fields and user fields -> attribute fields refer to those generic document props that are saved as attributes in the published xml where as your user fields are stored as child xml elements of the document element.

    Have you configured your search query to include to search on the field executiveName, including the field in the index is required but you also specify that you'll be searching on that field in your search query?

     

    Cheers,

    /Dirk

  • Anthony Candaele 1197 posts 2049 karma points
    Sep 01, 2011 @ 13:22
    Anthony Candaele
    0

    Hi Dirk,

    My search query in de EshmsSearchResults.ascx usercontrol is currently configured as follows:

    <%# ((Examine.SearchResult)Container.DataItem).Fields["nodeName"]%>

    In the code behind the filter is configured as follows:

    var filter = criteria

                    .GroupedOr(new string[] { "nodeName", "bodyText" }, SearchTerm)

                    .Not()

                    .Field("umbracoNaviHide", "1")

                    .Compile();

    I assume that I need to add the field "exectiveName" to the string arry?

    thanks for your help,

    Anthony Candaele

Please Sign in or register to post replies

Write your reply to:

Draft