SyntaxError: Unexpected token { in JSON at position 1314

  • aksm
    Participant
    # 2 years, 5 months ago

    I get the following error when indexing:

    Error code: parsererror
    Error message: SyntaxError: Unexpected token { in JSON at position 1314

    The indexing seems to complete though because after a refresh the dashboard says the documents are in the index, and search seems to be working…

    wpsolr
    Keymaster
    # 2 years, 5 months ago

    This is strange. The indexing normally stops at first error.

    Your error could be due to some odd characters in one of your indexed document.

    aksm
    Participant
    # 2 years, 5 months ago

    Thanks, any suggestions on how to find the offending documents?

    wpsolr
    Keymaster
    # 2 years, 5 months ago

    You can try to restart indexing with the debug mode on: https://www.wpsolr.com/forums/reply/11957/

    aksm
    Participant
    # 2 years, 5 months ago

    Seems like it’s a lot of documents. Every time I add one to the exclusion list another comes up. We haven’t updated any of these posts so it must be something else.

    wpsolr
    Keymaster
    # 2 years, 5 months ago

    Check that your search is really working (look in the chrome console for errors).

    aksm
    Participant
    # 2 years, 5 months ago

    Search is working. No console errors.

    wpsolr
    Keymaster
    # 2 years, 5 months ago

    Is that with Solr or Elasticsearch?

    aksm
    Participant
    # 2 years, 5 months ago

    Local Solr instance on the same server.

    wpsolr
    Keymaster
    # 2 years, 5 months ago

    Then, it’s probably a misconfiguration of the index.

    Video – Create an Apache Solr index semi-automatically

    aksm
    Participant
    # 2 years, 5 months ago

    The index hasn’t been changed since it was last working. I also deleted and recreated and continue to have the same issue.

    wpsolr
    Keymaster
    # 2 years, 5 months ago

    In your Solr admin UI, under your index files, which files do you see?

    aksm
    Participant
    # 2 years, 5 months ago

    elevate.xml
    schema.xml
    solrconfig.xml
    stopwords.txt

    wpsolr
    Keymaster
    # 2 years, 5 months ago

    Do you see errors in Solr logs?

    Or in WordPress debug.log?

    aksm
    Participant
    # 2 years, 5 months ago

    Nothing in Solr logs, but I’m seeing this in debug.log:

    <h1>Forbidden</h1>
    <p>You don’t have permission to access /solr/search/select
    on this server.</p>
    <hr>
    <address>Apache/2.4.7 (Ubuntu) Server at us-west-solr7.solrcluster.com Port 443</address>
    </body></html>
    in /var/www/wams/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/solarium/solarium/library/Solarium/Core/Query/Result/Result.php:106
    Stack trace:
    #0 /var/www/wams/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/solarium/solarium/library/Solarium/Core/Client/Client.php(742): Solarium\Core\Query\Result\Result->__construct(Object(Solarium\Client), Object(Solarium\QueryType\Select\Query\Query), Object(Solarium\Core\Client\Response))
    #1 /var/www/wams/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/solarium/solarium/library/Solarium/Core/Client/Client.php(774): Solarium\Core\Client\Client->createResult(Object(Solarium\QueryType\Select in /var/www/wams/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/solarium/solarium/library/Solarium/Core/Query/Result/Result.php on line 106

Viewing 15 posts - 1 through 15 (of 29 total)

You must be logged in to reply to this topic.