Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

CentralEventDispatcher_Action ActionName.GetWordVa - SearchUnit - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
jkagerer
#1 Posted : Friday, November 21, 2014 9:17:03 PM
Rank: Member

Groups: Registered

Joined: 9/4/2014
Posts: 20
I have a CentralEventDispatcher_Action method that is getting called but the event.ActionData.Name never seems to be GetWordVariations.

This was working a couple of months ago, but many things have changed in the site.

I know this is very vague, but is there somewhere in the Configuration that needs to be changed so that this Action is called.

I had some issues with DLLs in our team project and had to rebuild the Plugin.dll. I'm just not sure where to look.

Thank You,
Joe
Joe
Jim
#2 Posted : Saturday, November 22, 2014 12:26:32 AM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,669
Location: Canada
Hi Joe, yes it's only called during search operations if Configuration.LemmaSearchEnabled is true.

Hopefully thats the problem.

Jim

-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


jkagerer
#3 Posted : Monday, November 24, 2014 4:24:51 PM
Rank: Member

Groups: Registered

Joined: 9/4/2014
Posts: 20
quote:

void CentralEventDispatcher_Action(object sender, Keyoti.SearchEngine.Events.ActionEventArgs e)
{
if (e.ActionData.Name == Keyoti.SearchEngine.Events.ActionName.GetWordVariations)
{
variations.Insert...
}
}



This condition of ActionData.Name never equates to GetWordVariations. I'm unclear on what controls the Event Dispatcher and why on some searches it gets hit 3 times, and on others not at all. I know this code was working at one time, but we've had some changes in our DLL's and references. I'm Including the Plugin.dll, but I believe that is only required for the Custom Meta Data. If you could point me in the right direction, I would appreciate any help. Thank You.

Joe
Joe
Jim
#4 Posted : Monday, November 24, 2014 4:39:34 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,669
Location: Canada
Have you checked if LemmaSearchEnabled is true in the configuration?

-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


jkagerer
#5 Posted : Monday, November 24, 2014 4:43:40 PM
Rank: Member

Groups: Registered

Joined: 9/4/2014
Posts: 20
<LemmaLanguage>English</LemmaLanguage>
<LemmaSearchEnabled>True</LemmaSearchEnabled>
<LemmaWeightFactor>0.5</LemmaWeightFactor>

Yes.

Joe
Joe
jkagerer
#6 Posted : Monday, November 24, 2014 4:46:59 PM
Rank: Member

Groups: Registered

Joined: 9/4/2014
Posts: 20
I only have the Keyoti4.SearchEngine.Core.dll and Keyoti4.SearchEngine.Web.dll referenced. They are version 2012.5.13.424 Do I need another dll?

Joe
Joe
jkagerer
#7 Posted : Monday, November 24, 2014 4:51:24 PM
Rank: Member

Groups: Registered

Joined: 9/4/2014
Posts: 20
My Index Management Tool says
Version: 2012.4.14.423 do my Application DLLs have to match that?
Joe
Jim
#8 Posted : Monday, November 24, 2014 6:38:35 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,669
Location: Canada
Would you mind if we go over some points please. Firstly,

"I'm unclear on what controls the Event Dispatcher and why on some searches it gets hit 3 times"

To me that means the DLLs are fine. It's loading everything and running.

Are you saying that other search events are called during a search, but other times not? For which queries is it not called?

"I'm Including the Plugin.dll, but I believe that is only required for the Custom Meta Data."

The plugin can be used for things other than the custom meta data.

Actually did you know that you can access GetWordVariations without a plugin too?
http://keyoti.com/produc...ming%20And%20Lemmas.htm

Lastly, can you enable Logging in configuration, try some searches and then email all .txt files (from your index dir) to me via support at keyoti.com?

Thanks
Jim


-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


jkagerer
#9 Posted : Monday, November 24, 2014 7:47:08 PM
Rank: Member

Groups: Registered

Joined: 9/4/2014
Posts: 20
Hi Jim,

I have emailed you all of my log files. My Central Event Dispatcher Action gets hit with three different ActionData.Name instances:
QueryExpressionGroupCreated
GetIndexableSourceRecords
ResultItemsFinalized

If the query returns a result, All three events happen. When the query does not return a result only the QueryExpressionGroupCreated Event is raised.

Something is stopping the GetWordVariations Event from being raised.

Thank you.

Joe
Joe
Jim
#10 Posted : Monday, November 24, 2014 8:40:43 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,669
Location: Canada
Thanks, I'm going to have to delve in to the code to see if there's some other way that the GetWordVariations event wouldn't be fired, but can I quickly ask; do you have anywhere in your code where you set configuration.LemmaSearchEnabled=false?

-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


jkagerer
#11 Posted : Monday, November 24, 2014 9:01:05 PM
Rank: Member

Groups: Registered

Joined: 9/4/2014
Posts: 20
Thank You Jim,

I'm not setting configuration.LemmaSearchEnabled anywhere in my code. I specifically searched for it.

Joe
Joe
Jim
#12 Posted : Tuesday, November 25, 2014 2:44:13 AM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,669
Location: Canada
Joe, I tried it out for myself and it worked - just for a sanity check.

