martin-magakian / Amazing-Cloud-Search

Allow you to search, faceted search, add, update, remove objects from your Amazon Cloud Search Index in C#.
30 stars 17 forks source link

Can't Access hits Using VB.NET/Case-Insensitive Languages #14

Open JDBarndt opened 10 years ago

JDBarndt commented 10 years ago

When getting a SearchResult from a search, properties such as facetResults are available but hits are not. VB.NET sees "Hits hits" and "public class Hits" and can't distinguish between the two as VB.NET is case-insensitive. A solution would be to make "hits" and "Hits" two different names.

martin-magakian commented 10 years ago

Hi, Thank's for this feedback.

The way to go is to change the class "SearchResult.cs". You will have to use the "JsonProperty" annotation. Here is an exemple on the getter/setter "hit"

[JsonProperty("hit")] public Hits Hits { get; set; }

In the same time you should add this "JsonProperty" on all the other getter/setter of the "SearchResult.cs" class.

Regards