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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:07:36+00:00 2026-05-25T15:07:36+00:00

Im making a dynamic CMS, so every instance of the CMS will have its

  • 0

Im making a dynamic CMS, so every instance of the CMS will have its on tables in one MYSQL DB. So far all is working.

The Envorioment:

  • 8 different Sites with different content. they share only the DB name but all have differenttables ($sitename_posts)

  • search enigne SPHINX

Now im stuck at this: when for example user makes a search on site 1 i want search all tables $sitename_posts and return the best results.

As search engine i use sphinx. I have tried it with two sources and two indexes but when i search for example:

$sphinx = new SphinxClient;
$sphinx->setServer($sphinx_host, $sphinx_port);
$sphinx->setMatchMode(SPH_MATCH_ANY);
$sphinx->setMaxQueryTime(10000);
$sphinx->SetSortMode(SPH_SORT_EXTENDED, '@relevance DESC');
$sphinx->SetLimits(0, 100, 300);
$result = $sphinx->query("Hello World", (index1 index2);

I get no results. But if i build only one INDEX and multiply sources i get results, but i cant identify from which source i get the data, so i cant judge to which site the content belongs.

One more question is when i search the indexes, is it possible, that sphinx returns, the ID and to what index that id belongs? Cause i need to indentify which index belongs to which result.

Thanks for 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-05-25T15:07:37+00:00Added an answer on May 25, 2026 at 3:07 pm

    If I understand the question correctly I it’s worth you looking into the following Sphinx features:

    Distributed Indexes – This would allow you to have one index per site and also have a “virtual” distributed index which you could search from the application when you want to get data.

    Index Merging – This is more permanent than the distributed index option but the indexer is able to merge multiple indexes into a single index. I would usually prefer to use distributed indexes.

    Attributes – This would allow you to include a constant value in each of the indexes (e.g. siteId) which would allow you to identify which of the indexes the search result came from. It could also allow you to filter results when searching from the single distributed index.

    Sphinx docs – http://sphinxsearch.com/docs/2.0.1/

    Distributed indexes explained – http://sphinxsearch.com/docs/2.0.1/distributed.html

    Configuring distributed indexes – http://sphinxsearch.com/docs/2.0.1/confgroup-index.html

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

Sidebar

Related Questions

I'm totally familiar in making static and dynamic websites. However, I have never dealt
Did you used Dynamic websites before? you see its a good way for making
Making my first steps with NHibernate, I'm trying to have it creating my Tables
I have a MySql db with innoDB tables. Very simplified this is how two
i have a problem. i m making Some wpf button Dynamic through C#.i m
I have a problem making a select tag in php code dynamic. I'm creating
I am making one dynamic library by using some function of libmxml.a library but
So I'm working on making a dynamic drop down select form and I need
Dynamic should be able to handle math without making me have to think about
i m making a Polaroid image gallery and for which i have used dynamic

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.