Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search result always empty #22

Closed
kw-pr opened this issue Mar 5, 2015 · 11 comments
Closed

Search result always empty #22

kw-pr opened this issue Mar 5, 2015 · 11 comments

Comments

@kw-pr
Copy link
Contributor

kw-pr commented Mar 5, 2015

I guess this is a noob question but after I fixed all problems and and no log shows any erros. I get a search result it is always empty.

Do I need to fill elasticsearch somehow? What is index name does this plugin use?

@ctasca
Copy link
Owner

ctasca commented Mar 5, 2015

Did you index data in Elasticsearch? You do so by re-indexing catalog and catalogsearch in Magento

@kw-pr
Copy link
Contributor Author

kw-pr commented Mar 5, 2015

Yes, complett reindex. I also disabled the other extension that my produce a conflict. But good to know that this should work. Thanks. I keep digging.

@ctasca
Copy link
Owner

ctasca commented Mar 5, 2015

Did u enable Elasticsearch engine?

@kw-pr
Copy link
Contributor Author

kw-pr commented Mar 6, 2015

Yes I did. The shop contained an old elasticsearch extension (JR_Search). If I disable it and enable yours, switch engine, clear cache and rebuild index I get

# php indexer.php --reindex catalogsearch_fulltext
Segmentation fault

@ctasca
Copy link
Owner

ctasca commented Mar 6, 2015

What version of Elasticsearch you use?

@kw-pr
Copy link
Contributor Author

kw-pr commented Mar 6, 2015

Version 1.4.4

# curl -XGET '127.0.0.1:9200'
{
  "status" : 200,
  "name" : "The Wink",
  "cluster_name" : "elasticsearch",
  "version" : {
    "number" : "1.4.4",
    "build_hash" : "c88f77ffc81301dfa9dfd81ca2232f09588bd512",
    "build_timestamp" : "2015-02-19T13:05:36Z",
    "build_snapshot" : false,
    "lucene_version" : "4.10.3"
  },
  "tagline" : "You Know, for Search"
}

Also there is no index created

# curl http://127.0.0.1:9200/_aliases?pretty=1
{ }

I thought about installing xdebug but this would force me to update php and I am not willing to update and test the whole system at this moment.

Not sure what I do now. Maybe I just buy a commercial extension with install service...

@kw-pr kw-pr closed this as completed Mar 6, 2015
@ctasca
Copy link
Owner

ctasca commented Mar 6, 2015

I developed the module on elasticsearch-1.1.1. Can you give it a try with
that version?

On Fri, Mar 6, 2015 at 10:44 AM, kw-pr notifications@github.com wrote:

Version 1.4.4

curl -XGET '127.0.0.1:9200'

{
"status" : 200,
"name" : "The Wink",
"cluster_name" : "elasticsearch",
"version" : {
"number" : "1.4.4",
"build_hash" : "c88f77ffc81301dfa9dfd81ca2232f09588bd512",
"build_timestamp" : "2015-02-19T13:05:36Z",
"build_snapshot" : false,
"lucene_version" : "4.10.3"
},
"tagline" : "You Know, for Search"
}

Also there is no index created

curl http://127.0.0.1:9200/_aliases?pretty=1

{ }

I thought about installing xdebug but this would force me to update php
and I am not willing to update and test the whole system at this moment.

Not sure what I do now. Maybe I just buy a commercial extension with
install service...


Reply to this email directly or view it on GitHub
#22 (comment)
.

Kind Regards

Carlo Tasca

@kw-pr kw-pr reopened this Mar 6, 2015
@kw-pr
Copy link
Contributor Author

kw-pr commented Mar 6, 2015

Same problem with 1.1.1

# curl -XGET '127.0.0.1:9200'
{
  "status" : 200,
  "name" : "Ahmet Abdol",
  "version" : {
    "number" : "1.1.1",
    "build_hash" : "f1585f096d3f3985e73456debdc1a0745f512bbc",
    "build_timestamp" : "2014-04-16T14:27:12Z",
    "build_snapshot" : false,
    "lucene_version" : "4.7"
  },
  "tagline" : "You Know, for Search"
}

# php indexer.php --reindex catalog_category_product
Category Products index was rebuilt successfully

srv02 shell # php indexer.php --reindex catalogsearch_fulltext
Segmentation fault

It it possible another extension causing this problem but my guess would be the PHP version. Next step would be xdebug to get a trace.

@kw-pr
Copy link
Contributor Author

kw-pr commented Mar 6, 2015

ok, I managed to get xdebug running. trace ends with this:

    1.9276   18358744                                                                     -> Symfony\Component\EventDispatcher\EventDispatcher->addSubscriber() /httpdocs/app/code/community/Pocketphp/Elasticsearch/lib/Pocketphp/Guzzle/Common/AbstractHasDispatcher.php:45
    1.9276   18358744                                                                       -> Guzzle\Http\RedirectPlugin::getSubscribedEvents() /httpdocs/app/code/community/Pocketphp/Elasticsearch/lib/Pocketphp/Symfony/Component/EventDispatcher/EventDispatcher.php:122
    1.9276   18360088                                                                       -> is_string() /httpdocs/app/code/community/Pocketphp/Elasticsearch/lib/Pocketphp/Symfony/Component/EventDispatcher/EventDispatcher.php:123
    1.9276   18360088                                                                       -> is_string() /httpdocs/app/code/community/Pocketphp/Elasticsearch/lib/Pocketphp/Symfony/Component/EventDispatcher/EventDispatcher.php:125
    1.9277   18360480                                                                       -> Symfony\Component\EventDispatcher\EventDispatcher->addListener() /httpdocs/app/code/community/Pocketphp/Elasticsearch/lib/Pocketphp/Symfony/Component/EventDispatcher/EventDispatcher.php:126
    1.9277   18361624                                                                       -> is_string() /httpdocs/app/code/community/Pocketphp/Elasticsearch/lib/Pocketphp/Symfony/Component/EventDispatcher/EventDispatcher.php:123
    1.9277   18361968                                                                       -> Symfony\Component\EventDispatcher\EventDispatcher->addListener() /httpdocs/app/code/community/Pocketphp/Elasticsearch/lib/Pocketphp/Symfony/Component/EventDispatcher/EventDispatcher.php:124
    1.9277   18362736                                                                       -> is_string() /httpdocs/app/code/community/Pocketphp/Elasticsearch/lib/Pocketphp/Symfony/Component/EventDispatcher/EventDispatcher.php:123
    1.9277   18363080                                                                       -> Symfony\Component\EventDispatcher\EventDispatcher->addListener() /httpdocs/app/code/community/Pocketphp/Elasticsearch/lib/Pocketphp/Symfony/Component/EventDispatcher/EventDispatcher.php:124
    1.9277   18362336                                                           -> array_merge() /httpdocs/app/code/community/Pocketphp/Elasticsearch/lib/Pocketphp/Elasticsearch/Common/DICBuilder.php:324
    1.9277   18362288                                                     -> Elasticsearch\Pimple->offsetGet() /httpdocs/app/code/community/Pocketphp/Elasticsearch/lib/Pocketphp/Elasticsearch/Transport.php:195
    1.9277   18362336                                                       -> array_key_exists() /httpdocs/app/code/community/Pocketphp/Elasticsearch/lib/Pocketphp/Elasticsearch/Pimple.php:77
    1.9277   18362336                                                       -> is_object() /httpdocs/app/code/community/Pocketphp/Elasticsearch/lib/Pocketphp/Elasticsearch/Pimple.php:81
    1.9277   18362416                                                       -> method_exists() /httpdocs/app/code/community/Pocketphp/Elasticsearch/lib/Pocketphp/Elasticsearch/Pimple.php:81
    1.9278   18362336                                                     -> Elasticsearch\Pimple->offsetGet() /httpdocs/app/code/community/Pocketphp/Elasticsearch/lib/Pocketphp/Elasticsearch/Transport.php:196
    1.9278   18362384                                                       -> array_key_exists() /httpdocs/app/code/community/Pocketphp/Elasticsearch/lib/Pocketphp/Elasticsearch/Pimple.php:77
    1.9278   18362384                                                       -> is_object() /httpdocs/app/code/community/Pocketphp/Elasticsearch/lib/Pocketphp/Elasticsearch/Pimple.php:81
    1.9278   18362464                                                       -> method_exists() /httpdocs/app/code/community/Pocketphp/Elasticsearch/lib/Pocketphp/Elasticsearch/Pimple.php:81

18362464 Bytes = ~18MB so this should not be a memory problem.

I think line numbers are a little bit of...

The trace is here in Elasticsearch\Transport->setConnections() => Elasticsearch\Transport->hostsToConnections(). From here it get's the Pimple to create a connection. One of the offsetGet is a factory but calling the function leads to the segmentation fault.

@kw-pr kw-pr closed this as completed Mar 9, 2015
@kw-pr
Copy link
Contributor Author

kw-pr commented Mar 9, 2015

I did not have the time to dig deeper into this but I am pretty sure it's a PHP version problem.

I used this old plugin https://github.com/jreinke/magento-elasticsearch and a very old elasticsearch but that worked like charm: www.elasticsearch.org/downloads/0-20-6/

@ctasca
Copy link
Owner

ctasca commented Mar 9, 2015

I haven't had the time to look into it, but never had problems indexing
data into ES cluster and I did develop the extension on 1.7 version.

On Mon, Mar 9, 2015 at 8:21 AM, kw-pr notifications@github.com wrote:

I did not have the time to dig deeper into this but I am pretty sure it's
a PHP version problem.

I used this old plugin https://github.com/jreinke/magento-elasticsearch
and a very old elasticsearch but that worked like charm:
www.elasticsearch.org/downloads/0-20-6/


Reply to this email directly or view it on GitHub
#22 (comment)
.

Kind Regards

Carlo Tasca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants