The Composer/Component way works really well for packages, because you can register it without having to have the end user change their Startup.cs file to call your methods. But in my own project, I'd just add calls to Startup.cs.
That said, I updated the Our.Umbraco.GraphQL package last week, and while it doesn't do custom indexes, it does query Examine. I didn't find I needed to change much of anything except perhaps some namespace references. I did have to update the maxResults parameter to instead pass in the ExamineOptions class with skip/take, as Stuart mentions at https://our.umbraco.com/forum/umbraco-9/106215-examine-skiptake, but otherwise the same v8 code seemed to work fine in v9.
Umbraco 9 - How to get up and running with Examine
Hi All,
Is Examine up and running yet for Umbraco 9? If so does anyone have any example code so I can try and get up and running and test it.
I am looking for the equivalent of how we used to do it for Umbraco 8.
So something similar to the below. Adding a custom field into the search index etc.
Maybe also some code of actually doing a search if this has changed much?
Kind Regards
David
Hi David,
I have got it up-and-running using an Component as you have there. Not sure if that's the ideal .Net Core way, but it's working for me.
Stuart.
The Composer/Component way works really well for packages, because you can register it without having to have the end user change their Startup.cs file to call your methods. But in my own project, I'd just add calls to Startup.cs.
That said, I updated the Our.Umbraco.GraphQL package last week, and while it doesn't do custom indexes, it does query Examine. I didn't find I needed to change much of anything except perhaps some namespace references. I did have to update the maxResults parameter to instead pass in the ExamineOptions class with skip/take, as Stuart mentions at https://our.umbraco.com/forum/umbraco-9/106215-examine-skiptake, but otherwise the same v8 code seemed to work fine in v9.
Thanks Benjamin.
I am taking a look at this again now.
Hi,
I have also followed up by writing two blog articles which might help people trying to get up and running with Examine on Umbraco 9.
Umbraco 9 Examine - Basic Search https://www.umbrajobs.com/blog/posts/2021/june/umbraco-9-examine-basic-search/
Umbraco 9 Examine - Creating a Custom Index https://www.umbrajobs.com/blog/posts/2021/june/umbraco-9-examine-creating-a-custom-index/
Regards
David
is working on a reply...