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

  • Home
  • SEARCH
  • 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 8327001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:57:21+00:00 2026-06-09T00:57:21+00:00

I cannot use @field-name in my sphinx query, but I can use @* I

  • 0

I cannot use @field-name in my sphinx query, but I can use @*

I could use the @field-name attribute when querying the test.documents example, but not for another table I have indexed.

This is my PHP:

    require_once('sphinxapi.php');
    $this->sphinx = new SphinxClient;
    $this->sphinx->setServer("localhost", 9312);
    $this->sphinx->setMatchMode(SPH_MATCH_EXTENDED2);

    //This works:
    $result = $this->sphinx->query("@* bob");
    var_dump($result);

    //This doesn't work:
    $result = $this->sphinx->query("@artist bob");
    var_dump($result);

Output of: /usr/local/sphinx/bin/indexer –all –rotate –dump-rows sphinxrows.txt

# === source src1 ts 1318588067
# Fri Oct 14 10:27:47 2011
#
# field 0: name
# field 1: filename
# field 2: artist
# sql_attr_uint = id_attr # attr 0
# sql_attr_timestamp = date_added # attr 1
#

DROP TABLE IF EXISTS rows_src1;
CREATE TABLE rows_src1 (
  id VARCHAR(32) NOT NULL,
  id_attr VARCHAR(4096) NOT NULL,
  date_added VARCHAR(4096) NOT NULL,
  name VARCHAR(4096) NOT NULL,
  filename VARCHAR(4096) NOT NULL,
  artist VARCHAR(4096) NOT NULL,
  KEY(id) );

INSERT INTO rows_src1 VALUES ('6', '6', '0', 'track 1 title', 'track-1.wav', 'bob');
INSERT INTO rows_src1 VALUES ('70', '70', '0', 'track 2 title', 'track-2.wav', 'eric');

Sphinx.conf:

source src1
{
        type                    = mysql

        sql_query               = \
                SELECT id, id AS id_attr, UNIX_TIMESTAMP(date_added) AS date_added, name, filename, artist \
                FROM files

        sql_attr_uint           = id_attr
        sql_attr_timestamp      = date_added

        sql_query_info          = SELECT * FROM files WHERE id=$id
}
  • 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-09T00:57:23+00:00Added an answer on June 9, 2026 at 12:57 am

    Field names need to be defined in sphinx.conf. Adding an entry for “rt_field” solved this for me.

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

Sidebar

Related Questions

In MySQL I can use ` in a query to protect a field name,
I cannot use AsEnumerable() on DataTable, I'm using C# 3 but I'm just targeting
I see that we cannot use if not exists in the create virtual table
Can someone explain to me why I cannot use document.getElementById('id').value inside of a function?
I want to use stub entities but it seems I cannot use TryGetObjectStateEntry without
While database design I used a field name deleted and use it as Boolean.
My form validation works great, but the messages use the JSF component name and
I cannot use the Ctrl + F and Ctrl + H in my SQL
So apparently you cannot use the virtual modifier with the override modifier. virtual -
It looks like you cannot use a helper in a controller even if both

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.