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

"Amount of items indexed" not counting up #56

Closed
devnix opened this issue Feb 15, 2018 · 10 comments
Closed

"Amount of items indexed" not counting up #56

devnix opened this issue Feb 15, 2018 · 10 comments
Labels

Comments

@devnix
Copy link

devnix commented Feb 15, 2018

Hi there! We are trying to make the plugin work, but we are experiencing issues.

We have been able to connect the plugin with an Elasticsearch Docker instance, but the indexed items counter is not working, and there are no logs from the plugin. I have checked the Elasticsearch logs and founded the following logs

[2018-02-15T09:10:49,312][INFO ][o.e.c.m.MetaDataDeleteIndexService] [EKZkTij] [thirtybees_1_1/741Mm-ZwRzyjuoO55ojh0w] deleting index
[2018-02-15T09:10:49,469][INFO ][o.e.c.m.MetaDataCreateIndexService] [EKZkTij] [thirtybees_1_1] creating index, cause [api], templates [], shards [2]/[2], mappings [product]
[2018-02-15T09:10:51,704][WARN ][o.e.d.c.x.s.AbstractXContentParser] Expected a boolean [true/false] for property [activeproperty] but got [1]
[2018-02-15T09:10:51,704][WARN ][o.e.d.c.x.s.AbstractXContentParser] Expected a boolean [true/false] for property [activeproperty] but got [1]
[2018-02-15T09:10:51,709][WARN ][o.e.d.c.x.s.AbstractXContentParser] Expected a boolean [true/false] for property [activeproperty_agg] but got [1]
[2018-02-15T09:10:51,709][WARN ][o.e.d.c.x.s.AbstractXContentParser] Expected a boolean [true/false] for property [activeproperty_agg] but got [1]
[2018-02-15T09:10:51,745][INFO ][o.e.c.m.MetaDataMappingService] [EKZkTij] [thirtybees_1_1/X8HsQMMRT0K_quCPGMkYFQ] update_mapping [product]
[2018-02-15T09:10:51,785][WARN ][o.e.d.c.x.s.AbstractXContentParser] Expected a boolean [true/false] for property [activeproperty] but got [1]
[2018-02-15T09:10:51,787][WARN ][o.e.d.c.x.s.AbstractXContentParser] Expected a boolean [true/false] for property [activeproperty_agg] but got [1]
[2018-02-15T09:10:51,793][WARN ][o.e.d.c.x.s.AbstractXContentParser] Expected a boolean [true/false] for property [activeproperty] but got [1]
[2018-02-15T09:10:51,794][WARN ][o.e.d.c.x.s.AbstractXContentParser] Expected a boolean [true/false] for property [activeproperty_agg] but got [1]
[2018-02-15T09:10:51,892][WARN ][o.e.d.c.x.s.AbstractXContentParser] Expected a boolean [true/false] for property [activeproperty] but got [1]
[2018-02-15T09:10:51,893][WARN ][o.e.d.c.x.s.AbstractXContentParser] Expected a boolean [true/false] for property [activeproperty_agg] but got [1]
[2018-02-15T09:10:51,897][WARN ][o.e.d.c.x.s.AbstractXContentParser] Expected a boolean [true/false] for property [activeproperty] but got [1]
[2018-02-15T09:10:51,899][WARN ][o.e.d.c.x.s.AbstractXContentParser] Expected a boolean [true/false] for property [activeproperty_agg] but got [1]
[2018-02-15T09:10:51,905][WARN ][o.e.d.c.x.s.AbstractXContentParser] Expected a boolean [true/false] for property [activeproperty] but got [1]
[2018-02-15T09:10:51,906][WARN ][o.e.d.c.x.s.AbstractXContentParser] Expected a boolean [true/false] for property [activeproperty_agg] but got [1]
[2018-02-15T09:10:51,916][WARN ][o.e.d.c.x.s.AbstractXContentParser] Expected a boolean [true/false] for property [activeproperty] but got [1]
[2018-02-15T09:10:51,918][WARN ][o.e.d.c.x.s.AbstractXContentParser] Expected a boolean [true/false] for property [activeproperty_agg] but got [1]
[2018-02-15T09:10:51,922][WARN ][o.e.d.c.x.s.AbstractXContentParser] Expected a boolean [true/false] for property [activeproperty] but got [1]

(and the list continues.)

