SDKits / ExamineX

Issue tracker for ExamineX
https://examinex.online
5 stars 0 forks source link

ExamineX on Umbraco 10.* #64

Closed hallojoe closed 2 years ago

hallojoe commented 2 years ago

ExamineX 3.0.5 on Umbraco 9.5.2 works great. I would like to run it on Umbraco 10.0.1.

When trying ExamineX on Umbraco 10.0.1 ExamineX will create indexes on the Azure Search Service and then fail when trying to populate them:

[09:53:45 ERR] Index populating failed for populator Umbraco.Cms.Infrastructure.Examine.ContentIndexPopulator
System.MissingMethodException: Method not found: 'System.Collections.Generic.IDictionary`2<System.String,System.Collections.Generic.List`1<System.Object>> Examine.ValueSet.get_Values()'.
   at ExamineX.AzureSearch.ValueSetExtensions.CloneWithLock(IEnumerable`1 values)
   at ExamineX.AzureSearch.Umbraco.UmbracoContentAzureSearchIndex.Examine.IIndex.IndexItems(IEnumerable`1 )
   at Umbraco.Cms.Infrastructure.Examine.ContentIndexPopulator.IndexAllContent(Int32 contentParentId, Int32 pageIndex, Int32 pageSize, IReadOnlyList`1 indexes)
   at Umbraco.Cms.Infrastructure.Examine.ContentIndexPopulator.PopulateIndexes(IReadOnlyList`1 indexes)
   at Umbraco.Cms.Infrastructure.Examine.ExamineIndexRebuilder.RebuildIndexes(Boolean onlyEmptyIndexes, TimeSpan delay, CancellationToken cancellationToken)

[09:53:45 ERR] Index populating failed for populator Umbraco.Cms.Infrastructure.Examine.PublishedContentIndexPopulator
System.MissingMethodException: Method not found: 'System.Collections.Generic.IDictionary`2<System.String,System.Collections.Generic.List`1<System.Object>> Examine.ValueSet.get_Values()'.
   at ExamineX.AzureSearch.ValueSetExtensions.CloneWithLock(IEnumerable`1 values)
   at ExamineX.AzureSearch.Umbraco.UmbracoContentAzureSearchIndex.Examine.IIndex.IndexItems(IEnumerable`1 )
   at Umbraco.Cms.Infrastructure.Examine.ContentIndexPopulator.IndexPublishedContent(Int32 contentParentId, Int32 pageIndex, Int32 pageSize, IReadOnlyList`1 indexes)
   at Umbraco.Cms.Infrastructure.Examine.ContentIndexPopulator.PopulateIndexes(IReadOnlyList`1 indexes)
   at Umbraco.Cms.Infrastructure.Examine.ExamineIndexRebuilder.RebuildIndexes(Boolean onlyEmptyIndexes, TimeSpan delay, CancellationToken cancellationToken) 

Is a release supporting Umbraco 10.* planned?

Shazwazza commented 2 years ago

Hi, an ExamineX version hasn't been shipped yet that supports Umbraco 10. Will work on getting something out asap which will be version 4.0.0

WeAreJigital commented 2 years ago

@Shazwazza Do you have an idea on timescales? Just trying to work out how i can do search with Azure and Umbraco 10 :D

hallojoe commented 2 years ago

@Shazwazza Tried 4.0 and it solves above. Thanks.

Shazwazza commented 2 years ago

@hallojoe great to hear and thanks for testing. I'll get an RTM release out early next week.

WeAreJigital commented 2 years ago

Works for me as well @Shazwazza . I dont suppose you have any idea how we would use this with faceting and block list?

Shazwazza commented 2 years ago

For faceting you would use the AzureSearch APIs directly which are exposed via ExamineX, see https://examinex.online/azure-search-apis and you may need to setup facets at the index level which you can do most likely via the CreatingOrUpdatingIndex event (there's some example code at the bottom of https://examinex.online/customization for configuring custom things like scoring profiles)

WeAreJigital commented 2 years ago

Thanks @Shazwazza that sounds like what i need? Any resources for wireing this up? The docs are quite high level :')

Shazwazza commented 2 years ago

Hi @WeAreJigital sorry I don't have anything on hand. Would be good to put some docs together for this though. I'll add that to the backlog.

WeAreJigital commented 2 years ago

@Shazwazza got it working, i can share what i did if you like :)

Shazwazza commented 2 years ago

@WeAreJigital sounds wonderful!

Shazwazza commented 1 year ago

@WeAreJigital any chance you have time to share how you implemented faceting?

WeAreJigital commented 1 year ago

@Shazwazza sure thing :). In the end it was not totally possible with Azure, we ran into a number of problems. Now we have switched back to Lucene.

I can share the code i had got up to if you like, so you could start from there. I am sure its possible, just very hard :')

Shazwazza commented 1 year ago

@WeAreJigital ok, would love to have some insight to how you went. I'll try to find some time to get it working and make it hopefully easier.

WeAreJigital commented 1 year ago

Sure i will need to get some notes together and i will share them with you. There were various oddites like how you create the index, then i had to change the type of the index field, and set it to the factable searchable (not by default) then x then y. This got it set up to allow the index field to be facetable.

WeAreJigital commented 1 year ago

@Shazwazza i have not forgotten just had no time :(