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

Example of Preanalyzed JSON in ref guide invalid

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 7.6
    • 8.1, 9.0
    • documentation
    • None

    Description

      Writing a test for a use case that was pre-analyzing a field for a customer I decided to first check that the config could successfully accept a chunk of preanalyzed json. Thus I grabbed the example in the docs and BOOM

      org.apache.solr.client.solrj.impl.CloudSolrClient$RouteException: Error from server at http://127.0.0.1:63302/solr/testCol_shard1_replica_n1: Exception writing document id 1 to the index; possible analysis error: startOffset must be non-negative, and endOffset must be >= startOffset, and offsets must not go backwards startOffset=5,endOffset=8,lastStartOffset=123 for field 'preanalyzed'
      

      Turns out the example has token offsets that go backwards... attaching a patch to make the (mostly nonsensical) example at least technically valid

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            gus Gus Heck
            gus Gus Heck
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment