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 6763011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:25:34+00:00 2026-05-26T14:25:34+00:00

Given a document structure that has say 15 properties, and 3 IEnumerable properties where

  • 0

Given a document structure that has say 15 properties, and 3 IEnumerable properties where every such property can have upto 20 values..

when I have 50,000 such documents in raven, given the user can build a criteria by providing values against 7 or so properties..

and say 30 unique searches are performed repeatedly most often, and on an average a user will page through five pages for each search performed.

Now say I find 7000 results matching some criteria constructed by the user, if I choose to retrieve all the 7000 ids matching the criteria (continually skip take to retrieve all I imagine), and then hash the criteria and use it as a key to store the 7000 values in memcached, then when the same criteria is searched for again, I can simply retrieve the ids from the cache, get the 10 ids for the page the user is on, and load results by id from raven. Also when they page, I can choose to not perform the same search again with skip and take, but simply go to the cache and get ids for the next page go to raven for load.

In other words for every criteria not searched before, we perform the search, retrieve matching ids, cache them against the criteria hashed as key, then when a user pages that search result or another user performs the same search, we simply go to raven to load by ids that we can retrieve from memcached by looking up the hashed criteria as key.

Does this approach give me any dividends over just doing the search all the time, skip take when required to page, and let raven do the magic of reusing dynamic indexes when searches are reused?

Note: I am using the LINQ api.

  • 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-26T14:25:35+00:00Added an answer on May 26, 2026 at 2:25 pm

    You are talking about building your own index. It doesn’t matter if you use memcached or whatever technology to store your index, it will be just that -> an index.

    Lucene.NET has been heavily optimized to be very fast on queries like the one you described, so chances are low you will do better. You need consider very difficult scenarious like stale indexes, concurrency etc. Even if you could do better, is it really worth? I mean wouldn’t it be much cheaper just to put another CPU into your machine if you want your searches to perform faster?

    To be clear – yes, I absolutely do think you should use the standard LINQ api and let RavenDB create dynamic indexes. If they are used really that often, RavenDB will promote them as permanent indexes very soon.

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

Sidebar

Related Questions

I have a given XML document (structure can not be changed) and want to
I have been given two different Microsoft Word document that my virus scanner has
Say I have the given document structure in RavenDb public class Car { public
I have an xml sitemap structured like a document tree, such that it looks
I have a document structure JobData that stores time based data starting from time
I have an XML document that contains the following structure: Its more or less
I have a CSV document that is of the following structure Headers Path,Publish,Hashlist,Package Content
Given that: DataTemplates cannot be assigned by TargetType StaticResource references can only reference previously
Given that I have some number of documents in my CouchDB database, I would
Say you have a bunch of files. Say you can store meta data to

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.