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

ISPN-13951 Use the new indexing annotations #166

Merged
merged 1 commit into from Oct 24, 2022

Conversation

karesti
Copy link
Contributor

@karesti karesti commented Oct 20, 2022

@karesti karesti requested a review from fax4ever October 20, 2022 09:21
Copy link

@fax4ever fax4ever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1 to merge it

String lastName;

@ProtoField(number = 3, defaultValue = "-1")
@Decimal

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed @karesti.
Usually the decimal should be used if a decimal scale different from 0 is present, for instance 2 for a decimal value of a currency field.
In this case you can simply use the @Basic annotation.
Same for the string fields that do not require a normalizer or analyzer, you can use @Basic.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basic means take the field as it is, without no transformation

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a numeric field, to use a @Decimalwith no scale is equivalent to use a @Basic.
As on a string field, to use a @Keyword with no normalizer is equivalent to a @Text with no analyzer that is equivalent to using a @Basic.
In general I would advise to use @Basic, if it is possible.

@karesti
Copy link
Contributor Author

karesti commented Oct 21, 2022

@fax4ever I added the change

@fax4ever fax4ever merged commit 0da92fb into infinispan:main Oct 24, 2022
@fax4ever
Copy link

Merged, thanks!

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.

None yet

2 participants