Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6671089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:20:46+00:00 2026-05-26T03:20:46+00:00

I have a requirement for uniqueness of a document in a RavenDb database. So

  • 0

I have a requirement for uniqueness of a document in a RavenDb database. So I followed the recomendation in docs –

http://ravendb.net/faq/unique-constraints

I also use the following code to get count of entities

public int GetCount<T>()
    {
        RavenQueryStatistics stats;
        _session.Query<T>().Customize(x=> x.WaitForNonStaleResultsAsOfLastWrite()).Statistics(out stats).Take(0).ToArray();
        return(stats.TotalResults);
        //IQueryable<T> queryable = from p in _session.Query<T>().Customize(x => x.WaitForNonStaleResultsAsOfLastWrite())
        //                          select p;
        //return queryable.Count();
    }

When I use my own ID like Docs/Doc_1 then the TotalResults in way higher than actual documents in the database. When I browse it in the studio the document lower than TotalResults but the collections show higher number corresponding to TotalResults.

Looking at the other fields in RavenQueryStatistics class I found SkippedResults the correct answer for count is always TotalResults – SkipperResults . I found the following link in the documents to explain SkipperResults but in my scenario it does not clarify.

http://ravendb.net/faq/skipped-results

I think I am missing some fundamental ravendb concept. Any body has had similar experience?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:20:47+00:00Added an answer on May 26, 2026 at 3:20 am

    That sounds strange, and shouldn’t really happen.
    Can you try creating a failing test for this and send that to the mailing list?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a requirement to implement an Unsaved Changes prompt in an ASP .Net
I have requirement to develop DMS(Document Managemen System) with some initial requirements: If possible
I have requirement where I need to allow users to upload a Word document
I have requirement to import Excel file in MySQL database using Java. I Googled
I have a requirement to create a multi level treeview in ASP.Net (with VB)
Hi: We have requirement to setup alert on a document library (alert to defined
In my iPhone app, I have requirement to search the SQLite database. I will
I have requirement of creating MS Project object in asp.net c# and exporting image
I have requirement to show the pdfs to the users via asp.net application. These
I have requirement to create an asp.net wizard control which will be re usable

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.