OrchardCore icon indicating copy to clipboard operation
OrchardCore copied to clipboard

Sometimes ES index field will be {[ContentltemVersionld, null]}, should skip it.

Open engine5d opened this issue 9 months ago • 2 comments

OC Version 2.1.6

Class : ElasticQuerySource line: 86 to 90

foreach (var document in docs.TopDocs) { results.Add(new JsonObject(document.Select(x => KeyValuePair.Create(x.Key, (JsonNode)JsonValue.Create(x.Value.ToString()))))); }

The x.Value sometimes is null, so throw exception. could change code like following foreach (var document in docs.TopDocs) { results.Add(new JsonObject(document.Select(x => KeyValuePair.Create(x.Key, (JsonNode)JsonValue.Create("" + x.Value))))); }

engine5d avatar Apr 01 '25 17:04 engine5d

Do you want to create a PR? Probably this is the fix: x.Value?.ToString()

MikeAlhayek avatar Apr 02 '25 15:04 MikeAlhayek

We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).

This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.

github-actions[bot] avatar Apr 03 '25 17:04 github-actions[bot]