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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:38:23+00:00 2026-05-31T03:38:23+00:00

In my current project, users can like songs, and now I’m going to add

  • 0

In my current project, users can like songs, and now I’m going to add a song search so that a user can search for some song she has liked before.

I have implemented search engines using xapian before, which involves building indexes of documents periodically.

In my case, do I have to build indexes for every user’s songs independently?

If I want the search results to be more real-time, does this mean that I need to build indexes incrementally every short period of time?

  • 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-31T03:38:25+00:00Added an answer on May 31, 2026 at 3:38 am

    To take your questions separately.

    Do I have to build indexes for every user’s songs independently?

    No; a common technique for this kind of situation is to index each like separately with both the information about the song and additionally the identifier of the user. Then when you search, you want to filter the results of the user’s natural text search by the user identifier who’s actually logged in.

    In Xapian you’d do this by adding a term representing the user (with a suitable prefix, so you might have XU175 for a user with id 175, perhaps), and then using OP_FILTER to restrict the search to just likes by the logged-in user.

    Do I need to build indexes incrementally every short period of time [to support real-time indexing]?

    This is entirely dependent on the search system you’re using. With Xapian you can either do that and periodically ‘compact’ the databases generated into one base one; or you can index live into the database — although since Xapian is single-writer, you’d want to find a way of serialising this, such as by putting new likes onto a queue and having a single process that pops them off and indexes into the database. One largely off-the-shelf solution to this would be to use Restpose, written by one of the Xapian developers, which fills the same sort of role as Solr does for Lucene.

    You can also get fancier by indexing into one database, then replicating that to another and searching the replicated version, which also gives you options to scale horizontally in future. There’s a discussion of replication in the Xapian documentation.

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

Sidebar

Related Questions

I am current working on a project where, as different users add text to
For my current project in codeignitor I needed to make user profile like this
In our current project we are providing a PDF download that can be customized
In my current project, we use lots of user controls. Large user controls (500+
I'd like to access the name of a SBT project that uses a plugin
I'm currently modelling the user profile of my current project (in Rails btw). The
I'm working on a project (using flash builder 4.5) where a user can click
I've been using a bitmask in a current project for keeping track of user
I was just thinking about the URLs of my current web project. The user
In my project an User can create a Customer and assigning it zero or

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.