Bo Andersen
I am a back-end web developer with a passion for open source technologies. I have been a PHP developer for many years, and also have experience with Java and Spring Framework. I currently work full time as a lead developer. Apart from that, I also spend time on making online courses, so be sure to check those out!
Posts by Bo Andersen
Updating Documents
Now instead of replacing a document, often times you will want to update it with some new information. Instead of replacing our entire product in order to change the price, we can just… well, change the price! This means that we don’t have to supply all of the fields again, but that we only have to pass in… read more
Replacing Documents
In this part of the series, I will show you how you can easily replace a document within an index. In fact, the way to do this is identical to how you add a document to an index. Therefore, what you have to do, is to issue a PUT request with the document as JSON. PUT… read more
Adding Documents to an Index
To add a document to our Elasticsearch index, let’s open Sense and issue a PUT request. When adding a document to an index, it is optional if you want to supply an ID for the document. If the ID is omitted, then Elasticsearch will generate a random ID and then use it to index the… read more
Adding Test Data
Now that we have added mappings to our index, let’s add some test data to it so that we have some data to search in the remainder of the series. To do this, I will open up the terminal and issue an HTTP request with cURL, where I will be importing a JSON file. You… read more
Adding Mappings
Now we are going to add a mapping to our ecommerce index. To do that, we are first going to remove the index and add it once again with the mapping. The reason why we are doing this, is that if you have data in an index, then you need to create a new index and… read more
Meta Fields
Now that we have taken a look at field data types, it is time to talk about meta fields. Introduction to Meta Fields So, just what are meta fields? Each document that is indexed in Elasticsearch has metadata associated with it. The names of these fields are prefixed with an underscore, and some of them… read more
Field Data Types
Having introduced mapping, we will now go into a bit of more detail about data types. There are four categories of data types in Elasticsearch, namely core data types, complex data types, geo data types and specialized data types, which we will all take a look at now. Feel free to skip this article and move… read more
Introduction to Mapping
In this part of the series, we will be talking about mapping in Elasticsearch. I will introduce mapping as well as cover dynamic and explicit mapping. What is Mapping in Elasticsearch? Like I briefly mentioned in the article about Elasticsearch terminology, mapping describes how documents and their fields are indexed and stored. This typically involves defining the… read more
Deleting an Index
Now that we have created an index, let’s see how we can delete an index. In fact, we are going to delete the index that we created in the previous article in this series and add it again later. Open the Sense plugin for Kibana and simply issue the below request to delete the index. DELETE /ecommerce Let’s ensure… read more
Installing Sense for Kibana on OS X
Sense is a Kibana plugin that enables one to quickly and easily issue requests to an Elasticsearch cluster. This is done without using a third party tool such as cURL. Sense conveniently includes IntelliSense, helping you remember the appropriate syntax for requests. Let’s see how we can install Sense on OS X. If you are not on… read more