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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:18:52+00:00 2026-06-08T04:18:52+00:00

We are using Solr for it’s full text search capability, lets say we are

  • 0

We are using Solr for it’s full text search capability, lets say we are indexing the text of various news articles.

Searching through all of the articles is as simple as simple can be; however, users can ‘like’ articles they find interesting.

I am attempting to implement a feature where each user can search through their ‘like history.’

I have come up with several possible methods of doing this, but I do not how to practically implement any of them, if they are even possible to implement and have absolutely no idea which would be the best in terms of performance and efficiency.

1) The first method I have come up with is to use a separate MySQL database in which each row holds the id of the user and the article liked by the user.

A query can be made to the MySQL table to return the article id’s liked by any user, but how would one go about narrowing Solr’s search results to only return articles with the ids retrieve from the MySQL database?

2) The only other way I could figure out would be to create a duplicate document in another Solr core with an added user_id field each time a user likes an article; however, if 100,000 or so users each like 100-1,000 articles, this would consume an unnecessary amount of storage space.

Another problem with this second method is that if the text of the original article is changed, updating each related document for each user who liked the article becomes another cumbersome issue that must be dealt with.

3) The same idea as the 2nd method, except instead of creating duplicate documents have the document containing the ‘like’ information link to the document’s index containing the ‘liked’ article.

The 2nd method is the only one of the 3 that I know can be done and know how to implement, but it seems wasteful storage-wise and performance-wise anytime an article needs to be updated, which happens quite frequently.

By my logic, the third and first method seem to be the superior ways, in that order, if the y are possible to implement, but I definitely could be wrong. If they are possible to implement and /are/ the best methods, can you explain how to implement them, and if not, do you think that using a second Solr core as described in method 2 would be worth the extra storage space required and the mass re-indexing needed when an article’s text changes?

Are there any better alternatives of doing something of this nature? I am not limited to using Solr, I just thought it would be the better to use over relational databases since it is intended for full-text indexing.

Thanks a head of time for any light you can shed on my issue.

Update:
Solr’s ExternalFileField found in the answers of aitchnyu’s question seems promising. If they have a field to index external files, it would make sense that there is a way to link the indexes of one document to another.

  • 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-08T04:18:53+00:00Added an answer on June 8, 2026 at 4:18 am

    I would go with the first option. Run your SQL query, then your Solr query – but with the filter query (fq) parameter set to the list of IDs retrieved from the database. Filter queries are used to extract a subset of returned search results – in your case, you only need those documents that occur in a specific user’s like history.

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

Sidebar

Related Questions

We're using Solr to search articles of various lengths. We index both descriptive metadata
I am using solr for searching. When i search a word contains uppercase letters
I am using solr to search through indices written through lucene's index writer. My
I'm using Solr and Solr:Cell plugin to index and search rich text documents and
I want to using solr for search on articles I have 3 table: Group
I'm using solr to search for articles. I created 2 test body sentences which
I'm using Solr 3.x with focus on German text, which works well. Searching for
I am using Solr to handle my text search needs. Now MLT (more like
I'm using solr 3.6. I'm indexing using DIH aprox 2.6GB of data hourly (right
I am using solr search engine to query an index for classifieds that match

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.