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

update with accurate numeric type for common, core #612

Merged

Conversation

amberzsy
Copy link
Contributor

Description

improve accuracy of numeric type for document, search api.

Issues Resolved

#596

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: amberzsy <xxamber998@gmail.com>
Signed-off-by: amberzsy <xxamber998@gmail.com>
Copy link
Contributor

github-actions bot commented Oct 13, 2024

Changes Analysis

Commit SHA: f02d356
Comparing To SHA: 5dc65a5

API Changes

Summary

├─┬Paths
│ ├─┬/_search
│ │ ├─┬GET
│ │ │ └──Parameters
│ │ └─┬POST
│ │   └──Parameters
│ └─┬/{index}/_search
│   ├─┬GET
│   │ └──Parameters
│   └─┬POST
│     └──Parameters
└─┬Components
  ├─┬asynchronous_search._common:Search
  │ └─┬terminate_after
  │   ├──[🔀] type (43238:17)❌ 
  │   └──[➕] format (43239:19)❌ 
  ├─┬_common:MinimumShouldMatch
  │ ├─┬ONEOF
  │ │ └──[🔀] type (30882:17)❌ 
  │ └─┬ONEOF
  │   ├──[🔀] type (30880:17)❌ 
  │   └──[➕] format (30881:19)❌ 
  ├─┬_core.search:RescoreQuery
  │ ├─┬rescore_query_weight
  │ │ └──[➕] format (42788:19)❌ 
  │ └─┬query_weight
  │   └──[➕] format (42784:19)❌ 
  ├─┬_common:Fuzziness
  │ ├─┬ONEOF
  │ │ └──[🔀] type (30446:17)❌ 
  │ └─┬ONEOF
  │   ├──[🔀] type (30447:17)❌ 
  │   └──[➕] format (30448:19)❌ 
  ├─┬_core.search:AggregationProfileDebug
  │ ├─┬segments_with_deleted_docs
  │ │ ├──[🔀] type (42155:17)❌ 
  │ │ └──[➕] format (42156:19)❌ 
  │ ├─┬total_buckets
  │ │ ├──[🔀] type (42098:17)❌ 
  │ │ └──[➕] format (42099:19)❌ 
  │ ├─┬segments_with_single_valued_ords
  │ │ ├──[🔀] type (42095:17)❌ 
  │ │ └──[➕] format (42096:19)❌ 
  │ ├─┬built_buckets
  │ │ ├──[🔀] type (42101:17)❌ 
  │ │ └──[➕] format (42102:19)❌ 
  │ ├─┬segments_with_multi_valued_ords
  │ │ ├──[🔀] type (42090:17)❌ 
  │ │ └──[➕] format (42091:19)❌ 
  │ ├─┬segments_counted
  │ │ ├──[🔀] type (42162:17)❌ 
  │ │ └──[➕] format (42163:19)❌ 
  │ ├─┬empty_collectors_used
  │ │ ├──[🔀] type (42145:17)❌ 
  │ │ └──[➕] format (42146:19)❌ 
  │ ├─┬values_fetched
  │ │ ├──[🔀] type (42121:17)❌ 
  │ │ └──[➕] format (42122:19)❌ 
  │ ├─┬string_hashing_collectors_used
  │ │ ├──[🔀] type (42139:17)❌ 
  │ │ └──[➕] format (42140:19)❌ 
  │ ├─┬ordinals_collectors_overhead_too_high
  │ │ ├──[🔀] type (42136:17)❌ 
  │ │ └──[➕] format (42137:19)❌ 
  │ ├─┬segments_collected
  │ │ ├──[🔀] type (42165:17)❌ 
  │ │ └──[➕] format (42166:19)❌ 
  │ ├─┬segments_with_doc_count_field
  │ │ ├──[🔀] type (42152:17)❌ 
  │ │ └──[➕] format (42153:19)❌ 
  │ ├─┬numeric_collectors_used
  │ │ ├──[🔀] type (42142:17)❌ 
  │ │ └──[➕] format (42143:19)❌ 
  │ ├─┬collect_analyzed_count
  │ │ ├──[🔀] type (42127:17)❌ 
  │ │ └──[➕] format (42128:19)❌ 
  │ ├─┬chars_fetched
  │ │ ├──[🔀] type (42112:17)❌ 
  │ │ └──[➕] format (42113:19)❌ 
  │ ├─┬ordinals_collectors_used
  │ │ ├──[🔀] type (42133:17)❌ 
  │ │ └──[➕] format (42134:19)❌ 
  │ ├─┬extract_count
  │ │ ├──[🔀] type (42115:17)❌ 
  │ │ └──[➕] format (42116:19)❌ 
  │ ├─┬surviving_buckets
  │ │ ├──[🔀] type (42130:17)❌ 
  │ │ └──[➕] format (42131:19)❌ 
  │ ├─┬extract_ns
  │ │ ├──[🔀] type (42118:17)❌ 
  │ │ └──[➕] format (42119:19)❌ 
  │ └─┬collect_analyzed_ns
  │   ├──[🔀] type (42124:17)❌ 
  │   └──[➕] format (42125:19)❌ 
  ├─┬_core.search:HitsMetadata
  │ └─┬total
  │   ├─┬ONEOF
  │   │ └──[🔀] $ref (42972:13)❌ 
  │   └─┬ONEOF
  │     └──[🔀] $ref (42548:15)❌ 
  ├─┬_common:ClusterStatistics
  │ ├─┬successful
  │ │ ├──[🔀] type (30137:17)❌ 
  │ │ └──[➕] format (30138:19)❌ 
  │ ├─┬total
  │ │ ├──[🔀] type (30140:17)❌ 
  │ │ └──[➕] format (30141:19)❌ 
  │ ├─┬skipped
  │ │ ├──[🔀] type (30134:17)❌ 
  │ │ └──[➕] format (30135:19)❌ 
  │ ├─┬partial
  │ │ ├──[🔀] type (30146:17)❌ 
  │ │ └──[➕] format (30147:19)❌ 
  │ ├─┬running
  │ │ ├──[🔀] type (30143:17)❌ 
  │ │ └──[➕] format (30144:19)❌ 
  │ └─┬failed
  │   ├──[🔀] type (30149:17)❌ 
  │   └──[➕] format (30150:19)❌ 
  ├─┬_core.bulk:UpdateOperation
  │ └─┬ALLOF
  │   └─┬retry_on_conflict
  │     ├──[🔀] type (41172:21)❌ 
  │     └──[➕] format (41173:23)❌ 
  ├─┬_core.search:AggregationProfileDelegateDebugFilter
  │ ├─┬segments_counted_in_constant_time
  │ │ ├──[🔀] type (42180:17)❌ 
  │ │ └──[➕] format (42181:19)❌ 
  │ └─┬results_from_metadata
  │   ├──[🔀] type (42173:17)❌ 
  │   └──[➕] format (42174:19)❌ 
  ├─┬_core.search:CompletionSuggestOption
  │ ├─┬score
  │ │ └──[➕] format (42254:19)❌ 
  │ └─┬_score
  │   └──[➕] format (42247:19)❌ 
  ├─┬_core.explain:Explanation
  │ └─┬value
  │   ├──[➖] type (41172:17)❌ 
  │   ├──[➕] oneOf (41209:15)
  │   ├──[➕] oneOf (41207:15)
  │   ├──[➕] oneOf (41213:15)
  │   └──[➕] oneOf (41211:15)
  ├─┬_core.bulk:OperationBase
  │ └─┬if_primary_term
  │   ├──[🔀] type (41071:17)❌ 
  │   └──[➕] format (41072:19)❌ 
  ├─┬_common:InlineGetDictUserDefined
  │ └─┬_primary_term
  │   ├──[🔀] type (30732:17)❌ 
  │   └──[➕] format (30733:19)❌ 
  ├─┬_common:NestedSortValue
  │ └─┬max_children
  │   └──[➕] format (30907:19)❌ 
  ├─┬_common:DocStatus
  │ ├─┬5xx
  │ │ ├──[🔀] type (30290:17)❌ 
  │ │ └──[➕] format (30291:19)❌ 
  │ ├─┬4xx
  │ │ ├──[🔀] type (30287:17)❌ 
  │ │ └──[➕] format (30288:19)❌ 
  │ ├─┬1xx
  │ │ ├──[🔀] type (30278:17)❌ 
  │ │ └──[➕] format (30279:19)❌ 
  │ ├─┬2xx
  │ │ ├──[🔀] type (30281:17)❌ 
  │ │ └──[➕] format (30282:19)❌ 
  │ └─┬3xx
  │   ├──[🔀] type (30284:17)❌ 
  │   └──[➕] format (30285:19)❌ 
  ├─┬_core.search:HighlightField
  │ └─┬ALLOF
  │   └─┬fragment_offset
  │     ├──[🔀] type (42469:21)❌ 
  │     └──[➕] format (42470:23)❌ 
  ├─┬_common:KnnField
  │ ├─┬boost
  │ │ └──[➕] format (30791:19)❌ 
  │ ├─┬k
  │ │ ├──[🔀] type (30769:17)❌ 
  │ │ └──[➕] format (30770:19)❌ 
  │ ├─┬min_score
  │ │ └──[➕] format (30774:19)❌ 
  │ ├─┬method_parameters
  │ │ └─┬Schema
  │ │   ├──[🔀] type (30796:19)❌ 
  │ │   └──[➕] format (30797:21)❌ 
  │ ├─┬rescore
  │ │ └─┬Schema
  │ │   └──[➕] format (30803:21)❌ 
  │ └─┬max_distance
  │   └──[➕] format (30779:19)❌ 
  ├─┬_common:XyLocation
  │ └─┬ONEOF
  │   └─┬Schema
  │     └──[➕] format (32237:21)❌ 
  ├─┬_core.search:TotalHits
  │ └─┬value
  │   ├──[🔀] type (42977:17)❌ 
  │   └──[➕] format (42978:19)❌ 
  ├─┬_core.search:ResponseBody
  │ ├─┬max_score
  │ │ └──[➕] format (42820:19)❌ 
  │ ├─┬num_reduce_phases
  │ │ ├──[🔀] type (42822:17)❌ 
  │ │ └──[➕] format (42823:19)❌ 
  │ └─┬took
  │   ├──[🔀] type (42797:17)❌ 
  │   └──[➕] format (42798:19)❌ 
  ├─┬_core.search:FetchProfileBreakdown
  │ ├─┬process
  │ │ ├──[🔀] type (42307:17)❌ 
  │ │ └──[➕] format (42308:19)❌ 
  │ ├─┬process_count
  │ │ ├──[🔀] type (42304:17)❌ 
  │ │ └──[➕] format (42305:19)❌ 
  │ ├─┬load_stored_fields_count
  │ │ ├──[🔀] type (42295:17)❌ 
  │ │ └──[➕] format (42296:19)❌ 
  │ ├─┬load_stored_fields
  │ │ ├──[🔀] type (42292:17)❌ 
  │ │ └──[➕] format (42293:19)❌ 
  │ ├─┬next_reader
  │ │ ├──[🔀] type (42298:17)❌ 
  │ │ └──[➕] format (42299:19)❌ 
  │ └─┬next_reader_count
  │   ├──[🔀] type (42301:17)❌ 
  │   └──[➕] format (42302:19)❌ 
  ├─┬_common:PercentageNumber
  │ └──[➕] format (31077:15)❌ 
  ├─┬_core.search:TrackHits
  │ └─┬ONEOF
  │   ├──[🔀] type (42995:17)❌ 
  │   └──[➕] format (42996:19)❌ 
  ├─┬_core.search:Rescore
  │ └─┬window_size
  │   ├──[🔀] type (42772:17)❌ 
  │   └──[➕] format (42773:19)❌ 
  ├─┬_common:QueryVector
  │ └─┬Schema
  │   └──[➕] format (31191:17)❌ 
  ├─┬_core.search:SuggestBase
  │ ├─┬length
  │ │ ├──[🔀] type (42922:17)❌ 
  │ │ └──[➕] format (42923:19)❌ 
  │ └─┬offset
  │   ├──[🔀] type (42925:17)❌ 
  │   └──[➕] format (42926:19)❌ 
  ├─┬_core.explain:ExplanationDetail
  │ └─┬value
  │   ├──[➖] type (41187:17)❌ 
  │   ├──[➕] oneOf (41232:15)
  │   ├──[➕] oneOf (41230:15)
  │   ├──[➕] oneOf (41236:15)
  │   └──[➕] oneOf (41234:15)
  ├─┬_common:GeoLine
  │ └─┬coordinates
  │   └─┬Schema
  │     └─┬Schema
  │       └──[➕] format (30514:23)❌ 
  ├─┬_common:SlicedScroll
  │ └─┬max
  │   ├──[🔀] type (31850:17)❌ 
  │   └──[➕] format (31851:19)❌ 
  ├─┬_core.search:Hit
  │ └─┬_primary_term
  │   ├──[🔀] type (42532:17)❌ 
  │   └──[➕] format (42533:19)❌ 
  ├─┬_core.search:QueryBreakdown
  │ ├─┬score
  │ │ ├──[🔀] type (42710:17)❌ 
  │ │ └──[➕] format (42711:19)❌ 
  │ ├─┬set_min_competitive_score
  │ │ ├──[🔀] type (42722:17)❌ 
  │ │ └──[➕] format (42723:19)❌ 
  │ ├─┬next_doc
  │ │ ├──[🔀] type (42704:17)❌ 
  │ │ └──[➕] format (42705:19)❌ 
  │ ├─┬next_doc_count
  │ │ ├──[🔀] type (42707:17)❌ 
  │ │ └──[➕] format (42708:19)❌ 
  │ ├─┬build_scorer
  │ │ ├──[🔀] type (42680:17)❌ 
  │ │ └──[➕] format (42681:19)❌ 
  │ ├─┬build_scorer_count
  │ │ ├──[🔀] type (42683:17)❌ 
  │ │ └──[➕] format (42684:19)❌ 
  │ ├─┬match_count
  │ │ ├──[🔀] type (42695:17)❌ 
  │ │ └──[➕] format (42696:19)❌ 
  │ ├─┬create_weight_count
  │ │ ├──[🔀] type (42689:17)❌ 
  │ │ └──[➕] format (42690:19)❌ 
  │ ├─┬create_weight
  │ │ ├──[🔀] type (42686:17)❌ 
  │ │ └──[➕] format (42687:19)❌ 
  │ ├─┬advance_count
  │ │ ├──[🔀] type (42677:17)❌ 
  │ │ └──[➕] format (42678:19)❌ 
  │ ├─┬match
  │ │ ├──[🔀] type (42692:17)❌ 
  │ │ └──[➕] format (42693:19)❌ 
  │ ├─┬advance
  │ │ ├──[🔀] type (42674:17)❌ 
  │ │ └──[➕] format (42675:19)❌ 
  │ ├─┬compute_max_score_count
  │ │ ├──[🔀] type (42719:17)❌ 
  │ │ └──[➕] format (42720:19)❌ 
  │ ├─┬compute_max_score
  │ │ ├──[🔀] type (42716:17)❌ 
  │ │ └──[➕] format (42717:19)❌ 
  │ ├─┬score_count
  │ │ ├──[🔀] type (42713:17)❌ 
  │ │ └──[➕] format (42714:19)❌ 
  │ ├─┬shallow_advance_count
  │ │ ├──[🔀] type (42701:17)❌ 
  │ │ └──[➕] format (42702:19)❌ 
  │ ├─┬shallow_advance
  │ │ ├──[🔀] type (42698:17)❌ 
  │ │ └──[➕] format (42699:19)❌ 
  │ └─┬set_min_competitive_score_count
  │   ├──[🔀] type (42725:17)❌ 
  │   └──[➕] format (42726:19)❌ 
  ├─┬_core.search:NestedIdentity
  │ └─┬offset
  │   ├──[🔀] type (42617:17)❌ 
  │   └──[➕] format (42618:19)❌ 
  ├─┬_common:XyCartesianCoordinates
  │ ├─┬x
  │ │ └──[➕] format (32215:19)❌ 
  │ └─┬y
  │   └──[➕] format (32219:19)❌ 
  ├─┬_core.search:HighlightBase
  │ ├─┬no_match_size
  │ │ ├──[🔀] type (42393:17)❌ 
  │ │ └──[➕] format (42394:19)❌ 
  │ ├─┬number_of_fragments
  │ │ ├──[🔀] type (42402:17)❌ 
  │ │ └──[➕] format (42403:19)❌ 
  │ ├─┬phrase_limit
  │ │ ├──[🔀] type (42416:17)❌ 
  │ │ └──[➕] format (42417:19)❌ 
  │ ├─┬fragment_size
  │ │ ├──[🔀] type (42375:17)❌ 
  │ │ └──[➕] format (42376:19)❌ 
  │ ├─┬boundary_max_scan
  │ │ ├──[🔀] type (42359:17)❌ 
  │ │ └──[➕] format (42360:19)❌ 
  │ ├─┬max_fragment_length
  │ │ ├──[🔀] type (42382:17)❌ 
  │ │ └──[➕] format (42383:19)❌ 
  │ └─┬max_analyzed_offset
  │   ├──[🔀] type (42389:17)❌ 
  │   └──[➕] format (42390:19)❌ 
  ├─┬_core.search:PhraseSuggestOption
  │ └─┬score
  │   └──[➕] format (42644:19)❌ 
  ├─┬_core.bulk:ResponseItem
  │ ├─┬status
  │ │ ├──[🔀] type (41111:17)❌ 
  │ │ └──[➕] format (41112:19)❌ 
  │ └─┬_primary_term
  │   ├──[🔀] type (41117:17)❌ 
  │   └──[➕] format (41118:19)❌ 
  ├─┬_core.search:TermSuggestOption
  │ ├─┬score
  │ │ └──[➕] format (42959:19)❌ 
  │ └─┬freq
  │   └──[➕] format (42962:19)❌ 
  ├─┬_common:GeoHashPrecision
  │ ├─┬ONEOF
  │ │ └──[🔀] type (30497:17)❌ 
  │ └─┬ONEOF
  │   ├──[🔀] type (30495:17)❌ 
  │   └──[➕] format (30496:19)❌ 
  ├─┬_core.search:FetchProfileDebug
  │ └─┬fast_path
  │   ├──[🔀] type (42317:17)❌ 
  │   └──[➕] format (42318:19)❌ 
  ├─┬_core.search:InnerHits
  │ ├─┬size
  │ │ └──[➕] format (42569:19)❌ 
  │ └─┬from
  │   └──[➕] format (42573:19)❌ 
  ├─┬_core.search:SearchProfile
  │ └─┬rewrite_time
  │   ├──[🔀] type (42863:17)❌ 
  │   └──[➕] format (42864:19)❌ 
  ├─┬_core.search:AggregationBreakdown
  │ ├─┬initialize
  │ │ ├──[🔀] type (42036:17)❌ 
  │ │ └──[➕] format (42037:19)❌ 
  │ ├─┬reduce_count
  │ │ ├──[🔀] type (42051:17)❌ 
  │ │ └──[➕] format (42052:19)❌ 
  │ ├─┬build_leaf_collector
  │ │ ├──[🔀] type (42024:17)❌ 
  │ │ └──[➕] format (42025:19)❌ 
  │ ├─┬build_aggregation_count
  │ │ ├──[🔀] type (42021:17)❌ 
  │ │ └──[➕] format (42022:19)❌ 
  │ ├─┬initialize_count
  │ │ ├──[🔀] type (42039:17)❌ 
  │ │ └──[➕] format (42040:19)❌ 
  │ ├─┬post_collection_count
  │ │ ├──[🔀] type (42045:17)❌ 
  │ │ └──[➕] format (42046:19)❌ 
  │ ├─┬collect_count
  │ │ ├──[🔀] type (42033:17)❌ 
  │ │ └──[➕] format (42034:19)❌ 
  │ ├─┬build_leaf_collector_count
  │ │ ├──[🔀] type (42027:17)❌ 
  │ │ └──[➕] format (42028:19)❌ 
  │ ├─┬collect
  │ │ ├──[🔀] type (42030:17)❌ 
  │ │ └──[➕] format (42031:19)❌ 
  │ ├─┬build_aggregation
  │ │ ├──[🔀] type (42018:17)❌ 
  │ │ └──[➕] format (42019:19)❌ 
  │ ├─┬reduce
  │ │ ├──[🔀] type (42048:17)❌ 
  │ │ └──[➕] format (42049:19)❌ 
  │ └─┬post_collection
  │   ├──[🔀] type (42042:17)❌ 
  │   └──[➕] format (42043:19)❌ 
  └─┬_common.query_dsl:SpanGapQuery
    └─┬Schema
      ├──[🔀] type (40720:15)❌ 
      └──[➕] format (40721:17)❌ 

Document Element Total Changes Breaking Changes
paths 0 0
components 238 234
  • BREAKING Changes: 234 out of 238
  • Modifications: 106
  • Removals: 2
  • Additions: 130
  • Breaking Removals: 2
  • Breaking Modifications: 106
  • Breaking Additions: 122

Report

The full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/11312514398/artifacts/2053171058

API Coverage

Before After Δ
Covered (%) 588 (57.59 %) 588 (57.59 %) 0 (0 %)
Uncovered (%) 433 (42.41 %) 433 (42.41 %) 0 (0 %)
Unknown 29 29 0

Copy link
Contributor

Spec Test Coverage Analysis

Total Tested
504 315 (62.5 %)

Signed-off-by: amberzsy <xxamber998@gmail.com>
@dblock
Copy link
Member

dblock commented Oct 14, 2024

I wonder whether it's a good idea to add a linter rule that warns us that a type is too generic? And then eventually turn it into an error? If you agree do open an issue please!

@dblock dblock merged commit 051c21d into opensearch-project:main Oct 14, 2024
19 checks passed
@amberzsy
Copy link
Contributor Author

I wonder whether it's a good idea to add a linter rule that warns us that a type is too generic? And then eventually turn it into an error? If you agree do open an issue please!

agree. opened issue here

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