I need to get a document graph in a specific collection:
There is an existing Raven / DocumentCollections index that stores the account and name of the collection, paired with the actual documents that belong to the collection. I would like to select an account from this index, if possible.
The following is the Map-Reduce index of the Raven / DocumentCollections index:
from doc in docs
let Name = doc["@metadata"]["Raven-Entity-Name"]
where Name != null
select new { Name , Count = 1}
from result in results
group result by result.Name into g
select new { Name = g.Key, Count = g.Sum(x=>x.Count) }
On the side, the note var Count = DocumentSession.Query<Post>().Count();always returns 0 as the result for me, although it’s clear that there are 500 odd documents in my database, and 50 of them have “Raven-Entity-Name” in their metadata as “Posts”, I absolutely don’t know why this Count query returns 0 as an answer. Raven magazines show this when Count is done
Request