This API should work: https://www.elastic.co/guide/en/elasticsearch/reference/0.90/search-more-like-this.html
However, please, consider to use Episerver Find .NET API instead: http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-Find/9/DotNET-Client-API/Searching/More-LikeRelated/. Even though we try to keep backward compatibility, direct requests to the index might have breaking changes. Using .NET API is more reliable in terms of possible breaking changes in the future updates.
Hi,
Thanks for the response. So we can only use the 0.90 version of the API? The C# API is no good to us as we require client-side access for speed.
Thanks
Gordon
Yes, for now, it is 0.90, but it will change in the future. Regarding the speed considerations, there might be not so much gain from using the client-side access. Have you done any performance tests to compare the difference?
Hi Sergil,
It's more to do with avoiding page postbacks rather than the pure speed of the calls.
Thanks
Gordon
OK, then you might consider to introduce an endpoint on the web server, that recieves request from JavaScript and calls Episerver Find .NET API. In that case you will safeguard your code from potential breaking changes in elasticsearch API.
Hi,
Further to your above comment; are there any updates planned in the next few weeks? We've built a demo and can't risk the interface changing.
I'm suprised that you recommend not using the javascript API, you talk about using it here:
http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-Find/11/searching-with-javascript/Searching-with-Javascript/
Thanks
Gordon
I would also expose my own endpoint on webbserver and use the NET api. Find has too much fine extension methods etc that I would hate to try to mimic and figure out the correct js calls...
When elastic search is upgraded it will also be a world of pain...
Thanks
It might be useful for other developers to point this out on the javascript page to save going down a dead-end.
Cheers
Gordon
Hi,
We're querying the EpiServer index using javascript and the query DSL. What version of the API do you support on the EpiServer endpoint?
Quite a few examples in the, admitedly patchy, documentation don't work with the EpiServer index and I'm struggling to formulate the queries correctly.
For example, I'm trying to do a more like this on document IDs:
With a response like this: