diff --git a/config/site/src/_includes/filtering_predicate_definitions/comparison.md b/config/site/src/_includes/filtering_predicate_definitions/comparison.md index c45b28d7..0ca7ba62 100644 --- a/config/site/src/_includes/filtering_predicate_definitions/comparison.md +++ b/config/site/src/_includes/filtering_predicate_definitions/comparison.md @@ -1,19 +1,19 @@ [`gt`]({% link query-api/filtering/comparison.md %}) : Matches records where the field value is greater than (>) the provided value. - Will be ignored when `null` is passed. + Will be treated as `true` when `null` is passed. [`gte`]({% link query-api/filtering/comparison.md %}) : Matches records where the field value is greater than or equal to (>=) the provided value. - Will be ignored when `null` is passed. + Will be treated as `true` when `null` is passed. [`lt`]({% link query-api/filtering/comparison.md %}) : Matches records where the field value is less than (<) the provided value. - Will be ignored when `null` is passed. + Will be treated as `true` when `null` is passed. [`lte`]({% link query-api/filtering/comparison.md %}) : Matches records where the field value is less than or equal to (<=) the provided value. - Will be ignored when `null` is passed. + Will be treated as `true` when `null` is passed. diff --git a/config/site/src/_includes/filtering_predicate_definitions/conjunctions.md b/config/site/src/_includes/filtering_predicate_definitions/conjunctions.md index cbf8a051..b097b95f 100644 --- a/config/site/src/_includes/filtering_predicate_definitions/conjunctions.md +++ b/config/site/src/_includes/filtering_predicate_definitions/conjunctions.md @@ -6,11 +6,12 @@ filters that can't be provided on a single filter input because of collisions between key names. For example, if you want to provide multiple `anySatisfy: ...` filters, you could do `allOf: [{anySatisfy: ...}, {anySatisfy: ...}]`. - Will be ignored when `null` or an empty list is passed. + Will be treated as `true` when `null` or an empty object is passed. + When an empty list is passed, will cause this part of the filter to match no documents. [`anyOf`]({% link query-api/filtering/conjunctions.md %}) : Matches records where any of the provided sub-filters evaluate to true. This works just like an `OR` operator in SQL. - Will be ignored when `null` is passed. When an empty list is passed, will - cause this part of the filter to match no documents. + Will be treated as `true` when `null` or an empty object is passed. + When an empty list is passed, will cause this part of the filter to match no documents. diff --git a/config/site/src/_includes/filtering_predicate_definitions/equality.md b/config/site/src/_includes/filtering_predicate_definitions/equality.md index b515f1b5..55143e3e 100644 --- a/config/site/src/_includes/filtering_predicate_definitions/equality.md +++ b/config/site/src/_includes/filtering_predicate_definitions/equality.md @@ -2,6 +2,6 @@ : Matches records where the field value is equal to any of the provided values. This works just like an `IN` operator in SQL. - Will be ignored when `null` is passed. + Will be treated as `true` when `null` is passed. When an empty list is passed, will cause this part of the filter to match no documents. When `null` is passed in the list, will match records where the field value is `null`. diff --git a/config/site/src/_includes/filtering_predicate_definitions/fulltext.md b/config/site/src/_includes/filtering_predicate_definitions/fulltext.md index 13acce90..9cbc5b7c 100644 --- a/config/site/src/_includes/filtering_predicate_definitions/fulltext.md +++ b/config/site/src/_includes/filtering_predicate_definitions/fulltext.md @@ -3,11 +3,11 @@ full text search. This is stricter than `matchesQuery`: all terms must match and be in the same order as the provided phrase. - Will be ignored when `null` is passed. + Will be treated as `true` when `null` is passed. [`matchesQuery`]({% link query-api/filtering/full-text-search.md %}) : Matches records where the field value matches the provided query using full text search. This is more lenient than `matchesPhrase`: the order of terms is ignored, and, by default, only one search term is required to be in the field value. - Will be ignored when `null` is passed. + Will be treated as `true` when `null` is passed. diff --git a/config/site/src/_includes/filtering_predicate_definitions/list.md b/config/site/src/_includes/filtering_predicate_definitions/list.md index 65a8d1fa..80b7c5ba 100644 --- a/config/site/src/_includes/filtering_predicate_definitions/list.md +++ b/config/site/src/_includes/filtering_predicate_definitions/list.md @@ -1,9 +1,9 @@ [`anySatisfy`]({% link query-api/filtering/list.md %}) : Matches records where any of the list elements match the provided sub-filter. - Will be ignored when `null` or an empty object is passed. + Will be treated as `true` when `null` or an empty object is passed. [`count`]({% link query-api/filtering/list.md %}) : Used to filter on the number of non-null elements in this list field. - Will be ignored when `null` or an empty object is passed. + Will be treated as `true` when `null` or an empty object is passed. diff --git a/config/site/src/_includes/filtering_predicate_definitions/near.md b/config/site/src/_includes/filtering_predicate_definitions/near.md index 3e3922a6..4012642a 100644 --- a/config/site/src/_includes/filtering_predicate_definitions/near.md +++ b/config/site/src/_includes/filtering_predicate_definitions/near.md @@ -2,4 +2,4 @@ : Matches records where the field's geographic location is within a specified distance from the location identified by `latitude` and `longitude`. - Will be ignored when `null` or an empty object is passed. + Will be treated as `true` when `null` or an empty object is passed. diff --git a/config/site/src/_includes/filtering_predicate_definitions/not.md b/config/site/src/_includes/filtering_predicate_definitions/not.md index 9d674527..71c6eb82 100644 --- a/config/site/src/_includes/filtering_predicate_definitions/not.md +++ b/config/site/src/_includes/filtering_predicate_definitions/not.md @@ -2,4 +2,4 @@ : Matches records where the provided sub-filter evaluates to false. This works just like a `NOT` operator in SQL. - Will be ignored when `null` or an empty object is passed. + Will be treated as `false` when `null` or an empty object is passed. diff --git a/config/site/src/_includes/filtering_predicate_definitions/time_of_day.md b/config/site/src/_includes/filtering_predicate_definitions/time_of_day.md index 33ab4cf2..7e967226 100644 --- a/config/site/src/_includes/filtering_predicate_definitions/time_of_day.md +++ b/config/site/src/_includes/filtering_predicate_definitions/time_of_day.md @@ -1,4 +1,4 @@ [`timeOfDay`]({% link query-api/filtering/date-time.md %}) : Matches records based on the time-of-day of the DateTime values. - Will be ignored when `null` of an empty object is passed. + Will be treated as `true` when `null` or an empty object is passed. diff --git a/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/factory.rb b/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/factory.rb index fa299edb..659d7702 100644 --- a/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/factory.rb +++ b/elasticgraph-schema_definition/lib/elastic_graph/schema_definition/factory.rb @@ -141,7 +141,7 @@ def new_filter_input_type(source_type, name_prefix: source_type, category: :filt t.documentation <<~EOS Input type used to specify filters on `#{source_type}` fields. - Will be ignored if passed as an empty object (or as `null`). + Will be treated as `true` if passed as an empty object (or as `null`). EOS t.field @state.schema_elements.any_of, "[#{t.name}!]" do |f| @@ -149,8 +149,8 @@ def new_filter_input_type(source_type, name_prefix: source_type, category: :filt Matches records where any of the provided sub-filters evaluate to true. This works just like an OR operator in SQL. - Will be ignored when `null` is passed. When an empty list is passed, will cause this - part of the filter to match no documents. + Will be treated as `true` when `null` or an empty object is passed. + When an empty list is passed, will cause this part of the filter to match no documents. EOS end @@ -159,7 +159,7 @@ def new_filter_input_type(source_type, name_prefix: source_type, category: :filt Matches records where the provided sub-filter evaluates to false. This works just like a NOT operator in SQL. - Will be ignored when `null` or an empty object is passed. + Will be treated as `false` when `null` or an empty object is passed. EOS end @@ -303,7 +303,7 @@ def new_list_filter_input_type(source_type, name_prefix:, any_satisfy_type_categ f.documentation <<~EOS Matches records where any of the list elements match the provided sub-filter. - Will be ignored when `null` or an empty object is passed. + Will be treated as `true` when `null` or an empty object is passed. EOS end @@ -315,7 +315,8 @@ def new_list_filter_input_type(source_type, name_prefix:, any_satisfy_type_categ be provided on a single `#{t.name}` input because of collisions between key names. For example, if you want to provide multiple `#{any_satisfy}: ...` filters, you could do `#{all_of}: [{#{any_satisfy}: ...}, {#{any_satisfy}: ...}]`. - Will be ignored when `null` or an empty list is passed. + Will be treated as `true` when `null` or an empty object is passed. + When an empty list is passed, will cause this part of the filter to match no documents. EOS end @@ -330,7 +331,7 @@ def new_list_element_filter_input_type(source_type, name_prefix:) t.documentation <<~EOS Input type used to specify filters on elements of a `[#{source_type}]` field. - Will be ignored if passed as an empty object (or as `null`). + Will be treated as `true` if passed as an empty object (or as `null`). EOS # While we support `not: {any_satisfy: ...}` we do not support `any_satisfy: {not ...}` at this time. @@ -374,7 +375,7 @@ def new_fields_list_filter_input_type(source_type_name, name_prefix:) or transitively from a list field that has been configured to index each leaf field as its own flattened list of values. - Will be ignored if passed as an empty object (or as `null`). + Will be treated as `true` if passed as an empty object (or as `null`). EOS source_type.graphql_fields_by_name.each do |field_name, field| @@ -424,7 +425,7 @@ def define_list_counts_filter_field_on(type) f.documentation <<~EOS Used to filter on the number of non-null elements in this list field. - Will be ignored when `null` or an empty object is passed. + Will be treated as `true` when `null` or an empty object is passed. EOS end end