-
Notifications
You must be signed in to change notification settings - Fork 36
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
SolrException: Invalid Number when searching on d:int property with value exceeding Integer.MAX_VALUE #334
Comments
I tried to pinpoint the issue by adding failing tests to QParserPluginIT on: |
Not sure this is a valid issue, as 123456789123456789123456789 is effectively an invalid Number. |
Real world use case: alfresco is configured with a custom search-query-template, that includes some custom properties. Example:
User searches for This is reproducible in a vanilla set up by simulating this with a query template like |
We've created https://issues.alfresco.com/jira/browse/SEARCH-2331 to proceed with the fix. |
Steps to reproduce
Integer.MAX_VALUE
value.Long.MAX_VALUE
Context
To fix MNT-19252, following code has been introduced in the
Solr4QueryParser
to check if thequeryText
is a valid numeric:However in the edge case where
queryText
is a number, but exceeds e.g.Integer.MAX_VALUE
,Double.valueOf(queryText);
will not throw aNumberFormatException
and later aSolrException: Invalid Number
exception will be thrown.Stacktrace
Reproducable by searching for
sys:node\-dbid: 123456789123456789123456789
in the Alfresco admin panel.This results in following stacktrace in SearchServices:
The text was updated successfully, but these errors were encountered: