You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Joey (JIRA)" <ji...@apache.org> on 2011/09/07 01:59:11 UTC
[jira] [Created] (SOLR-2745) Sorting on a field whose name
resembles an integer in scientific notation
Sorting on a field whose name resembles an integer in scientific notation
-------------------------------------------------------------------------
Key: SOLR-2745
URL: https://issues.apache.org/jira/browse/SOLR-2745
Project: Solr
Issue Type: Bug
Components: search
Affects Versions: 3.3
Reporter: Joey
Priority: Minor
I have created a schema where the field names are in a uuid format eg: 1cf1691c0-a1a4-4255-8943-57d87c923e31_t. I am also implementing dynamic fields via the 'star underscore' format eg: *_t.
Whenever I try and sort on a field name that has a format of one or more integers followed by an 'e', I get a NumberFormatException like the following: *java.lang.NumberFormatException: For input string: "8e"*. This particular error comes from trying to sort on a field name *8ecdced6f-3eb4-e508-4e7d-d40a86305096_dt*. If the field name started with 12345e, I would get an error *java.lang.NumberFormatException: For input string: "12345e"*.
I'm not sure if this is a major issue or not but it is something that has appeared in our testing quite often. You would be surprised at how often randomly generated uuid's start with a number and then 'e'...
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Resolved] (SOLR-2745) Sorting on a field whose name
resembles an integer in scientific notation
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2745?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yonik Seeley resolved SOLR-2745.
--------------------------------
Resolution: Duplicate
This is a dup of SOLR-2606, fixed in 3x (will be 3.4)
> Sorting on a field whose name resembles an integer in scientific notation
> -------------------------------------------------------------------------
>
> Key: SOLR-2745
> URL: https://issues.apache.org/jira/browse/SOLR-2745
> Project: Solr
> Issue Type: Bug
> Components: search
> Affects Versions: 3.3
> Reporter: Joey
> Priority: Minor
>
> I have created a schema where the field names are in a uuid format eg: 1cf1691c0-a1a4-4255-8943-57d87c923e31_t. I am also implementing dynamic fields via the 'star underscore' format eg: *_t.
> Whenever I try and sort on a field name that has a format of one or more integers followed by an 'e', I get a NumberFormatException like the following: *java.lang.NumberFormatException: For input string: "8e"*. This particular error comes from trying to sort on a field name *8ecdced6f-3eb4-e508-4e7d-d40a86305096_dt*. If the field name started with 12345e, I would get an error *java.lang.NumberFormatException: For input string: "12345e"*.
> I'm not sure if this is a major issue or not but it is something that has appeared in our testing quite often. You would be surprised at how often randomly generated uuid's start with a number and then 'e'...
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (SOLR-2745) Sorting on a field whose name
resembles an integer in scientific notation
Posted by "Joey (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098507#comment-13098507 ]
Joey commented on SOLR-2745:
----------------------------
I store data that I assume the dynamic field expects. ie: *_t is text, *_dt is storing only dates, *_i is storing only integers. I'm not putting unexpected data into these fields. Also, I'm not allowing users from the front-end of my system to sort on text fields but that's beside the point.
I reinstalled 3.3 to make sure I had the latest version and started from scratch with only 3 docs indexed. Sorting on the _dt field (actual field name *8ecdced6f-3eb4-e508-4e7d-d40a86305096_dt*) still gives me that same error.
I can confirm that there is only datestamps in my dynamic date fields in the 3 indexed docs I now have.
I am no expert but from this it seems that the error is not a data one but a field name parsing issue.
> Sorting on a field whose name resembles an integer in scientific notation
> -------------------------------------------------------------------------
>
> Key: SOLR-2745
> URL: https://issues.apache.org/jira/browse/SOLR-2745
> Project: Solr
> Issue Type: Bug
> Components: search
> Affects Versions: 3.3
> Reporter: Joey
> Priority: Minor
>
> I have created a schema where the field names are in a uuid format eg: 1cf1691c0-a1a4-4255-8943-57d87c923e31_t. I am also implementing dynamic fields via the 'star underscore' format eg: *_t.
> Whenever I try and sort on a field name that has a format of one or more integers followed by an 'e', I get a NumberFormatException like the following: *java.lang.NumberFormatException: For input string: "8e"*. This particular error comes from trying to sort on a field name *8ecdced6f-3eb4-e508-4e7d-d40a86305096_dt*. If the field name started with 12345e, I would get an error *java.lang.NumberFormatException: For input string: "12345e"*.
> I'm not sure if this is a major issue or not but it is something that has appeared in our testing quite often. You would be surprised at how often randomly generated uuid's start with a number and then 'e'...
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (SOLR-2745) Sorting on a field whose name
resembles an integer in scientific notation
Posted by "Lance Norskog (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098499#comment-13098499 ]
Lance Norskog commented on SOLR-2745:
-------------------------------------
What kind of data do you want to store in these fields? What do you expect to get when you sort on the field?
Fields named "*_dt" are datestamps. They are stored in a numerical format. Solr should not even let you index non-dates into this field.
Fields named '*_t' are text fields. These are indexed, and sorting on them does not make sense. It used to be that sorting would blow up if there were more term facets (what you sort on) than documents. In recent Solr (trunk) this will not blow up, but it still does not make sense.
> Sorting on a field whose name resembles an integer in scientific notation
> -------------------------------------------------------------------------
>
> Key: SOLR-2745
> URL: https://issues.apache.org/jira/browse/SOLR-2745
> Project: Solr
> Issue Type: Bug
> Components: search
> Affects Versions: 3.3
> Reporter: Joey
> Priority: Minor
>
> I have created a schema where the field names are in a uuid format eg: 1cf1691c0-a1a4-4255-8943-57d87c923e31_t. I am also implementing dynamic fields via the 'star underscore' format eg: *_t.
> Whenever I try and sort on a field name that has a format of one or more integers followed by an 'e', I get a NumberFormatException like the following: *java.lang.NumberFormatException: For input string: "8e"*. This particular error comes from trying to sort on a field name *8ecdced6f-3eb4-e508-4e7d-d40a86305096_dt*. If the field name started with 12345e, I would get an error *java.lang.NumberFormatException: For input string: "12345e"*.
> I'm not sure if this is a major issue or not but it is something that has appeared in our testing quite often. You would be surprised at how often randomly generated uuid's start with a number and then 'e'...
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (SOLR-2745) Sorting on a field whose name
resembles an integer in scientific notation
Posted by "Erick Erickson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-2745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098517#comment-13098517 ]
Erick Erickson commented on SOLR-2745:
--------------------------------------
That is odd. I just reproduced it with 3.3. Here are the field defs (stock Solr schema):
<field name="12345e" type="text_ws" indexed="true" />
<field name="12345e_dt" type="date" indexed="true"/>
It happens when sorting on either field. I have one doc in my index with these fields, put in this way:
<field name="12345e">stuff and nonsense is rampant in our society</field>
<field name="12345e_dt">2010-02-03T00:00:00Z</field>
One other peculiar thing, when I named the fields 8e32_dt and 8e32 it succeeded. but 832e and 832e_dt produced the number format exception, a little at odds with the original statement, but still.
Why the field #name# should show a number format exception is...er...interesting.
note also that my sort fragment was: &sort=832e_dt, which seems to be getting the _dt truncated.
But it's late, so I may be seeing things.
Full stack trace (minus most of the Jetty stuff):
HTTP ERROR 500
Problem accessing /solr/select. Reason:
For input string: "832e"
java.lang.NumberFormatException: For input string: "832e"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1222)
at java.lang.Double.parseDouble(Double.java:510)
at org.apache.solr.search.QueryParsing$StrParser.getNumber(QueryParsing.java:694)
at org.apache.solr.search.FunctionQParser.parseValueSource(FunctionQParser.java:293)
at org.apache.solr.search.FunctionQParser.parse(FunctionQParser.java:67)
at org.apache.solr.search.QParser.getQuery(QParser.java:142)
at org.apache.solr.search.QueryParsing.parseSort(QueryParsing.java:303)
at org.apache.solr.search.QParser.getSort(QParser.java:222)
at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:82)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:173)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1368)
at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:356)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:252)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
> Sorting on a field whose name resembles an integer in scientific notation
> -------------------------------------------------------------------------
>
> Key: SOLR-2745
> URL: https://issues.apache.org/jira/browse/SOLR-2745
> Project: Solr
> Issue Type: Bug
> Components: search
> Affects Versions: 3.3
> Reporter: Joey
> Priority: Minor
>
> I have created a schema where the field names are in a uuid format eg: 1cf1691c0-a1a4-4255-8943-57d87c923e31_t. I am also implementing dynamic fields via the 'star underscore' format eg: *_t.
> Whenever I try and sort on a field name that has a format of one or more integers followed by an 'e', I get a NumberFormatException like the following: *java.lang.NumberFormatException: For input string: "8e"*. This particular error comes from trying to sort on a field name *8ecdced6f-3eb4-e508-4e7d-d40a86305096_dt*. If the field name started with 12345e, I would get an error *java.lang.NumberFormatException: For input string: "12345e"*.
> I'm not sure if this is a major issue or not but it is something that has appeared in our testing quite often. You would be surprised at how often randomly generated uuid's start with a number and then 'e'...
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org