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

  • SEARCH
  • Home
  • 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 7567183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:36:06+00:00 2026-05-30T14:36:06+00:00

In the RavenDB Studio, I can see 69 CustomVariableGroup documents. My query only returns

  • 0

In the RavenDB Studio, I can see 69 CustomVariableGroup documents. My query only returns 66 of them. After some digging, I see that the three docs that are not returned have the new class structure: a property was removed. Since I saved these three CustomVariableGroup documents, their structure is different from the other 66. Why though, when I query for all of them, do I only get the other 66 documents with the old structure?

Both my C# code, and my query in LinqPad, only return the 66. Here’s the LinqPad query:

Session.Query<CustomVariableGroup>().Dump();  // returns 66 docs

But, if I do this, I can get one of the three documents that is missing from the above query:

Session.Query<CustomVariableGroup>().Where(x => x.Name == "Derating").Dump();

How can I get all 69 documents returned in one query?

** Edit: Index Info **

In the SQL tab of the LinqPad query (and in the Raven server output), the index looks like this:

Url: /indexes/dynamic/CustomVariableGroups?query=&start=0&pageSize=128&aggregation=None

I don’t see that index in Raven Studio, presumably because it’s dynamic.

** Edit 2: This HACK works **

If I do this, I get all 69 documents:

Session.Query<CustomVariableGroup>().Where(x => x.Name != string.Empty).Dump();

My guess is that Raven must be using an old index that only gets documents that still contain that deleted column. I somehow need to use a new/different index…

Interestingly, this does not work; it only returns 66:

Session.Query<CustomVariableGroup>().Where(x => x.Id != string.Empty).Dump();

** Edit 3: This HACK works as well **

Session.Advanced.LuceneQuery<CustomVariableGroup>("Raven/DocumentsByEntityName").Where("Tag:CustomVariableGroups").Dump();
  • 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-30T14:36:07+00:00Added an answer on May 30, 2026 at 2:36 pm

    An index, with the old property, had to be removed.

    ** Before ** This didn’t work (only returned 66 of the 69 documents):

    Session.Query<CustomVariableGroup>().Dump();
    

    ** Fix ** Delete index that used the old property that was deleted from my C# class:

    In Raven Studio, I deleted this index: Auto/CustomVariableGroups/ByApplicationId

    ** After ** This same query now returns all 69 documents:

    Session.Query<CustomVariableGroup>().Dump();
    

    Now, I’m not sure why these queries would use that index. I’m querying for all CustomVariableGroup documents, and not ByApplicationId. However, removing that index fixed it. I’m sure someone else can explain why.

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

Sidebar

Related Questions

I'm playing around some with RavenDb and documents. Let's say that I got the
I have some behavior that I don't understand. I'm using RavenDB, and I'm using
The question I have is that of securing documents across services using RavenDb and
I started using RavenDB today. When I save a class, I can see the
I have JSON documents in RavenDB that are in this format. { Privilege: [
This query was working for me until recently. I now have 135 InstallationSummary documents
For every RavenDb Index field I can specify Storage, Sorting, Indexer and Analyzer. In
When performing a dynamic query, RavenDB will typically create a temp index. Retrieving document
When I click on New Document in the Raven DB Management Studio, I see
In RavenDB, I have a document that looks like this: public class SystemNotification {

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.