SyntaxError: Unexpected token { in JSON at position 1314

  • aksm
    Participant
    4 years, 3 months ago #16463

    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
    4 years, 3 months ago #16464

    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
    4 years, 3 months ago #16487

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

    wpsolr
    Keymaster
    4 years, 3 months ago #16488

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

    aksm
    Participant
    4 years, 3 months ago #16510

    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
    4 years, 3 months ago #16511

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

    aksm
    Participant
    4 years, 3 months ago #16553

    Search is working. No console errors.

    wpsolr
    Keymaster
    4 years, 3 months ago #16554

    Is that with Solr or Elasticsearch?

    aksm
    Participant
    4 years, 3 months ago #16555

    Local Solr instance on the same server.

    wpsolr
    Keymaster
    4 years, 3 months ago #16557

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

    Video – Create an Apache Solr index semi-automatically

    aksm
    Participant
    4 years, 3 months ago #16559

    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
    4 years, 3 months ago #16565

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

    aksm
    Participant
    4 years, 3 months ago #16567

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

    wpsolr
    Keymaster
    4 years, 3 months ago #16569

    Do you see errors in Solr logs?

    Or in WordPress debug.log?

    aksm
    Participant
    4 years, 3 months ago #16575

    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.