question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Search][BUG] Wrong dynamic for empty array of string

See original GitHub issue

Having two fields declared as

new Field("tags", DataType.Collection(DataType.String)) {IsRetrievable=true, IsFilterable=true, IsSortable=false, IsFacetable=false, IsSearchable=true, Analyzer= AnalyzerName.EsMicrosoft },
new Field("tagsModelos", DataType.Collection(DataType.String)) {IsRetrievable=true, IsFilterable=true, IsSortable=false, IsFacetable=false, IsSearchable=true, Analyzer= AnalyzerName.EsMicrosoft },

And in Azure correctly created image

The search result returs an array of string when the array has some elements and an empty array of object when the array is empty. image

The bug was found in version 10.1.0 actualizing from 3.x so… I don’t know which is the exact version where the bug was introduced.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
fabiomaulocommented, Apr 4, 2022

Since the SearchDocument has methods such as GetBoolean, GetBooleanCollection, ad so on I have, at least, a way to ask for correct conversion. You can close the issue.

0reactions
fabiomaulocommented, Dec 10, 2021

@Mohit-Chakraborty thanks I’ll try it hopefully soon. We are in the process of converting all our prjs from net472+net22+net31 -> NET6 (obviously the problem are public-webs prjs).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding elements to an empty array throws errors
Another issue is a type mis-match. You declare an array of String, which would be [String] . However, you are attempting to add...
Read more >
How Can I Test a Dynamic Array to See if the Array is Empty?
As we noted, we're going to check the upper bound of the array in question. If the array is empty, the Ubound function...
Read more >
How to check for an empty array in Javascript - YouTube
Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap I was checking for empty Arrays wrong... and in this tutorial, ...
Read more >
empty - Manual
A variable is considered empty if it does not exist or if its value equals false . empty() does not generate a warning...
Read more >
How to populate array elements in string ...
In this case you use an empty array and use the insert(...) perms to add content to the choice element dynamically. Just use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found