samedi 11 juillet 2015

Rails Chewy (ElasticSearch) and limit

I am facing a problem and do not know what might be happening. I have this query:

all = index.query(query_string: {fields: [:company_id],
              query: current_user_company_id}
            ).limit(get_limit)

Considere get_limit equal 2.

When I execute it, I always get corrects results, lets say:

Test 1
Teste 2

Then I apply some query on all:

all.filter { name == 'ana'}

And I receive the result, once ana don't be present on all

Any idea here? Thanks in advance

Aucun commentaire:

Enregistrer un commentaire