Unable to replace the default Wordpress search with WPSOLR search
- savtParticipant4 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
savtParticipant4 years, 11 months ago #11908the 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 $contentbasically 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”:{}}}’
wpsolrKeymaster4 years, 11 months ago #11909Which 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": {} } }
savtParticipant4 years, 11 months ago #11911Sorry 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.
savtParticipant4 years, 11 months ago #11920Hi, 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’
and said that the context search (auto search) is working good.
wpsolrKeymaster4 years, 11 months ago #11921Thanks.
Which PHP version do you have?
Is your php curl installed? https://php.net/manual/en/book.curl.php
savtParticipant4 years, 11 months ago #11923Php version: 7.2.16
Yes, php curl is installed: https://imgur.com/a/gAXOXx6
You must be logged in to reply to this topic.