- External APIs
Simplifying Content Relationships with ElasticPress and Custom API Endpoints to Provide a Beautiful Search Experience
PIXACORE is an award-winning healthcare agency serving pharma, biotechnology, and medical device companies. PIXACORE partnered with Celgene Pharmaceuticals to create Bolder Science, a site where doctors and patients can search the US Government’s open-source clinical trials library to find the precise trial they need.
Seeking to create a world-class search experience for Celgene prior to participation in an upcoming medical conference, PIXACORE partnered with 10up to engineer a site search capable of handling complex search queries while delivering near-instant results. The search experience leverages Elasticsearch—the distributed, RESTful search and analytics engine, and ElasticPress, 10up’s fast and flexible search and query engine for WordPress.
Delivering Focused Results
10up first focused on improving the homepage search experience by crafting a REST API endpoint to quickly deliver search results in a clean, modern design. Each clinical trial is associated with taxonomies, such as location and phase, that correspond to search fields. As each field is selected, a visual representation of results, color-coded by status and phase, is updated in real-time. This enables site visitors to drill down from 300,000+ trials to a manageable result set in mere seconds.
Customizing The Search Experience
With the homepage endpoint complete, 10up’s web engineers built an advanced search page returning accurate data from nearly two dozen fields, such as date fields, text fields, data ranges, and radio button groups, each with several facets. The field inputs are merged into a single query, which ElasticPress translates into Elasticsearch JSON and the algorithm is customized to ensure results matching more important fields are prioritized over less significant ones.
Based on PIXACORE’s designs, 10up engineered custom landing pages that familiarize visitors with Celgene’s latest research and drug trials. 10up’s engineers reused components from the homepage search experience in order to provide a tailored solution with a rapid turnaround.
Syncing the ClinicalTrials.gov data to fuel a robust search experience meant working with more than 300,000 complex trial entries, each with around 200 content fields, which equates to 60+ million rows in the wp_postmeta table.
To manage the search data at scale, 10up built a custom syncing infrastructure to import the ClinicalTrials.gov data from the provided PostgreSQL database into WordPress. Upon import, each trial is put into a JSON object on the file system. ElasticPress then syncs the JSON files, automatically updating existing content and indexing new content on a daily basis.
10up also created a set of functions to “shim” Advanced Custom Fields (ACF) to allow Bolder Science to continue using ACF functions and pull from the raw JSON on the file system. This scalable architecture was delivered while maintaining backward compatibility to ensure teams working in parallel could move forward without refactoring code, keeping the project on schedule.
Delivering Expertise In Search
ElasticPress.io is the only fully-integrated, end-to-end SaaS solution that brings modern search functionality to WordPress using the power of Elasticsearch. As the architect of ElasticPress and the ElasticPress.io service, 10up was uniquely qualified to assist PIXACORE with their complex search challenges. ElasticPress.io offers plans for growing publishers, large sites, networks, and agencies managing multiple customers. A private cluster is available for large, high-traffic sites or those who desire a higher level of privacy and data security.