Copied to clipboard

Flag this post as spam?

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


  • Chris 11 posts 30 karma points
    Nov 30, 2011 @ 12:05
    Chris
    0

    Search case sensitivity

    I would like the search to be case insensitive. So "SearchTerm" returns the same results as "searchterm" is this possible. Here is my query if that helps 

     

               var criteria = ExamineManager.Instance
                    .SearchProviderCollection["InternalSearcher"]
                    .CreateSearchCriteria();

                var filter = criteria
                    .GroupedOr(new string[] { "nodeName", "bodyText","summary"},
                               searchTerm)
                    .Compile();

                SearchResults = ExamineManager.Instance.SearchProviderCollection["InternalSearcher"]
                    .Search(filter);

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Nov 30, 2011 @ 12:58
    Dirk De Grave
    0

    Have a look at this thread, and especially the reply by Aaron. (slace), it may be an answer to your question.

     

    Cheers,

    /Dirk

  • Chris 11 posts 30 karma points
    Nov 30, 2011 @ 13:22
    Chris
    0

    Hi I've tried creating another index set based on the Standard Analyers but it won't return anything and when I look at the index (using the Examine Dashboard Package) it says there are no documents in the index and it is in the queue. Here is some of the configs. Bear in mind I'm a total newbie.

     <IndexSet SetName="FrontEndIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/FrontEndMember/">
        <IndexAttributeFields>
          <add Name="id" />
          <add Name="nodeName"/>
          <add Name="updateDate" />
          <add Name="writerName" />
          <add Name="loginName" />
          <add Name="email" />
          <add Name="nodeTypeAlias" />
        </IndexAttributeFields>
        <IndexUserFields/>
        <IncludeNodeTypes/>
        <ExcludeNodeTypes />
      </IndexSet>

     

     

     


      <ExamineIndexProviders>
        <providers>
          <add name="InternalIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"
               supportUnpublished="true"
               supportProtected="true"
               interval="10"
               analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net"/>

          <add name="FrontEndIndexer" type="UmbracoExamine.UmbracoMemberIndexer, UmbracoExamine"
               supportUnpublished="true"
               supportProtected="true"
               interval="10"
               analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"/>     
         
         
          <add name="InternalMemberIndexer" type="UmbracoExamine.UmbracoMemberIndexer, UmbracoExamine"
               supportUnpublished="true"
               supportProtected="true"
               interval="10"
               analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"/>
        </providers>
      </ExamineIndexProviders>  

     

     

     

     

    <ExamineSearchProviders defaultProvider="InternalSearcher">
        <providers>
          <add name="InternalSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine"
               analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net"/>
         
          <add name="FrontEndSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine"
               analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net" enableLeadingWildcards="true"/>
         
         
          <add name="InternalMemberSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine"
               analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net" enableLeadingWildcards="true"/>
        </providers>
      </ExamineSearchProviders>

Please Sign in or register to post replies

Write your reply to:

Draft