Problem: activation elasticsearch

Please report bugs here!

Moderator: Thorsten

camel_Trophy
Posts: 41
Joined: Fri Feb 17, 2017 5:03 pm

Re: Problem: activation elasticsearch

Post by camel_Trophy »

Greetings all,

Sorry to hijack the thread, I am having the same issue.

I followed the suggestion in this thread and I moved the elasticsearch.php from /admin to /config, now phpmyadmin will not load at all. I have to delete the elasticsearch.php from /config to restore the site, what am I doing wrong?

By the way, I am also getting a blank screen when I click on the "System Information" area.

Thanks,

Gibran
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Problem: activation elasticsearch

Post by Thorsten »

Hi,

no, don't move that file from admin to config!

Copy config/elasticsearch.php.original to config/elasticsearch.php. Then edit this file and enter the server address of the Elasticsearch instance. Then activate Elasticsearch in the admin search configuration and build a first search index under Admin -> Configuration -> Elasticsearch.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
camel_Trophy
Posts: 41
Joined: Fri Feb 17, 2017 5:03 pm

Re: Problem: activation elasticsearch

Post by camel_Trophy »

Hello Thorsten,

That worked like a charm :) I feel silly not catching your original direction.

Is there a way now to verify it's working as intended?

Thank you,

Gibran
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Problem: activation elasticsearch

Post by Thorsten »

Hi,

awesome! The search results should be much more better now.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
camel_Trophy
Posts: 41
Joined: Fri Feb 17, 2017 5:03 pm

Re: Problem: activation elasticsearch

Post by camel_Trophy »

Hello Thorsten,

My excitement was short lived, the search doesn't seem to work :(

When I attempt to search for something, the search window show "Nothing found...". If I hit enter I get this error message:

Fatal error: Uncaught exception 'Elasticsearch\Common\Exceptions\BadRequest400Exception' with message '{"error":{"root_cause":[{"type":"parsing_exception","reason":"no [query] registered for [filtered]","line":1,"col":22}],"type":"parsing_exception","reason":"no [query] registered for [filtered]","line":1,"col":22},"status":400}' in /var/www/html/faq/inc/libs/elasticsearch/src/Elasticsearch/Connections/Connection.php:655 Stack trace: #0 /var/www/html/faq/inc/libs/elasticsearch/src/Elasticsearch/Connections/Connection.php(632): Elasticsearch\Connections\Connection->tryDeserializeError(Array, 'Elasticsearch\\C...') #1 /var/www/html/faq/inc/libs/elasticsearch/src/Elasticsearch/Connections/Connection.php(553): Elasticsearch\Connections\Connection->tryDeserialize400Error(Array) #2 /var/www/html/faq/inc/libs/elasticsearch/src/Elasticsearch/Connections/Connection.php(262): Elasticsearch\Connections\Connection->process4xxError(Array, Array, Array) #3 /var/www/html/faq/inc/libs/react/promise/src/FulfilledPromise.php(25): Elasticse in /var/www/html/faq/inc/libs/elasticsearch/src/Elasticsearch/Connections/Connection.php on line 657

Is this permission issue?

Thanks,
Gibran
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Problem: activation elasticsearch

Post by Thorsten »

Hi,

did you successfully create a search index?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Problem: activation elasticsearch

Post by Thorsten »

Hi,

sorry, this is a bug in phpMyFAQ, our search query needs an update. You're using Elasticsearch 5, right?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
camel_Trophy
Posts: 41
Joined: Fri Feb 17, 2017 5:03 pm

Re: Problem: activation elasticsearch

Post by camel_Trophy »

Hello Thorsten,

Yes, using 5.2.

Should I downgrade to a different version of ES, or is there a quick workaround?

Thanks,

Gibran
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Problem: activation elasticsearch

Post by Thorsten »

Hi,

it will work with v2.x

I have to add some code to support Elasticsearch v5.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
camel_Trophy
Posts: 41
Joined: Fri Feb 17, 2017 5:03 pm

Re: Problem: activation elasticsearch

Post by camel_Trophy »

Thanks Thorsten.

I downgraded to 2.4.4, ES is working fine and all issues due to 5.2 have been resolved. I am golden now.

Gibran
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Problem: activation elasticsearch

Post by Thorsten »

Hi,

awesome!

Cheers
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
circa138
Posts: 29
Joined: Wed Mar 15, 2017 10:27 am

Re: Problem: activation elasticsearch

Post by circa138 »

Thorsten wrote:Hi,

no, don't move that file from admin to config!

Copy config/elasticsearch.php.original to config/elasticsearch.php. Then edit this file and enter the server address of the Elasticsearch instance. Then activate Elasticsearch in the admin search configuration and build a first search index under Admin -> Configuration -> Elasticsearch.

bye
Thorsten
Hello Thorsten,

ive just tried to create an index but getting the following Response instead:
✗ No handler found for uri [/] and method [PUT]
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Problem: activation elasticsearch

Post by Thorsten »

Hi,

is the IP and the port correct in the elasticseaerch.php file for your installation?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
circa138
Posts: 29
Joined: Wed Mar 15, 2017 10:27 am

Re: Problem: activation elasticsearch

Post by circa138 »

Hi Thorsten,

yes ip and port should be correct (added a screenshot).
You do not have the required permissions to view the files attached to this post.
Thorsten
Posts: 15559
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Problem: activation elasticsearch

Post by Thorsten »

Hi,

okay, please add a name for the index, e.g. "phpmyfaq" and for type e.g. "faqs"

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply