Skip to content

Commit

Permalink
Merge pull request #103 from pelias/fix-deprecation-warnings
Browse files Browse the repository at this point in the history
Replace deprecated `minimum_number_should_match` field
  • Loading branch information
orangejulius authored Jul 8, 2019
2 parents b3faa4e + 067b8e9 commit 8fcb336
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions layout/AddressesUsingIdsQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class AddressesUsingIdsQuery extends Query {
function_score: {
query: {
bool: {
minimum_number_should_match: 1,
minimum_should_match: 1,
should: [
createStreetShould(vs)
]
Expand Down Expand Up @@ -216,10 +216,10 @@ class AddressesUsingIdsQuery extends Query {
return acc;
}, []);

// add filter.bool.minimum_number_should_match and filter.bool.should,
// add filter.bool.minimum_should_match and filter.bool.should,
// creating intermediate objects as it goes
_.set(base.query.function_score.query.bool, 'filter.bool', {
minimum_number_should_match: 1,
minimum_should_match: 1,
should: id_filters
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"function_score": {
"query": {
"bool": {
"minimum_number_should_match": 1,
"minimum_should_match": 1,
"should": [
{
"bool": {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/addressesUsingIdsQuery/no_housenumber.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"function_score": {
"query": {
"bool": {
"minimum_number_should_match": 1,
"minimum_should_match": 1,
"should": [
{
"bool": {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/addressesUsingIdsQuery/no_layers.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"function_score": {
"query": {
"bool": {
"minimum_number_should_match": 1,
"minimum_should_match": 1,
"should": [
{
"bool": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"function_score": {
"query": {
"bool": {
"minimum_number_should_match": 1,
"minimum_should_match": 1,
"should": [
{
"bool": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"function_score": {
"query": {
"bool": {
"minimum_number_should_match": 1,
"minimum_should_match": 1,
"should": [
{
"bool": {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/addressesUsingIdsQuery/with_filters.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"function_score": {
"query": {
"bool": {
"minimum_number_should_match": 1,
"minimum_should_match": 1,
"should": [
{
"bool": {
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/addressesUsingIdsQuery/with_layers.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"function_score": {
"query": {
"bool": {
"minimum_number_should_match": 1,
"minimum_should_match": 1,
"should": [
{
"bool": {
Expand Down Expand Up @@ -60,7 +60,7 @@
],
"filter": {
"bool": {
"minimum_number_should_match": 1,
"minimum_should_match": 1,
"should": [
{
"terms": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"function_score": {
"query": {
"bool": {
"minimum_number_should_match": 1,
"minimum_should_match": 1,
"should": [
{
"bool": {
Expand Down Expand Up @@ -60,7 +60,7 @@
],
"filter": {
"bool": {
"minimum_number_should_match": 1,
"minimum_should_match": 1,
"should": [
{
"terms": {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/addressesUsingIdsQuery/with_scores.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"function_score": {
"query": {
"bool": {
"minimum_number_should_match": 1,
"minimum_should_match": 1,
"should": [
{
"bool": {
Expand Down

0 comments on commit 8fcb336

Please sign in to comment.