You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/03/07 13:02:00 UTC

[jira] [Commented] (SOLR-13296) Example of Preanalyzed JSON in ref guide invalid

    [ https://issues.apache.org/jira/browse/SOLR-13296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16786738#comment-16786738 ] 

ASF subversion and git services commented on SOLR-13296:
--------------------------------------------------------

Commit d2d3942721457ae4efc6985fab20db78e5bdfc16 in lucene-solr's branch refs/heads/master from Gus Heck
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=d2d3942 ]

SOLR-13296 fix doc example so that it can be accepted by Solr
(previously caused error due to decreasing offsets)


> Example of Preanalyzed JSON in ref guide invalid
> ------------------------------------------------
>
>                 Key: SOLR-13296
>                 URL: https://issues.apache.org/jira/browse/SOLR-13296
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: documentation
>    Affects Versions: 7.6
>            Reporter: Gus Heck
>            Priority: Trivial
>         Attachments: SOLR-13296.patch
>
>
> 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
> {code}
> 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'
> {code}
> Turns out the example has token offsets that go backwards... attaching a patch to make the (mostly nonsensical) example at least technically valid



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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