Try our conversational search powered by Generative AI!

Sergii Vorushylo
Nov 13, 2015
  6252
(6 votes)

Find optimizations export-import

Recently I got a question if there is a way to transfer EPiServer Find optimizations from one index to another. By optimizations here I mean synonyms, related queries, autocomplete entries and best bets. There was no utility for this, so my suggestion was to use the same REST API that we use in EPiServer Find UI. Using this REST API without documentation and ability to look under the hood might be quite challenging, so I decided to write a tool for this myself.

The tool is an EPiServer Admin mode plugin that allows exporting and importing EPiServer Find optimizations entities between indexes or sites. It is packed as a NuGet package and uses JSON format for export. It is available at nuget.episerver.com, so you can install it by running Install-Package Vro.FindExportImport in Visual Studio package manager console. Once installed the plugin can be found in Admin mode under the Tools section.

Exporting and importing Find optimizations has two synchronization problems: how to match sites (each optimization belong to an individual site or "All sites") and how to match the content selected in Best bets.

When it comes to sites, it is relatively easy: optimizations can be exported only within a single site.
Image ExportView.png

When importing, users select a target site and all optimizations just get new site value during import. 

Image ImportView.png
Please note, the value “All sites” in EPiServer Find does not mean all available sites, but rather a unique value indicating that an optimization has an effect on all sites. Therefore, when exporting with “All sites” selected, it just means only optimizations with “All sites” value are exported and not optimizations from all sites. The same is for import: all imported entities assigned to the selected site or the special “All sites” value. The plugin also can be used to copy optimizations from one site to another within the same index.

For the content references in best bets, I have not found a better solution than just trying to find a matching content by name on the target site. For best bets with pages, importer searches within pages, and for best bets with commerce products, importer searches only within commerce catalog items. If there is no content with a matching name, the best bet is skipped from importing.

When importing optimizations, the same validation rules apply as if optimization is created manually in EPiServer Find UI. If there is already an optimization with the same properties like the one being imported, no new optimization is created, and no existing optimizations get updated.

Plugins source code is available at GitHub

Nov 13, 2015

Comments

Henrik Fransas
Henrik Fransas Nov 14, 2015 05:26 AM

Great addOn, thanks!

K Khan
K Khan Nov 14, 2015 10:35 PM

Cool!

Mari Jørgensen
Mari Jørgensen Nov 16, 2015 09:34 AM

Nice!

Per Magne Skuseth
Per Magne Skuseth Nov 16, 2015 11:38 AM

Great work!

Praful Jangid
Praful Jangid Jun 17, 2019 07:49 AM

Hi Sergii Vorushylo,

First of all, great work and thanks for this add-on.

I am curious to know that, does this creates a log for the content that is not found a match while importing? Or any kind of related information is logged?

Thanks & Regards,

Praful Jangid

Sanjay Kumar
Sanjay Kumar Jul 30, 2020 06:20 AM

Hey Guys, 

I logged an error regarding installing this package:

https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2020/7/after-installing-vro-findexportimport--package-getting-assembly-reference-error/ can

Can anyone help to resolve it?

Thanks

Please login to comment.
Latest blogs
Solving the mystery of high memory usage

Sometimes, my work is easy, the problem could be resolved with one look (when I’m lucky enough to look at where it needs to be looked, just like th...

Quan Mai | Apr 22, 2024 | Syndicated blog

Search & Navigation reporting improvements

From version 16.1.0 there are some updates on the statistics pages: Add pagination to search phrase list Allows choosing a custom date range to get...

Phong | Apr 22, 2024

Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog