[BUG] "shape" should not be required in GeoShapeQueryField
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start with opesearch-openapi.yaml and the GeoShapeQuery generated classes used by the Java reproduction. Check how the GeoShapeQueryField schema's required fields become builder validation, then verify that a pre-indexed shape query can be built and serialized without requiring shape.
Written by the indexing model from the issue text.
Description
What is the bug?
The current opesearch-openapi.yaml contias following definition:
_common.query_dsl___GeoShapeQueryField:
type: object
properties:
indexed_shape:
$ref: '#/components/schemas/_common.query_dsl___FieldLookup'
shape:
$ref: '#/components/schemas/_common.query_dsl___GeoShape'
relation:
$ref: '#/components/schemas/_common___GeoShapeRelation'
required:
- shape
This is not correct to require "shape", it's not required in the API - https://docs.opensearch.org/latest/query-dsl/geo-and-xy/geoshape/#using-a-pre-indexed-shape-definition
This makes it impossible to do pre-indexed shape queries right now using query DSL generated classes.
How can one reproduce the bug?
new Query.Builder()
.geoShape(GeoShapeQuery.Builder()
.field("some")
.shape(shape -> shape.indexedShape(i -> i.index("some").id("id").path("path")))
.build()
)
.build();
What is the expected behavior?
I expect it to be possible to do pre-indexed shape queries.
What is your host/environment?
Any
Do you have any screenshots?
N/A
Do you have any additional context?
N/A
- Dominant language
- Java
- Stars
- 165
- Forks
- 250
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 26
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from opensearch-project/opensearch-java
-
enhancement untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
opensearch-project/opensearch-java#1898 · 3 comments ·
-
bug untriaged
Difficulty 3/5 1-2 days Newbie friendliness 68/100
opensearch-project/opensearch-java#2159 · 1 comment ·
-
bug untriaged
Difficulty 3/5 1-2 days Newbie friendliness 68/100
opensearch-project/opensearch-java#2147 · 1 comment ·
All issues in opensearch-project/opensearch-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100