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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:19:15+00:00 2026-06-06T02:19:15+00:00

I am really new to the programming but I am studying it. I have

  • 0

I am really new to the programming but I am studying it. I have one problem which I don’t know how to solve.
I have collection of docs in mongoDB and I’m using Elasticsearch to query the fields. The problem is I want to store the output of search back in mongoDB but in different DB. I know that I have to create temporary DB which has to be updated with every search result. But how to do this? Or give me documentation to read so I could learn it. I will really appreciate your help!

  • 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-06-06T02:19:22+00:00Added an answer on June 6, 2026 at 2:19 am

    Mongo does not natively support “temp” collections.

    A typical thing to do here is to not actually write the entire results output to another DB since that would be utterly pointless since Elasticsearch does its own caching as such you don’t need any layer over the top.

    As well, due to IO concerns it is normally a bad idea to write say a result set of 10k records to Mongo or another DB.

    There is a feature request for what you talk of: https://jira.mongodb.org/browse/SERVER-3215 but no planning as of yet.

    Example

    You could have a table of results.

    Within this table you would have a doc that looks like:

    {keywords: ['bok', 'mongodb']}
    

    Each time you search and scroll through each result item you would write a row to this table populating the keywords field with keywords from that search result. This would be per search result per search result list per search. It would probably be best to just stream each search result to MongoDB as they come in. I have never programmed Python (though I wish to learn) so an example in pseudo:

    var elastic_results = [{'elasticresult'}];
    foreach(elastic_results as result){
        //split down the phrases in this result and make a keywords array
        db.results_collection.insert(array_formed_from_splitting_down_result); // Lets just lazy insert no need for batch or trying to shrink the amount of data to one go or whatever, lets just stream it in.
    }
    

    So as you go along your results you basically just mass insert as fast a possible create a sort of “stream” of input to MongoDB. It can do this quite well.

    This should then give you a shardable list of words and language verbs to process things like MRs on and stuff to aggregate statistics about them.

    Without knowing more and more about your scenario this is pretty much my best answer.

    This does not use the temp table concept but instead makes your data permanent which is fine by the sounds of it since you wish to use Mongo as a storage engine for further tasks.

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

Sidebar

Related Questions

Ok, so I'm REALLY new to programming and javascript, but I'm having a problem
Very new to web programming still and I don't really have a specific question
This is a kind of a newb question but I'm really new to programming
I'm new in programming windows phone 7 but get really tired cuz i spend
I'm fairly new to Objective-C and cocoa programming, so I don't really understand the
I'm relatively new to iPhone programming but have read my way through a hefty
Im new to PHP Object Oriented Programming but I know to code in procedural
I'm really new to programming in Objective-C, my background is in labview which is
I am new to C++ network programming but have experience with Java sockets etc.
I am new in programming and this question may really be stupid but I

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.