How to store a string without it being parsed (C# / .NET)

I have IDs which as GUIDs like this:

ee69cfc0-7750-2b6e-4c95-15fe5e26eec7

but I see that ElasticSearch stores it like that:

"7750" "15fe5e26eec7" "2b6e" "4c95" "ee69cfc0"

I have tried:

   [String(Index = FieldIndexOption.No)]
  public string Id                        { get; set; }

and

   [String(Index = FieldIndexOption.NotAnalyzed)]
   public string Id                        { get; set; }

but the result is the same..

The latter should work (I'm not familiar with the C# API but "not analyzed" is the right keyword), but keep in mind that you can't change the existing mapping of a field. You have to reindex the data.

Yes, I have cleared the DB every time as I am working on a small local set of data.

NotAnalyzed will still do the split at the '-' symbol.

The problem is that if a string like:

ee69cfc0-7750-2b6e-4c95-15fe5e26eec7

gets split to:

"7750" "15fe5e26eec7" "2b6e" "4c95" "ee69cfc0"

then '7750' becomes a match.

Not analyzed means that it will be indexed as is without any transformation.

You might have another issue here.