Copied to clipboard

Flag this post as spam?

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


  • Neil Hodges 338 posts 987 karma points
    Jun 26, 2014 @ 12:44
    Neil Hodges
    0

    Examine Search Results - Members - The given key was not present in the dictionary.

    Hi

    Im using Umbraco v6.1.6 and searching against members using Examine (InternalMemberSearcher) and i keep running into this YSOD that states -

     

    The given key was not present in the dictionary.

    This happens when trying to iterate over a checkbox list datatype property.

     

     <h3>Specialisms</h3>
                            <ul>
                                @{                            
                                    var specs = item.Fields["specialisms"].Split(',');
                                    foreach (var specitem in specs)
                                    {
                                        <li>@specitem</li>
                                    }
                                }
                            </ul>

     

    Firstly is there a way to first check wether the [specialisms] field is present and has a value?

    Secondly why is my InternalMemberSearcher not including this property in its index? i have added it to the ExamineIndex.config in IndexUserFields but it seems everytime i add a new member and then do a search it fails as its not indexed specialisms.

    Is there a way i can flush the index when a new user is created programatically so its forced to index the new members properties?

    Not sure what else i can do, any ideas?

     

Please Sign in or register to post replies

Write your reply to:

Draft