bielu / bielu.examine.providers

MIT License
1 stars 1 forks source link

DeliveryApiContentIndex error when searching the index in the dashboard #12

Closed mcl-sz closed 3 months ago

mcl-sz commented 7 months ago

Maybe this issue is related to https://github.com/bielu/bielu.examine.providers/issues/11, but just to be sure, I have created a separate issue. When searching the DeliveryApiContentIndex from the Examine Management dashboard, an error message appears. This only occurs with this index, other indexes work without any problems.

Search for "about"

afbeelding

An error occurred

The input string '1121|none' was not in a correct format.

at System.Number.ThrowFormatException[TChar](ReadOnlySpan`1 value)

   at System.Convert.ToInt32(String value, IFormatProvider provider)

   at Bielu.Examine.Elasticsearch.Extensions.SearchResponseExtensions.ConvertToSearchResults(SearchResponse`1 searchResult)

   at Bielu.Examine.Elasticsearch.Services.ElasticsearchService.Search(String examineIndexName, SearchRequestDescriptor`1 searchDescriptor)

   at Bielu.Examine.Elasticsearch.Services.ElasticsearchService.Search(String examineIndexName, QueryOptions options, Query query)

   at Bielu.Examine.Core.Queries.BieluExamineQuery.DoSearch(QueryOptions options)

   at Bielu.Examine.Core.Queries.BieluExamineQuery.Execute(QueryOptions options)

   at Bielu.Examine.Core.Queries.BieluExamineBooleanOperationBase.Execute(QueryOptions options)

   at Umbraco.Cms.Web.BackOffice.Controllers.ExamineManagementController.GetSearchResults(String searcherName, String query, Int32 pageIndex, Int32 pageSize)

   at lambda_method1292(Closure, Object, Object[])

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()

--- End of stack trace from previous location ---

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)

   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()

--- End of stack trace from previous location ---

   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
bielu commented 7 months ago

I think that one is related to what is send as id... I will need have a look into it!

bielu commented 7 months ago

hey @mcl-sz, I dont have this week to look into this as well, but it will just require overriding searching for this specific index and using custom ConvertToSearchResults to ensure that we can convert this node ;) If you have time and will to help feel free, if not I will address it next weekend

mcl-sz commented 6 months ago

Hi @bielu , i see what's going wrong, i will try to make a fix!

mcl-sz commented 6 months ago

The reason for this issue where the multiple id-fields. By removing the "Id"-field the standard "id"-field is used. I created a pr (https://github.com/bielu/bielu.examine.providers/pull/13) for this.

bielu commented 3 months ago

@mcl-sz I guess we can close this ticket now, if not ping me and will reopen it