Copied to clipboard

Flag this post as spam?

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


  • suzyb 464 posts 877 karma points
    Jun 28, 2012 @ 12:32
    suzyb
    0

    User search

    I'm working on an intranet which needs to have a search of members registered with it.  The members will have custom properties that we want to search by, for example "sex", "language".  But I'm not sure how to do this.

    Can anyone point me in the right direction.

  • Tom Smith 98 posts 172 karma points
    Jun 28, 2012 @ 13:47
    Tom Smith
    0

    Hello,

    I'd reccomend using examine (a powerful search engine bundled with umbraco). Umbraco already indexes members interally and you could potentially just query this index.

    Normally I set up a custom member index so I can control which fields are indexed / sortable etc. 

    Here is an awesome blog post on using examine which should help get you started. 

    http://umbraco.com/follow-us/blog-archive/2011/9/16/examining-examine.aspx

    Many Thanks,

    Tom

  • suzyb 464 posts 877 karma points
    Jul 03, 2012 @ 12:22
    suzyb
    0

    I have tried to use examine but am getting errors when trying to create my index.

    In the log file I get this error

    [UmbracoExamine] Error indexing queue items,The given key was not present in the dictionary., IndexSet:  IntranetMembersIndexSet

    Then this one keeps being logged

    [UmbracoExamine] Cannot index queue items, the index doesn't exist!,, IndexSet: InternalMemberIndexSet
    

    My index config and settings config are below.

        <IndexSet SetName="IntranetMembersIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/IntranetMembers/">
    <IndexAttributeFields>
    <add Name="id" />
    <add Name="email" />
    </IndexAttributeFields>
    <IndexUserFields>
    <add Name="nationality" />
    <add Name="sex" />
    <add Name="age" />
    <add Name="university" />
    <add Name="course" />
    <add Name="nidoLocation" />
    </IndexUserFields>
    <IncludeNodeTypes/>
    <ExcludeNodeTypes />
    </IndexSet>
    <add name="IntranetMembersIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"
                analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"
                interval="10" />

    Can anyone point out what I've done wrong.

     

  • Tom Smith 98 posts 172 karma points
    Jul 03, 2012 @ 16:42
    Tom Smith
    1

    Hi,

    The second error looks like a result of a missing InternalMemberIndexSet. Umbraco requires this to function (it powers the member section in the backoffice among other things). Is it present in ExamineIndex.config? Is its associated indexer and searcher present in ExamineSettings.config? 

    In terms of the other issues, the IntranetMembersIndexer has an incorrect type attribute. It should be type="UmbracoExamine.UmbracoMemberIndexer, UmbracoExamine". It's also missing the indexSet attribute. indexSet="IntranetMembersIndexSet"

    Have you also added an IntranetMemberSearcher in ExamineSettings.config? This should look something like 

                <add name="IntranetMemberSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine" indexSet="IntranetMembersIndexSet"

                    analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net" enableLeadingWildcards="true"/>

    Many Thanks,
    Tom
  • suzyb 464 posts 877 karma points
    Jul 04, 2012 @ 12:06
    suzyb
    0

    The InternalMemberIndexSet was left as it was and the indexer and searcher was present.

    I've ended up copying the internal member index set as I'm told if the fields aren't specified it includes them all by default.  Hopefully this will work.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies