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

SearchResultsWrapper#getFieldData throws ParamException when a search has no matching records #560

Open
zero11-0203 opened this issue Jul 19, 2023 · 1 comment

Comments

@zero11-0203
Copy link

zero11-0203 commented Jul 19, 2023

throw new ParamException("Illegal field name: " + fieldName);

Users would expect getFieldData on a valid filedName to return an empty list even if a search has no matching records.

However, it throws a ParamException with Illegal field name instead, because SearchResultData#fieldsData_ seems to be empty when a search has no matching records.

@yhmo
Copy link
Contributor

yhmo commented Aug 4, 2023

The getFieldData() returns a List<?>, if we don't throw an exception, we don't know which type should be returned in the List.

List<?> getFieldData(@nonnull String fieldName, int indexOfTarget)

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

No branches or pull requests

2 participants