Copied to clipboard

Flag this post as spam?

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


  • Dan 1285 posts 3917 karma points c-trib
    May 08, 2014 @ 13:59
    Dan
    0

    Full Text Search - V7 support

    Hi,

    Are there plans to make a v7 compatible version of this (fantastic!) package?

    Thanks.

  • Governor Technology 146 posts 551 karma points
    May 08, 2014 @ 14:18
    Governor Technology
    100

    Hi Dan

    Unfortunately the state of this request is still the same as mentioned here at this stage: https://fulltextsearch.codeplex.com/discussions/483813

    Regards,

    Rigardt

  • Dan 1285 posts 3917 karma points c-trib
    May 08, 2014 @ 14:20
    Dan
    0

    Great, thanks Rigardt. Looks like it may work with the latest v7; I'll give it a try.

  • Comment author was deleted

    Jun 23, 2014 @ 23:34

    I've had this running on v7 for the last few months (started on 7.0.2 and am now on 7.1.4) and am finding that it works very well.

  • schlubadub 102 posts 617 karma points
    May 20, 2015 @ 06:22
    schlubadub
    1

    But does it work for content inside a Grid? 7.2.x EDIT: Yes.

  • yogesh pathak 136 posts 221 karma points
    Jul 29, 2015 @ 09:15
    yogesh pathak
    0

    Hi Guys, Does FullTextSearch support grid content search? ,or if you know any other way of doing so? Thanks in advance Yogesh

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Jul 29, 2015 @ 09:27
    Dennis Aaen
    0

    Hi yogesh,

    Perhaps this Github example from Skybrud can help you how to get the grid content searchable.

    https://gist.github.com/abjerner/bdd89e0788d274ec5a33

    Hope this helps,

    /Dennis

  • yogesh pathak 136 posts 221 karma points
    Jul 29, 2015 @ 09:33
    yogesh pathak
    0

    Hey Dennis, i tried implementing that solution but
    " BaseIndexProvider externalIndexer = ExamineManager.Instance.IndexProviderCollection["ExternalIndexer"]; " Line in the example is throwing an exception of "Exception has been thrown by the target of an invocation." Could you help? Thanks

  • Anders Bjerner 487 posts 2989 karma points MVP 7x admin c-trib
    Jul 29, 2015 @ 11:21
    Anders Bjerner
    0

    Hi yogesh,

    I can't really think of a reason why that line specifically would fail, since those classes are a part of the Umbraco Core.

    Anyways - what version of Umbraco are you using? My grid package is build against 7.2.0, but it should also work in newer versions of Umbraco. I haven't tested in 7.3.0 though.

    Also, if you have created a class similar to the ExamineIndexer class in my Gist (the one Dennis is referencing), could you post that class here? That may help finding the culprit ;)

  • yogesh pathak 136 posts 221 karma points
    Jul 29, 2015 @ 12:09
    yogesh pathak
    0

    Hi Anders, i am using 7.2.0 version of Umbraco , and i am into the very initial stage of implementing your solution so i just have copied your full example My ExaminIndexer looks like somthing bellow

    using Examine; using Examine.Providers; using Skybrud.Umbraco.GridData; using Skybrud.Umbraco.GridData.Values; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Web; using Umbraco.Core.Logging;

    namespace Myproject.Web.GridDataIndexer { public class ExamineIndexer {

        public ExamineIndexer()
        {
            BaseIndexProvider externalIndexer = ExamineManager.Instance.IndexProviderCollection["ExternalIndexer"];
    
            externalIndexer.GatheringNodeData += OnExamineGatheringNodeData;
    
        }
    
        private void OnExamineGatheringNodeData(object sender, IndexingNodeDataEventArgs e)
        {
    
            try
            {
    
                string nodeTypeAlias = e.Fields["nodeTypeAlias"];
    
                LogHelper.Info<ExamineIndexer>("Gathering node data for node #" + e.NodeId + " (type: " + nodeTypeAlias + ")");
    
                if (nodeTypeAlias == "Home" || nodeTypeAlias == "LandingPage" || nodeTypeAlias == "TextPage" || nodeTypeAlias == "BlogPost")
                {
    
                    string value;
    
                    if (e.Fields.TryGetValue("content", out value))
                    {
    
                        LogHelper.Info<ExamineIndexer>("Node has \"content\" value\"");
    
                        GridDataModel grid = GridDataModel.Deserialize(e.Fields["content"]);
    
                        StringBuilder combined = new StringBuilder();
    
                        foreach (GridControl ctrl in grid.GetAllControls())
                        {
    
                            switch (ctrl.Editor.Alias)
                            {
    
                                case "rte":
                                    {
    
                                        // Get the HTML value
                                        string html = ctrl.GetValue<GridControlRichTextValue>().Value;
    
                                        // Strip any HTML tags so we only have text
                                        string text = Regex.Replace(html, "<.*?>", "");
    
                                        // Extra decoding may be necessary
                                        text = HttpUtility.HtmlDecode(text);
    
                                        // Now append the text
                                        combined.AppendLine(text);
    
                                        break;
    
                                    }
    
                                case "media":
                                    {
                                        GridControlMediaValue media = ctrl.GetValue<GridControlMediaValue>();
                                        combined.AppendLine(media.Caption);
                                        break;
                                    }
    
                                case "headline":
                                case "quote":
                                    {
                                        combined.AppendLine(ctrl.GetValue<GridControlTextValue>().Value);
                                        break;
                                    }
    
                            }
    
                        }
    
                        e.Fields["content"] = combined.ToString();
    
                    }
                    else
                    {
    
                        LogHelper.Info<ExamineIndexer>("Node has no \"content\" value\"");
    
                    }
    
                }
    
            }
            catch (Exception ex)
            {
    
                LogHelper.Error<ExamineIndexer>("MAYDAY! MAYDAY! MAYDAY!", ex);
    
            }
    
        }
    
    }
    

    } and this is how my ExaminSetting.config looks like

    Hope it helps

    Thanks

  • yogesh pathak 136 posts 221 karma points
    Jul 29, 2015 @ 12:11
    yogesh pathak
    0

    I dont know why but somehow i am not able to put my ExaminSetting.config file here , so i just want to know is there anything which i need to change in these config files too make it work?

  • Anders Bjerner 487 posts 2989 karma points MVP 7x admin c-trib
    Jul 29, 2015 @ 12:21
    Anders Bjerner
    0

    I think I have found the culprit now. The class you just posted seems fine, and it works fine if I copy the class to a local test installation. Also it isn't necessary to edit the config file.

    What seems to be the problem is instead where you initialize the class. If you look at my example, the class is initialized during ApplicationStarted.

    If I instead change the the Startup to initialize ExamineIndexer during ApplicationStarting, I get the same exception as you (because the examine indexes haven't been loaded at this point).

    using Umbraco.Core;
    
    namespace FanoeTest {
    
        public class Startup : ApplicationEventHandler {
    
        private static ExamineIndexer _examineIndexer;
    
        protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) {
            // Register events for Examine
            _examineIndexer = new ExamineIndexer();
        }
    
        }
    
    }
    

    Let me know if this solves your problem ;)

  • yogesh pathak 136 posts 221 karma points
    Jul 29, 2015 @ 12:34
    yogesh pathak
    0

    Hey Anders, you saved my life ,You saved me from stabbing my head into wall , thanks a ton , thank you so much for that :) it worked

    I have another query - i have grid editor which have complex data stored in it for example I have an array of key value pair objects and some of these objects are arrays so can i index this kind of complex data with the help of Your solution?

    If yes then can your provide me some pointers for that ?

    thanks in advance

  • Anders Bjerner 487 posts 2989 karma points MVP 7x admin c-trib
    Jul 29, 2015 @ 13:17
    Anders Bjerner
    0

    Hi again.

    Since this actually is the forum of another package, could you create a new thread here: https://our.umbraco.org/projects/developer-tools/skybrudumbracogriddata/general-discussion/

    Then I'd be happy to look into it ;)

  • yogesh pathak 136 posts 221 karma points
    Jul 30, 2015 @ 04:17
    yogesh pathak
    0

    Yeah sure :)

  • Streety 358 posts 568 karma points
    May 10, 2016 @ 15:22
    Streety
    0

    Hello,

    I am getting an odd problem

    Your code just works fine locally. When I install to IIS I get this in the log file:

        System.Exception: Error indexing queue items,System.MissingMethodException: Method not found: '!!0[] System.Array.Empty()'.
       at NRP.Web.Helper.ExamineIndexer.OnExamineGatheringNodeData(Object sender, IndexingNodeDataEventArgs e)
    

    Like I said works great locally.

    the IIS has .net 4.5 enabled

    Any ideas?

Please Sign in or register to post replies

Write your reply to:

Draft