Unable to replace the default Wordpress search with WPSOLR search

  • wpsolr
    Keymaster
    4 years, 11 months ago #11902

    Deactivate “fuzzy” option in screen 2.1

    savt
    Participant
    4 years, 11 months ago #11903

    Ok. It’s still the same…

    wpsolr
    Keymaster
    4 years, 11 months ago #11904

    Remove the 2 fields selected in 2.3 and save.

    savt
    Participant
    4 years, 11 months ago #11905

    ummm so i install a debug plugin and a query plugin. There’s an notice or warnings shown but not sure if that’s the issue: https://imgur.com/a/NIG57j4

    savt
    Participant
    4 years, 11 months ago #11906

    2 fields selected in 2.3 and save. — I’ve remove the fields as suggested.. still the same error..

    wpsolr
    Keymaster
    4 years, 11 months ago #11907

    The ES query example you just showed me, where does it come from?

    savt
    Participant
    4 years, 11 months ago #11908

    the plugin is using curl to call the elastic search
    I put some print statements in the php files to trapped the parameters passed to the curl command
    the plug in is making two different calls to the ES
    the json blob is coming from a variable called $content

    basically i reconstructed the query the plugin generated:

    curl -XGET https://elastic:XXXXXXXXXXXXXXXXXXXXXXXXXXX@c49de0db75574f3694d4dfa1cf5ce3eb.ap-southeast-2.aws.found.io:9243/itm_pd_live/wpsolr_types/_search -H “Content-Type: application/json” -H “Authorization: Basic *XXXXXXXXXXXXXXXXXXXX* =” -d ‘{“from”:0,”size”:100,”sort”:[{“title_s”:{“order”:”asc”}}],”highlight”:{“require_field_match”:false,”pre_tags”:[“<b>”],”post_tags”:[“</b>”],”fields”:{“title”:{“fragment_size”:100,”number_of_fragments”:1},”content”:{“fragment_size”:100,”number_of_fragments”:1},”comments”:{“fragment_size”:100,”number_of_fragments”:1}}},”_source”:[“id”,”PID”,”title”,”numcomments”,”comments”,”displaydate”,”displaymodified”,”*categories_str”,”author”,”*post_thumbnail_href_str”,”*post_href_str”],”query”:{“match_all”:{}}}’

    wpsolr
    Keymaster
    4 years, 11 months ago #11909

    Which results do you get from your query:

    GET /_search
    {
      "from": 0,
      "size": 100,
      "sort": [
        {
          "title_s": {
            "order": "asc"
          }
        }
      ],
      "highlight": {
        "require_field_match": false,
        "pre_tags": [
          "<b>"
        ],
        "post_tags": [
          "</b>"
        ],
        "fields": {
          "title": {
            "fragment_size": 100,
            "number_of_fragments": 1
          },
          "content": {
            "fragment_size": 100,
            "number_of_fragments": 1
          },
          "comments": {
            "fragment_size": 100,
            "number_of_fragments": 1
          }
        }
      },
      "_source": [
        "id",
        "PID",
        "title",
        "numcomments",
        "comments",
        "displaydate",
        "displaymodified",
        "*categories_str",
        "author",
        "*post_thumbnail_href_str",
        "*post_href_str"
      ],
      "query": {
        "match_all": {}
      }
    }
    savt
    Participant
    4 years, 11 months ago #11911

    Sorry the query was tweaked by my colleague for test purposes.. my apologies i’d ignore that. I just played with Elasticsearch api console and it’s responding as what I expected. but not sure why Wpsolr pro is not getting the search query response even though the connection is checked in green.

    wpsolr
    Keymaster
    4 years, 11 months ago #11912

    My feeling is that WordPress does not reach your Elasticsearch server while querying.

    savt
    Participant
    4 years, 11 months ago #11913

    I see, Any advice that could help me to fix this issue though..?

    wpsolr
    Keymaster
    4 years, 11 months ago #11914

    What I said earlier:
    – Trace all queries in Elasticsearch logs
    – Ask your hosting provider

    savt
    Participant
    4 years, 11 months ago #11920

    Hi, the hosting provider replied to us. They’ve checked the connectivity from our hosting server to our ES instance and it looks good. In fact the WPSOLR plugin is receiving a timeout somewhere. They’ve test on SHH Shell via the following:

    `curl -u elastic:XXXXXXXXXXXXXXXXXXXXXXXX ‘https://c49de0db75574f3694d4dfa1cf5ce3eb.ap-southeast-2.aws.found.io:9243/_search?q=clamp&#8217;

    and said that the context search (auto search) is working good.

    wpsolr
    Keymaster
    4 years, 11 months ago #11921

    Thanks.

    Which PHP version do you have?

    Is your php curl installed? https://php.net/manual/en/book.curl.php

    savt
    Participant
    4 years, 11 months ago #11923

    Php version: 7.2.16

    Yes, php curl is installed: https://imgur.com/a/gAXOXx6

Viewing 15 posts - 31 through 45 (of 48 total)

You must be logged in to reply to this topic.