Blog Sections Open

Using ElasticSearch with MODX Data: Index Design and Mapping Basics

This early ElasticSearch note focused on the first hard part: not installation, but deciding how your MODX data should be shaped inside the index.

The original post was the first part of an ElasticSearch series and covered the real foundation work: installing ElasticSearch, understanding what an index and a type are, and deciding how data should be mapped before import.

Why the mapping step matters

Once content is indexed poorly, search becomes harder to fix later. The donor highlighted an important distinction between analyzed and not_analyzed string fields, along with the need to define dates and numeric values correctly instead of letting everything default to a generic text type.

Example index creation

curl -XPUT 'http://localhost:9200/modx_shop/'

Example mapping

curl -XPUT 'http://localhost:9200/modx_shop/towar_base/_mapping' -d '
{
  "towar_base": {
    "properties": {
      "user": {"type": "string", "index": "not_analyzed"}
    }
  }
}'

Main takeaway

If you want ElasticSearch to help a MODX project, treat indexing as data modeling, not as a last-minute export task. Search quality depends on what you decided to store, how you typed it, and which fields are allowed to behave like searchable text.

Source: original community announcement. Related docs: ElasticSearch reference.

Newer post

ddYMap 1.2: Better Defaults and Cleaner Map Integration

A release-oriented note on ddYMap 1.2 and the improvements it made to map defaults, jQuery integration, and document field handling.

Older post

MODX Installer: Early Notes on a Simpler Installation Flow

A historical ecosystem note on the early installer direction for MODX Evolution and the effort to make first-time setup less intimidating.