Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-11155

/analysis/field and /analysis/document requests should support points fields

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 7.0, 7.1, 8.0
    • None

    Description

      The following added to FieldAnalysisRequestHandlerTest currently fails:

        @Test
        public void testIntPoint() throws Exception {
          FieldAnalysisRequest request = new FieldAnalysisRequest();
          request.addFieldType("pint");
          request.setFieldValue("5");
          handler.handleAnalysisRequest(request, h.getCore().getLatestSchema());
        }
      

      as follows:

         [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)
      

      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.

      Attachments

        1. SOLR-11155.patch
          5 kB
          Jason Gerlowski
        2. SOLR-11155.patch
          11 kB
          Steven Rowe
        3. SOLR-11155.patch
          12 kB
          Steven Rowe

        Activity

          People

            sarowe Steven Rowe
            sarowe Steven Rowe
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: