1

I am trying to get the fields of my index using the below code snippet.

var fieldsList= DocumentStore.DatabaseCommands.GetIndex("IndexName").Fields.ToList();

This is returning a string list with all fields defined in the index except the dynamic fields ( fields returned from _ ).

Here is the Map command for my index.

Map = products => 
    from product in product s
    select new
    {
        product.Title,
        product.Subject,
        product.From,
        _ = product.
            Attributes.Select(attribute => 
                    CreateField(attribute.Name, attribute.Value, false, true))
    };
nathanchere
  • 8,008
  • 15
  • 65
  • 86

1 Answers1

0

That is by design. The list of fields is the static fields that are in your index. We don't try to find the dynamic ones.

Ayende Rahien
  • 22,925
  • 1
  • 36
  • 41
  • Thanks for the reply. But when I look into the choose columns wizard in Raven studio once after executing the index, I am able to see all the fields in the select box. Please let us know if there is any way to retrieve those columns list through code. – dkchittimilla Oct 11 '13 at 04:37