Copied to clipboard

Flag this post as spam?

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


  • Jason 22 posts 41 karma points
    Jun 26, 2012 @ 16:52
    Jason
    0

    umbracoExamine.Contrib vs umbracoExamine.PDF

    Looking for insight into the differences without getting the source code.    I currently using umbracoExamine.Contrib to search for FileTextContent (.pdf docs) and it seems to combine all other data such as bodyText and my custom user fields.  Below is my filter code and my IndexSet.  Just looking for best practices.  Also in the future if I need to search against .docx, .txt what would be the best way?

    Thanks!

    Jason

     

     

    var criteria = ExamineManager.Instance.SearchProviderCollection["ContentAndPDFSearcher"].CreateSearchCriteria(BooleanOperation.Or);
    
    var filter = criteria.GroupedOr(new string[] { "nodeName""bodyText""FileTextContent""productTitle" }, SearchTerm)
                                    .Not()
                                    .Field("umbracoNaviHide""1")
                                    .Compile();

     

    <IndexSet SetName="ContentAndPDFIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/ContentAndPDFIndexSet/">
        <IndexAttributeFields>
          <add Name="id" />
          <add Name="nodeName"/>
          <add Name="nodeTypeAlias" />
          <add Name="parentID" />
          <add Name="FileTextContent" />      
        </IndexAttributeFields>
        <IndexUserFields>
          <add Name="bodyText" />
          <add Name="umbracoNaviHide" />
          <add Name="productTitle" />
        </IndexUserFields>
        <IncludeNodeTypes/>
        <ExcludeNodeTypes>
          <add Name="image" />     
        </ExcludeNodeTypes>
      </IndexSet>

     

  • 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