Pew Research Center: External files as a source for your search


For a fact tank the size of the Pew Research Center, data can come from several different places. As some of those sources were external JSON and JavaScript files, they needed a solution to allow their users to search for their content. ElasticPress — the go-to solution to connect WordPress to Elasticsearch, enhancing search and providing better results — was a perfect fit for the project.


The team developed a new plugin that gets external files, either local or remote, syncs their content in Elasticsearch servers, and changes how the default search works, including in the searchable fields the one that contains the external file content.

Working with 10up was a pleasure. Their commitment to doing things “the WordPress way” from code quality, to performance, to extensibility, to functionality is exactly what we wanted when looking for outside development help. This new functionality for ElasticPress will enable our visitors to find content that is rich, informative, and historically has been hard to index. We’re excited to see the ROI on such content improve.

Seth Rubenstein, Lead Developer – Pew Research Center

The External Content feature is publicly available!

As openness is a pillar for Pew Research Center, they decided to open-source this solution. If you have a similar use case, you can now use the new External Content feature of our ElasticPress Labs plugin. This plugin has our experimental features, and this edge case was a better match for this new functionality.

Inside the feature’s settings, you can add a meta field that contains the path or the URL of the external content. During the sync process, ElasticPress will go through those fields, use the path or the URL to get the file’s content, and send it to Elasticsearch. Then, when a user searches for a term, the file content will be searched.

If you want to enhance your website search experience, providing better results and performance for your users, sign up for a trial or get in touch with us!