StackExchange / NRediSearch

Other
31 stars 9 forks source link

[suggestion] better usability of JSON index #20

Open bnayae opened 2 years ago

bnayae commented 2 years ago

I was struggling with search query over JSON module while I wanted to have a filter over specific property. After long time of straggling I figure out that the problem was that the $.myFiledName in the schema need AS myFieldName alias in order to operate well.

I also figure out that it is possible to set it right .AddTextField(FieldName.Of("$.desc").As("description")) but it might not what people expect. Most people might expect .AddTextField("$.desc").

Therefore I decided to offer contribution of addressing this issue, in order to save this straggling from other.

The PR is having Unit Test.

I hope you'll find it right for this repo.

See #19 PR