I'm happy to pick this apart with you, but it might take a while since I'm mostly in the dark about your project. The quickest way to resolve it would be if you could reproduce the problem in a fresh project that you could send me, my feeling is that in trying to recreate it you would discover what has gone wrong.


Otherwise, here's are my thoughts/questions;

-Are you using the SearchResult control, or are you using the SearchAgent class directly?

-If you search for a word like "table" does it find matches for "tables", this would be evidence that the standard stemming is working. If it is then it means the problem is just something about the plug-in.

-The problem could somehow be about referenced versions, it's a good idea to double check that the plugin.dll truly references the same version of our DLLs that are in your search project's bin (or are in your GAC). One way to be sure is to open plugin.dll in ildasm and read the version at the bottom. Using ildasm also allows you to check the versions of references that it was compiled against. Eg. open plug.dll in ildasm -> double click 'manifest' -> scroll down looking for

Code:

.assembly extern Keyoti4.SearchEngine.Core
{
  .publickeytoken = (58 D9 FD 2E 9E C4 DC 0E )                         // X.......
  .ver <b>20XX:XX:XXX:XXX</b>
}


Does the code DLL version referenced match what is in the bin?

-Is it possible that you've only seen the Action event handler called during indexing operations? Which would be run from a different tool.

-I notice that CentralEventDispatcher.txt log file wasn't written after you archived the logs (2:30 today, your time, PST?) - your search application is definitely using the correct index directory? I ask because you have searches going on at 2:34, but no logs for CentralEventDispatcher.txt (which is what manages the plugin).

Jim

-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


jkagerer
#13 Posted : Tuesday, November 25, 2014 1:44:52 PM
Rank: Member

Groups: Registered

Joined: 9/4/2014
Posts: 20
Thanks Jim, I'm sure it has to do with dll versions. We had issues with all our dlls and that's when this started.
Joe
jkagerer
#14 Posted : Thursday, December 4, 2014 3:01:31 PM
Rank: Member

Groups: Registered

Joined: 9/4/2014
Posts: 20
Hi Jim,
I'm Getting Closer, I've found the conflict. I added the CentralEventDispatcher_Action code to your SearchMVCExample project and it worked perfectly. Going back to my main project, I discovered that we have added the "ChangeWordElementsToWildcard" Code to our SearchAgent by extending the SearchAgent class. I'm not sure where your example code for this is on your site, but I'm sure I got the code from you. We add an "*" to each Keyoti.SearchEngine.Search.WordElement.

Since adding this code, the GetWordVariations Action is no longer called. If I comment out the ChangeWordElementsToWildcard code, the Lemmings work fine.

I've tried adding the Event Handler CentralEventDispatcher_Action before creating SearchAgent and after creating the SearchAgent, this doesn't seem to have any effect.

Is it possible to get the Wildcard code and the WordVariation code to work together? This is where our conflict is.

Thank You.
Joe
Joe
Jim
#15 Posted : Thursday, December 4, 2014 3:48:42 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,669
Location: Canada
Ah, yes that would be the problem Joe. The lemma generator isn't used with wildcards because usually wildcards are parts of words, so the ideas conflict a bit.

You're using this article http://keyoti.com/kb/Def...ew&questId=224&catId=54

In it there is this code

Code:

public override Keyoti.SearchEngine.Search.GroupElement CreateWholeExpressionGroup(string queryString)

    {

        Keyoti.SearchEngine.Search.GroupElement group = base.CreateWholeExpressionGroup(queryString);

        ChangeWordElementsToWildcard(group.ChildElements);

        return group;

    }


which takes the expression group and modifies it to be WildcardElements instead of WordElements.

What you could try is this (which I haven't tried, but think is correct), is change this line;

Code:

elements[i] = new Keyoti.SearchEngine.Search.WildcardWordElement((element.Content + "*"), Configuration);


to

Code:

elements[i] = new Keyoti.SearchEngine.Search.GroupElement(Configuration);
var elG = elements[i] as Keyoti.SearchEngine.Search.GroupElement;
elG.GroupOperator = LogicOperator.Or;
elG.Add(element);
elG.Add(new Keyoti.SearchEngine.Search.WildcardWordElement((element.Content + "*"), Configuration));


The idea being to make each WordElement in to a GroupElement (OR'd) containing the Word (which can be stemmed) and the Wildcard.

eg.

hello world

becomes

(hello OR hello*) (world OR world*)

it will be slower of course.

Best
Jim

-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


jkagerer
#16 Posted : Thursday, December 4, 2014 4:26:22 PM
Rank: Member

Groups: Registered

Joined: 9/4/2014
Posts: 20
Hi Jim,

That worked! One slight issue with your code example. You had elG.Add, it needs to be elG.ChildElements.Add

quote:

elements[i] = new Keyoti.SearchEngine.Search.GroupElement(Configuration);
var elG = elements[i] as Keyoti.SearchEngine.Search.GroupElement;
elG.GroupOperator = LogicOperator.Or;
elG.ChildElements.Add(element);
elG.ChildElements.Add(new Keyoti.SearchEngine.Search.WildcardWordElement((element.Content + "*"), Configuration));




I'm glad we finally resolved this issue. Thank you very much.
Joe
Joe
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.




About | Contact | Site Map | Privacy Policy

Copyright © 2002- Keyoti Inc.