background preloader

Elasticsearch

Facebook Twitter

Elasticsearch: Five Things I was Doing Wrong | gibrown. Update: Also check out my series on scaling Elasticsearch. I’ve been working with Elasticsearch off and on for over a year, but recently I attended Elasticsearch.com’s training class (well worth the time and money) and discovered a few significant things that I was doing just plain wrong. Before using Elasticsearch I used Lucene directly, and so a few of the errors I made were due to not understanding some of the things ES does for you behind the scenes. As background, most of the data I’m indexing conforms to the WordPress database schema. 1. Use Arrays for Fields with Multiple Values For some reason I had neglected to use arrays when creating fileds such as a list of tags attached to a document. Or, for fields that were lists of URLs I just separated them by spaces and used the whitespace analyzer.

Using an array of items is a much easier way, but somehow, after initially reading about the array mapping, I completely forgot that it existed. 2. 3. 4. 5. Here’s where I went wrong. Related. Sphinx. Home - elasticsearch. Getting Started with elasticsearch and AngularJS: Part1 - Searching. The ability to deliver sophisticated client-side JavaScript applications is an important aspect of data discovery and visualization. It’s no secret that elasticsearch is phenomenal at extracting meaning from enormous data sets in near real-time. Exposing that power to end users requires equally impressive applications.

Elasticsearch has made search more approachable by exposing Web friendly APIs (REST + JSON) that reduce the impedance mismatch associated with relational models, at no sacrifice to query capability. On the other side of the equation, AngularJS simplifies the effort required to build highly interactive, data-driven Web applications. The goal here is to write a series of articles that help folks gain some insight into how these technologies fit together. I’ll start off with some basics behind AngularJS and build on that functionality in later articles. Getting Started Loading Data Application Module // app.jsangular.module('demo', []); Creating a Search Controller <! <! Wraping Up. Kennethreitz/heroku-elasticsearch.