Help with mapping

(Sindre Sorhus) #1

Since our company's ActiveDirectory service is not indexed, I've given up on
using to search. I was really excited when I found how easy ES was, even
though lacking some documentation.

The plan is to dump some AD fields into ES and create a search interface for

Since I have never used ES before I was hoping for some guidance on how to
map and analyze some fields.

Example doc:

What's the best way to map the "office" field. The field always consist of
the location and then the office. Should I parse it beforehand and save it
as an array, or is there a tokenizer for this?

Same with "job_phone" (internal/external number) and "tags", should I parse
it first or is there a tokenizer or another method for doing this?

On the "department" field I think the "whitespace" analyzer fits.

Any other thoughts, recommendations?

(Jan Fiedler) #2

Selecting the right analyzer very much depends on your search use cases
(e.g. do you want to find documents based on an office location (or must the
office be provided as well)). ElasticSearch has many analyzers and filters
to choose from. For your purposes you probably want to take a look at

Make sure you read the good user guide section on the analysis index module
( and
try out your configurations with the analyze API (

(system) #3