Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verbatim on empty string renders "match: null" #876

Closed
asafc64 opened this issue Aug 14, 2014 · 3 comments
Closed

Verbatim on empty string renders "match: null" #876

asafc64 opened this issue Aug 14, 2014 · 3 comments

Comments

@asafc64
Copy link

asafc64 commented Aug 14, 2014

I wish to query an empty srting.
When I'm using only "match" the nest omits it.
When I used it with "Verbatim" it worked; until I upgraded the nest (both versions are 1.0.0.0) 2 week ago.
Now it renders "{ match: null }".

What should I do?

@Mpdreamz
Copy link
Member

Hi can you paste the code for the query?

Will make it easier for us to reproduce.

@asafc64
Copy link
Author

asafc64 commented Aug 14, 2014

Something like that:

public void ValidateNoOwner(QueryDescriptor descriptor) where T : class
{
descriptor.Verbatim().Match(m => m.OnField("HouseOwner").Query(string.Empty));
}

And it generates:
{
"match": null
}

(The original code is a bit complex, but it worked perfectly before the update)

@gmarz gmarz closed this as completed in 2aa6a31 Aug 14, 2014
@gmarz
Copy link
Contributor

gmarz commented Aug 14, 2014

@asafc64 I just pushed the above fix. Thanks for reporting this!

@gmarz gmarz added the 1.0.3 label Aug 20, 2014
@gmarz gmarz added v1.1.0 and removed v1.0.3 labels Sep 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants