Skip to content

Commit

Permalink
Adding LastModified field to Raven/DocumentsByEntityName index
Browse files Browse the repository at this point in the history
  • Loading branch information
ayende committed Jun 26, 2011
1 parent 9144575 commit 6b2a8ed
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
14 changes: 11 additions & 3 deletions Raven.Client.Lightweight/Indexes/RavenDocumentsByEntityName.cs
Expand Up @@ -26,9 +26,17 @@ public override IndexDefinition CreateIndexDefinition()
Map = @"from doc in docs Map = @"from doc in docs
let Tag = doc[""@metadata""][""Raven-Entity-Name""] let Tag = doc[""@metadata""][""Raven-Entity-Name""]
where Tag != null where Tag != null
select new { Tag };", select new { Tag, LastModified = doc[""@metadata""][""Last-Modified""] };",
Indexes = {{"Tag", FieldIndexing.NotAnalyzed}}, Indexes =
Stores = {{"Tag", FieldStorage.No}} {
{"Tag", FieldIndexing.NotAnalyzed},
{"LastModified", FieldIndexing.NotAnalyzed}
},
Stores =
{
{"Tag", FieldStorage.No},
{"LastModified", FieldStorage.No}
}
}; };
} }
} }
Expand Down
14 changes: 11 additions & 3 deletions Raven.Database/Plugins/Builtins/CreateSilverlightIndexes.cs
Expand Up @@ -19,9 +19,17 @@ public void SilverlightWasRequested(IResourceStore resourceStore)
@"from doc in docs @"from doc in docs
let Tag = doc[""@metadata""][""Raven-Entity-Name""] let Tag = doc[""@metadata""][""Raven-Entity-Name""]
where Tag != null where Tag != null
select new { Tag };", select new { Tag, LastModified = doc[""@metadata""][""Last-Modified""] };",
Indexes = { { "Tag", FieldIndexing.NotAnalyzed } }, Indexes =
Stores = { { "Tag", FieldStorage.No } } {
{"Tag", FieldIndexing.NotAnalyzed},
{"LastModified", FieldIndexing.NotAnalyzed}
},
Stores =
{
{"Tag", FieldStorage.No},
{"LastModified", FieldStorage.No}
}
}); });
} }


Expand Down

0 comments on commit 6b2a8ed

Please sign in to comment.