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

ES6 use strict type on boolean (true|false) #1347

Merged
merged 1 commit into from
Aug 14, 2017

Conversation

p365labs
Copy link
Collaborator

Updated failing tests failing on boolean type or on legacy values

  • Removed the use of values different from TRUE or FALSE as strict boolean type implemented in ES6.

  • Removed 'analyzed' and not analyzed as index mapping now accepts only TRUE|FALSE

  • Updated the use of store mapping with BOOLEAN

### Backward Compatibility Breaks
- Numeric to and from parameters in [date_range aggregation](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/breaking_60_aggregations_changes.html#_numeric_literal_to_literal_and_literal_from_literal_parameters_in_literal_date_range_literal_aggregation_are_interpreted_according_to_literal_format_literal_now) are interpreted according to format of the target field

- Numeric to and from parameters in [date_range aggregation](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/breaking_60_aggregations_changes.html#_numeric_literal_to_literal_and_literal_from_literal_parameters_in_literal_date_range_literal_aggregation_are_interpreted_according_to_literal_format_literal_now) are interpreted according to format of the target field
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also link to the PR number. I'm aware this is normally tricky before opening the PR because it is not known yet :-)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I'll update it in the next PR

@@ -16,15 +16,15 @@ class BoostingTest extends BaseTest
['name' => 'Vital Match', 'price' => 2.1],
['name' => 'Mercury Vital', 'price' => 7.5],
['name' => 'Fist Mercury', 'price' => 3.8],
['name' => 'Lama Vital 2nd', 'price' => 3.2],
['name' => 'Lama Vital 2nd', 'price' => 1.2],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this change?

Copy link
Collaborator Author

@p365labs p365labs Aug 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was testing also the BoostingTest.php, and I forget to remove it during the creation of the PR. in the next PR I will update it.

@@ -28,8 +26,8 @@ public function testSearch()

$type = new Type($index, 'helloworldmlt');
$mapping = new Mapping($type, [
'email' => ['store' => 'true', 'type' => 'text', 'index' => 'analyzed'],
'content' => ['store' => 'true', 'type' => 'text', 'index' => 'analyzed'],
'email' => ['store' => 'true', 'type' => 'text', 'index' => 'true'],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably now use true instead of 'true' here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dunno why :) revert in next PR, sorry.

@ruflin ruflin merged commit 00be0b8 into ruflin:master Aug 14, 2017
@ruflin
Copy link
Owner

ruflin commented Aug 14, 2017

Decided to already merge this as all of the comments we can fix in follow up comments.

@p365labs p365labs deleted the es6_boolean_strict_type branch August 15, 2017 03:43
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

Successfully merging this pull request may close these issues.

2 participants