ruby on rails - ElasticSearch behaves different in production environment -


i have added new search box application. works in development, same feature doesn't work on staging or production environment. missing out, please?

i using elasticsearch. have run bundle exec rake users:index. have compared mappings file (elastic_search_mapping.json) on development , staging. there no difference between them.

issue

the development , staging database in-sync. however, same elasticsearch query returns no results on staging whilst, development gets bunch of results.

gotcha: staging environment returns result when exact matching of query has been found. in order words, not allow fuzzy searching.

plea

can point i'm failing please?

   ## on development     ⤷  curl -v http://localhost:9200/red_development/users/_count?pretty -d '{       "query": {         "match": {           "registered_name": "sbn"         }       }     }'      *   trying 127.0.0.1...     * connected localhost (127.0.0.1) port 9200 (#0)     > post /red_development/users/_count?pretty http/1.1     > host: localhost:9200     > user-agent: curl/7.49.1     > accept: */*     > content-length: 72     > content-type: application/x-www-form-urlencoded     >     * upload sent off: 72 out of 72 bytes     < http/1.1 200 ok     < content-type: application/json; charset=utf-8     < content-length: 95     <     {       "count" : 3,       "_shards" : {         "total" : 5,         "successful" : 5,         "failed" : 0       }     }     * connection #0 host localhost left intact 

this results running same results on staging. returns no results.

    ## on staging     ⤷  curl -v https://xxxxx:xxxxx@foofoo5625275.eu-west-1.bonsai.io/red_production/users/_count?pretty -d '{      >   "query": {     >     "match": {     >       "registered_name": "sbn"     >     }     >   }     > }'     *   trying xx.yy.zzz.aaa...     * connected foofoo5625275.eu-west-1.bonsai.io (xx.yy.zzz.aaa) port 443 (#0)     * tls 1.2 connection using tls_ecdhe_rsa_with_aes_128_gcm_sha256     * server certificate: eu-west-1.bonsai.io     * server certificate: amazon     * server certificate: amazon root ca 1     * server certificate: starfield services root certificate authority - g2     * server auth using basic user 'xxxxxx'     > post /red_production/users/_count?pretty http/1.1     > host: foofoo5625275.eu-west-1.bonsai.io     > authorization: basic ada2czq0zm1ycq==     > user-agent: curl/7.49.1     > accept: */*     > content-length: 72     > content-type: application/x-www-form-urlencoded     >     * upload sent off: 72 out of 72 bytes     < http/1.1 200 ok     < content-type: application/json; charset=utf-8     < server: nespr 1.1     < x-bonsai-backend: xx.yy.zzz.aaa     < x-queue-duration: 0     < x-request-duration: 3     < x-request-id: 0922c231-44d8-4720-b3b1-df113bb8434f     < content-length: 95     < connection: keep-alive     <     {       "count" : 0,       "_shards" : {         "total" : 1,         "successful" : 1,         "failed" : 0       }     }     * connection #0 host foofoo5625275.eu-west-1.bonsai.io left intact 

from comment: "gotcha: staging environment returns result when exact matching of query has been found. in order words, not allow fuzzy searching"

it seems me runtime mapping might different; compare:

http://localhost:9200/_mapping on both clusters. (replace correct address/port)


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -