Copied to clipboard

Flag this post as spam?

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


  • Daniel Williams 16 posts 38 karma points
    Feb 12, 2011 @ 21:50
    Daniel Williams
    0

    Adding more types to ExamineIndex

    Hello Umbraconies!
    I have been working with the Examine Search Module, and it works brilliant, however i can't seem to get hold of any custom Umbraco Document Types, only:

          <add Name="id" />
          <add Name="nodeName" />
          <add Name="nodeTypeAlias" />
          <add Name="parentID" />

    Lets say i want to add a textstring value, then i get the error:
    - "The given key was not present in the dictionary."

    I was told that you could let the

    <IndexUserFields />
    <IncludeNodeTypes />

    closed, and they would make all document fields available, so my procidure just follows in the .ascx:

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

    However i just get the error (and i have republished and everything to make sure everything is updated)
    - Any Ideas to what could be wrong?

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Feb 14, 2011 @ 03:16
    Aaron Powell
    1

    The 'IndexUserFields' are the custom Umbraco properties that you've included, and that's where you need an <add Name="squareLogo" /> declaration.

    Without that Examine wont index the property and thus wont return it from the search. The search only returns what was indexed.

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Feb 14, 2011 @ 10:36
    Hendy Racher
    0

    Hi,

    Sorry to hijack this thread, but wondered if it was necessary to define UserIndexFields in the ExamineIndex.config when those fields are added dynamically in GatheringNodeData events (related post at bottom of the page).

    Cheers,

    Hendy

  • Daniel Williams 16 posts 38 karma points
    Feb 14, 2011 @ 12:05
    Daniel Williams
    0

    @slace, thanks for the reply :)

    I have tried to add the <add Name="squareLogo" /> node to 'IndexUserFields' - but it still gives me the same error (thats what i started out with)
    - Until i saw the Umbraco Video Guide, where he says that if you leave the IndexUserFields empty, you get all fields.
    .. Do you have any other possible problem solves?

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Feb 15, 2011 @ 03:10
    Aaron Powell
    0

    Hmm, maybe it does index all fields unless you specify them. Been a while since i was in the Examine codebase so I don't remember.

    One option is to look into the Queue folder, publish a node and open the file generated. This is a serialized version of the data to go into Lucene's index, so it'll show you what field(s) are being included.

  • René Pjengaard 118 posts 702 karma points c-trib
    Feb 17, 2011 @ 14:27
    René Pjengaard
    0

    Hi Daniel,

    try use Luke (http://www.getopt.org/luke/) and see if the custom fields are in the index. If not, try delete the whole index from the server and save & publish a node.

    /René

Please Sign in or register to post replies

Write your reply to:

Draft