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
Null-value fields in custom_score queries causes 'No field' errors #679
Comments
Oh - and thanks for an awesome product! :-) |
Heya, This happens because that field has not been introduced yet (it has a null value). Once it is introduced (with a single value, into the cluster), then it will work fine. You can also define |
Yes, I understand that. Wouldn't it be better for the script value to return null or at least to have some kind of function to check for it's existence, instead of raising an exception and causing no results to be returned? Eg:
|
This should work:
Or maybe even this:
Even so, with enough data set, where at least one doc has a value for |
Fatal error: Uncaught [NoFieldFound]No field found: Contact._PloiciesLastApplicationDate0 Attempted: 1 time(s). thrown I am getting the following error while updating the contact. for example:- $checkExist = Infusionsoft_DataService::query(new Infusionsoft_Contact(), array('Phone1' => '(618)-795-0304')); I am fetching the contact and updating the contact based on the phone number, But it give this error? Thanks! |
…est elastic#679) dev/fabien/MPC-4785: tf eks 1.18 and bottlerocket (pass elastic#2) * first pass for eks module upgrade + bottlerocket * remove comment & now unnecessary deps * comments * block ec2 metadata service for pods * security group rules for ingress/calico/wireguard, provider updates, terraform.sh update for new eks module * add parameters to facilitate in-place upgrade, make sg consistent * MPC-5071: terraform.sh gates and -r option * open sg for cluster<->node and node<->node Approved-by: Gabi Davar
Add CCS dashboard to public benchmarks
When adding running logstash in debug mode we are dumping the response body into the log, but the code wasn't calling the right method on the error object throwing a method not found error. Fixes elastic#679
There seems to be a gotcha when using custom_score queries and trying to score based on fields that can contain null values.
Given I have:
When I query using a custom_score and a script like:
I get the following error:
If I add another user:
Everything works fine.
I think the default behavior should be for null-value fields to return null - and not raise an error.
The examples above might seem lame, but imagine filling the indices with data from a database, where no guarantees can be made that a column won't contain anything other than null-values. You can get around this by typecasting your fields to strings by using mapping, but I definitely suggest that ElasticSearch is able to handle the script value more intelligently.
The text was updated successfully, but these errors were encountered: