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
HSEARCH-3099 HSEARCH-3553 Restore support for "indexNullAs" in @Field #1947
Conversation
0d5abcb
to
c14df18
Compare
f4823d1
to
638c76d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My comments below. I disagree with a few details in the backend side of the implementation, but in my opinion the most important problem is the lack of coverage and extensibility of the mapper side of the implementation: it limits support to just a few primitive types, even though we used to support much more in Search 5, and it completely bars the way to users defining their own parsing method for custom bridges.
...backend/elasticsearch/types/dsl/impl/AbstractElasticsearchTemporalIndexFieldTypeContext.java
Outdated
Show resolved
Hide resolved
...e/search/backend/elasticsearch/types/dsl/impl/ElasticsearchBooleanIndexFieldTypeContext.java
Outdated
Show resolved
Hide resolved
...nate/search/backend/elasticsearch/types/dsl/impl/ElasticsearchByteIndexFieldTypeContext.java
Outdated
Show resolved
Hide resolved
...te/search/backend/elasticsearch/types/dsl/impl/ElasticsearchDoubleIndexFieldTypeContext.java
Outdated
Show resolved
Hide resolved
...ate/search/backend/elasticsearch/types/dsl/impl/ElasticsearchFloatIndexFieldTypeContext.java
Outdated
Show resolved
Hide resolved
...mapper/pojo/mapping/definition/programmatic/impl/PropertyGenericFieldMappingContextImpl.java
Outdated
Show resolved
Hide resolved
.../org/hibernate/search/integrationtest/mapper/pojo/mapping/definition/IndexNullAsValueIT.java
Outdated
Show resolved
Hide resolved
...ernate/search/backend/lucene/types/dsl/impl/AbstractLuceneStandardIndexFieldTypeContext.java
Outdated
Show resolved
Hide resolved
...java/org/hibernate/search/backend/lucene/document/model/impl/LuceneIndexSchemaFieldNode.java
Outdated
Show resolved
Hide resolved
...a/org/hibernate/search/integrationtest/mapper/orm/mapping/definition/IndexNullAsValueIT.java
Outdated
Show resolved
Hide resolved
f3e3307
to
8675b7e
Compare
c3e8fc8
to
f991d89
Compare
f991d89
to
a3506f5
Compare
@yrodiere, thanks for the in depth review. I think I've addressed most of the suggestions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nearly there!
I have a few optional comments below. Feel free to ignore them, but one thing that is still missing is the documentation.
I can do it if you prefer, but I think we should add:
- Something about
indexNullAs
in mapping annotations. Seemapper-orm-mapping.asciidoc
, section "Direct field mapping". You can add an item in the definition list at the very bottom of that section, after "projectable". It's not worth your time to add an example, one or two sentences should be enough since the feature is rather straightforward (to use... I know it's been hard to implement :) ). - Something about how
indexNullAs
in mapping annotations is parsed for each built-in value bridge. Seemapper-orm-mapping.asciidoc
, section "Built-in value bridges". You can add a column "Parsing method for 'indexNullAs'" to the right of the table. Personally I would simply put something likeZoneOffset.parse(String)
in most cases.
...main/java/org/hibernate/search/integrationtest/backend/tck/indexnull/IndexNullAsValueIT.java
Outdated
Show resolved
Hide resolved
engine/src/main/java/org/hibernate/search/engine/cfg/spi/ParseUtils.java
Show resolved
Hide resolved
...bernate/search/mapper/pojo/mapping/building/impl/FieldModelContributorBridgeContextImpl.java
Outdated
Show resolved
Hide resolved
...in/java/org/hibernate/search/mapper/pojo/mapping/building/impl/PojoIndexModelBinderImpl.java
Outdated
Show resolved
Hide resolved
...mapper/pojo/mapping/definition/annotation/impl/PropertySortableFieldAnnotationProcessor.java
Outdated
Show resolved
Hide resolved
engine/src/main/java/org/hibernate/search/engine/logging/impl/Log.java
Outdated
Show resolved
Hide resolved
1a573dd
to
3c9e717
Compare
Thank you @yrodiere. Is there other we can improve? |
3c9e717
to
7b19987
Compare
It looks good; I pushed a few commits with minor fixes and will merge as soon as CI goes green. |
Hi @yrodiere! Seen the fixes, they are good for me. Thank you ;) |
…ration, Period Rather than exposing the internal format. This is consistent with what we do for the character bridge in particular, or the URI/URL bridges, or the Enum bridge, or the ZoneId bridge: we expect a string representing the type seen from the user side, not the indexed type.
5ecebd4
to
e2a158a
Compare
Merged. Thanks a lot! |
Thank you |
https://hibernate.atlassian.net/browse/HSEARCH-3099
https://hibernate.atlassian.net/browse/HSEARCH-3553