Category: elasticsearch
-
Elasticsearch type gotcha
I recently was working on updating some elasticsearch tests we have for WordPress.com. We have so-called isolated tests, which use a real MySQL database and a real Elasticsearch test cluster. We create sample blogs, posts, and so forth, store them in the database, which triggers our hooks for indexing into Elasticsearch, and then we make…
-
Closures in PHPUnit dataProviders
Today I was working on a PHPUnit test at work for testing Elasticsearch. In this case, I wanted to make sure that the data that I was indexing was findable. Basically I wanted to run a search for a given query and check that the results were as expected. I wanted to run this search…


