This project is read-only.

Synchronization between Result List and Faceted Navigators solved!

Feb 4, 2009 at 9:45 AM
Hi!
I have now been working with the Faceted Search for almost a year. It's a must have for search solutions to have the possibility to drill down with navigators/facets.
The Faceted Search gives this opportunity in a great way. Sadly as a lot of you have seen that has followed the discussions there have been a big issue that the Result List and the Facets have been seriously out of sync. Either the numbers where all wrong or when clicking facets you ended up with no result but still had facets. Sadly this would stop any bigger production from running since this would confuse the users to much.

I now had a new project that really wanted this solution and I knew that the data was really good for building facets on. But still when using it they where really wrong and unsynchronizt. So I thought that I would dig in to this ones and for all to see. So I built my own search application where I did searches and also built navigators from the full search result. In this way I knew that the result where built from the exact same result and not two different as in the case of the faceted search.
I then started to do searches and tweak on parameters and see if I could find exactlly what parameters the Search Core Result List used and then compared this to exactlly how the faceted search performed its queries.

Through this I first found out that the facetd search used KeywordInclusion.AnyKeywords and the Core Result seemed to use KeywordInclusion.AllKeywords. So changing the facted to use KeywordInclusion.AllKeywords instead made the result set alot smaller on the faceted. They still where not equal. So I disabled stemming on the core result and then got the exact same result in result list and facted search. This was a great breakthrough. But offcourse you want stemming. So I started to check the facted code and found out that stemming seems not to be correctlly picked up. So I hardcoded this part to be sure it was applied on the search. When doing this I got 100% syncronized result :-). Of course if you check the result count where it say total results around 512 or so and you still see that you maybe have html 613 this is just beacuse the Search Server approximate the count. If you click next page untill the lastpage you will see that they are 100% equal.

So what did I change codewise:
In file SearchProcessor.cs (line around 166)
in method: private ResultTableCollection ExecuteGenericQuery<T>(int resultsPerPage) where T : Query
I added two lines:
query.Query.Hint = QueryHint.OptimizeWithFullTextIndex | QueryHint.OptimizeWithPropertyStore;
                
//Findwise Start
query.Query.KeywordInclusion = KeywordInclusion.AllKeywords;
query.Query.EnableStemming = true;
//Findwise End

query.Query.RowLimit = resultsPerPage;


I have tested this on a couple of instance and it works perfect. But it would be great if more could test this out.
And of course If I have missed something that should make this work out of the box please tell me as well.

Regards Ludvig


Feb 5, 2009 at 4:08 PM
Thanks, Ludvig. This has been a difficult problem to solve. Appreciate your dedication to this, and for sharing the IP. We'll see if this solves the facet count issue we see in our environment.
Feb 5, 2009 at 5:33 PM
Yes, that was the part of the updates. The KeywordInclusion change was implemented in the last 2.5 build (and 3.0). The Stemming is still synced to the core serach results WP, the linkage was fixed in 2.5 latest though. Again, it is important to sync search Scope as well that was added to the last 2.5 build.
Feb 5, 2009 at 5:56 PM
Hmm, I have the latest svn update but here its hardcoded to
query.Query.KeywordInclusion = KeywordInclusion.AnyKeyword; // or as set in WebPart properties
or was that what you meant?

Have seen the syncronization but It seems like it dosen' work that good. Because It was a clear different when hardcoding it and having it only set in the core result. Dont know why.



Feb 5, 2009 at 9:46 PM
It's part of 2.5.120608.0 release. Plus few other changes, including the SiteContext. Can you verify that you're running that release. Note: the source code published for earlier releases in case you are recompiling it.
Feb 6, 2009 at 12:07 PM
Im running from source code. I have svn version 28538. Is the svn repository in sync with the realeses?
Aug 6, 2009 at 1:32 PM

Hey,

I tried same using downloaded source code. In the downloaded source code, the "keypair.snk" file is missing. Can any one please point where can I find this file and deploy the dll. 

in case, If i excluded the missing file and deploy assembly, it started throwing "Unsafe Control" Exception... that means It is mandatory file.

 

Can any one please point me where can i get this .snk file?

 

Thanks

Tarun

 

 

Aug 6, 2009 at 2:56 PM

 

You have to sign it yourself. And then update all files that have reference to the strong key so that it reflects your new strong key.

Aug 7, 2009 at 10:41 AM

Hello,

Thanks for your reply.

I tried same , give my own keypair.snk and update the dependencies like web.config, Facted Features but getting same exception "Unsafe Control...".. Can you please enlist the files that needs to be modified.

Aug 9, 2009 at 12:51 PM

Check .webpart files and feature.xml.  Also remove existing web parts from WP gallery and delete solution folder from 12 Hive TEMPLATE\FEATURES and re-add all.  Also make sure you have updated GAC assembly.

Let me know if you succeed

Thanks,

 

Shaun O'Callaghan

Aug 10, 2009 at 11:33 AM
Edited Aug 10, 2009 at 11:34 AM

Thanks, It worked... Now Exception is not occuring.. but synchronization between Result List and Faceted Navigators does not occur even after making the suggested changes like:

 

In file SearchProcessor.cs (line around 166)
in method: private ResultTableCollection ExecuteGenericQuery<T>(int resultsPerPage) where T : Query
I added two lines:
query.Query.Hint = QueryHint.OptimizeWithFullTextIndex | QueryHint.OptimizeWithPropertyStore;
                
//Findwise Start
query.Query.KeywordInclusion = KeywordInclusion.AllKeywords;
query.Query.EnableStemming = true;
//Findwise End

query.Query.RowLimit = resultsPerPage;


Any other help/clue/suggestion is appreciated.

Thanks,

Tarun

 


Aug 26, 2009 at 5:35 PM

What Scope is defined for Faceted Search web part?

Nov 2, 2009 at 8:42 AM
The Synchronization doensnt' really work and it confuses users a lot.

How about customise a "Search Core Result" web part to render the result from faceted search? If possible, then we can guarrantee the synchronization.

Anyone have any idea???



Nov 2, 2009 at 3:13 PM

Please send your snapshots and clarification of the issue to xsearch@microsoft.com

Nov 10, 2009 at 12:58 AM
Edited Nov 10, 2009 at 12:59 AM

Leon, What must be the scope defined for the faceted search web part?

I have the latest 2.5 source code.(11/11/2009). Do I need to manually update the scope?