lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Rowe (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SOLR-11155) /analysis/field and /analysis/document requests should support points fields
Date Fri, 28 Jul 2017 15:07:01 GMT

     [ https://issues.apache.org/jira/browse/SOLR-11155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Steve Rowe updated SOLR-11155:
------------------------------
    Attachment: SOLR-11155.patch

Final patch, I had forgotten to rollback the change I made in {{SolrExampleTests.java}} under
SOLR-10846, which can (with this patch) once again test that non-numeric text sent to {{/analysis/field}}
for numeric fields generates a 400 error.  I also added a CHANGES entry.

Precommit and all Solr tests pass, committing shortly.

> /analysis/field and /analysis/document requests should support points fields
> ----------------------------------------------------------------------------
>
>                 Key: SOLR-11155
>                 URL: https://issues.apache.org/jira/browse/SOLR-11155
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Steve Rowe
>            Assignee: Steve Rowe
>            Priority: Blocker
>              Labels: numeric-tries-to-points
>             Fix For: 7.0
>
>         Attachments: SOLR-11155.patch, SOLR-11155.patch, SOLR-11155.patch
>
>
> The following added to FieldAnalysisRequestHandlerTest currently fails:
> {code:java}
>   @Test
>   public void testIntPoint() throws Exception {
>     FieldAnalysisRequest request = new FieldAnalysisRequest();
>     request.addFieldType("pint");
>     request.setFieldValue("5");
>     handler.handleAnalysisRequest(request, h.getCore().getLatestSchema());
>   }
> {code}
> as follows:
> {noformat}
>    [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=FieldAnalysisRequestHandlerTest
-Dtests.method=testIntPoint -Dtests.seed=167CC259812871FB -Dtests.slow=true -Dtests.locale=fi-FI
-Dtests.timezone=Asia/Hebron -Dtests.asserts=true -Dtests.file.encoding=US-ASCII
>    [junit4] ERROR   0.01s | FieldAnalysisRequestHandlerTest.testIntPoint <<<
>    [junit4]    > Throwable #1: java.lang.UnsupportedOperationException: Can't generate
internal string in PointField. use PointField.toInternalByteRef
>    [junit4]    > 	at __randomizedtesting.SeedInfo.seed([167CC259812871FB:6BF651CEF8FF5B04]:0)
>    [junit4]    > 	at org.apache.solr.schema.PointField.toInternal(PointField.java:187)
>    [junit4]    > 	at org.apache.solr.schema.FieldType$DefaultAnalyzer$1.incrementToken(FieldType.java:488)
>    [junit4]    > 	at org.apache.solr.handler.AnalysisRequestHandlerBase.analyzeTokenStream(AnalysisRequestHandlerBase.java:188)
>    [junit4]    > 	at org.apache.solr.handler.AnalysisRequestHandlerBase.analyzeValue(AnalysisRequestHandlerBase.java:102)
>    [junit4]    > 	at org.apache.solr.handler.FieldAnalysisRequestHandler.analyzeValues(FieldAnalysisRequestHandler.java:225)
>    [junit4]    > 	at org.apache.solr.handler.FieldAnalysisRequestHandler.handleAnalysisRequest(FieldAnalysisRequestHandler.java:186)
>    [junit4]    > 	at org.apache.solr.handler.FieldAnalysisRequestHandlerTest.testIntPoint(FieldAnalysisRequestHandlerTest.java:435)
> {noformat}
> If points fields aren't supported by the FieldAnalysisRequestHandler, then this should
be directly stated in the error message, which should be a 4XX error rather than a 5XX error.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message