If I inspect the XHR petitions on the plugin I get a lot of requests to /index.php?controller=AdminModules&token=xxxxxxxxxxxxxxxxxxx&configure=elasticsearch&tab_module=front_office_features&module_name=elasticsearch&ajax=1&action=indexRemaining, all of them with the following result.

{
  "success":true,
  "indexed":0,
  "total":14841,
  "nbErrors":0,
  "errors":[]
}

Tried with 2.4.6 and 5.6.7 versions of Elasticsearch.

@Pharaoh2k
Copy link
Contributor

Pharaoh2k commented Aug 20, 2018

@devnix I have a similar (or maybe same issue) on a vanilla thirtybees 1.0.6 installation, using Elasticsearch version 6.3.2 for php 7+.
XHR finished loading: GET "https://..../index.php?controller=AdminModules&token=6c77f5aa67344cd534ce5135a352fdd5&configure=elasticsearch&tab_module=front_office_features&module_name=elasticsearch&ajax=1&action=indexRemaining"

Were you able to find the solution?
My XHR result shows:

{
  "success": true,
  "indexed": 0,
  "total": 8,
  "nbErrors": 8,
  "errors": [
    {
      "id_lang": 1,
      "id_shop": 1,
      "id_product": 1,
      "error": "failed to parse [activeproperty] Failed to parse value [1] as only [true] or [false] are allowed."
    },
    {
      "id_lang": 1,
      "id_shop": 1,
      "id_product": 2,
      "error": "failed to parse [activeproperty] Failed to parse value [1] as only [true] or [false] are allowed."
    },
    {
      "id_lang": 1,
      "id_shop": 1,
      "id_product": 3,
      "error": "failed to parse [activeproperty] Failed to parse value [1] as only [true] or [false] are allowed."
    },
    {
      "id_lang": 1,
      "id_shop": 1,
      "id_product": 4,
      "error": "failed to parse [activeproperty] Failed to parse value [1] as only [true] or [false] are allowed."
    },
    {
      "id_lang": 1,
      "id_shop": 1,
      "id_product": 5,
      "error": "failed to parse [activeproperty] Failed to parse value [1] as only [true] or [false] are allowed."
    },
    {
      "id_lang": 1,
      "id_shop": 1,
      "id_product": 6,
      "error": "failed to parse [activeproperty] Failed to parse value [1] as only [true] or [false] are allowed."
    },
    {
      "id_lang": 1,
      "id_shop": 1,
      "id_product": 7,
      "error": "failed to parse [activeproperty] Failed to parse value [1] as only [true] or [false] are allowed."
    },
    {
      "id_lang": 1,
      "id_shop": 1,
      "id_product": 8,
      "error": "failed to parse [activeproperty] Failed to parse value [1] as only [true] or [false] are allowed."
    }
  ]
}

Reported here too: https://forum.thirtybees.com/topic/1965/setting-up-elasticsearch-module/10
Thank you

@DaoKakao
Copy link

DaoKakao commented Sep 27, 2018

file classes/Fetcher.php, after line #377 i've inserted following code:

if ($product->active ==='1') 
{
    $product->active = true;
 }
else
{
    $product->active = false;
}

And indexing became working. The issue caused by reason the product's 'active' property stored in the database as '1' or '0', while elasticsearch requires 'true' or 'false' without quotes.

@nicdnepr
Copy link

Can use such code
$product->active = boolval($product->active);

@devnix
Copy link
Author

devnix commented Mar 27, 2019

Sorry for the so much late answer, I never got it to work @doclucas.

Seems like it was referenced here, and closed: thirtybees/thirtybees#754

Maybe this is working in a more recent version like 1.0.8? I'm not maintaining any ecommerce right now, and I'm a little bit busy to test it by myself.

If you report that it works with the latest version I will close this ticket @nicdnepr :-)

@nicdnepr
Copy link

I got such error failed to parse [activeproperty] Failed to parse value [1] as only [true] or [false] are allowed when use elastic 6
In elastic 5 no error

@devnix
Copy link
Author

devnix commented Mar 27, 2019

Ok, but what ThirtyBees version are you running?

@nicdnepr
Copy link

Last version ThirtyBees and elasticsearch v1

@nicdnepr
Copy link

@devnix btw what index speed you have? My speed is average 30 goods per second
You can answer here #64

@devnix
Copy link
Author

devnix commented Mar 27, 2019

As I said before, I'm not working with any ecommerce right now.

@getdatakick
Copy link
Contributor

This issue should be fixed now

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

No branches or pull requests

5 participants