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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:03:03+00:00 2026-05-15T19:03:03+00:00

below are tables I need to index in Sphinx News has many projects linked

  • 0

below are tables I need to index in Sphinx
alt text

News has many projects linked to it via the news_projects table…

My question is it advisable to have all the project names in one text field so that it can be searched on?

This is my query :

//query to get the project names and make all project names appear in one field separated by comma.
SELECT
  news.id
  news.headline,
  news.body,
GROUP_CONCAT(DISTINCT projects.project_name) as related_projects
FROM  news 
LEFT JOIN news_projects on news.id = news_projects.news_id
LEFT JOIN projects on news_projects.project_id = projects.id
GROUP BY news.id

This will then output rows with project_name column formatted as ‘name,name2,name3’

Im a bit undecided weather to use this or just make the project_id an attribute.. Having the project_name as text is definitely of big help because it can be searched on…

Please.. I need you opinion on this.. thanks a lot!

  • 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-15T19:03:04+00:00Added an answer on May 15, 2026 at 7:03 pm

    If the project name is useful for searching on, then definitely keep it. I would recommend concatenating with a space instead of a comma, though (although it may not matter under the hood for Sphinx when you’re using the default settings).

    It’s probably also useful to have the project ids as a Multi-Value Attribute (MVA) – which means you can limit search results to news items within a specific project. No reason to not have both, really.

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

Sidebar

Related Questions

I'm writing a SQL embedded in C program with tables below: table index:id, xx
I have two tables described below. What I need is a single query that
I have two tables like the ones below. I need to find what exchangeRate
I need help with the SQL ORDER BY clause. In my table below I
I have a table like below: EmployeeId EmployeeName RequestId RequestName EmployeeId RequestId I need
I need to generate an xsl table for the xml below, for attributes fname
need help in error in database pivot. i have table tamed table_score like below:
We have a database with a tables called 'Sites' This table has the columns,
We need following domain class model to be generated from the table listed below.
Say I had the two tables below, how do I find all questions with

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.