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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:24:09+00:00 2026-05-19T13:24:09+00:00

I am pretty new to sphinx, so I have a question about it. Let’s

  • 0

I am pretty new to sphinx, so I have a question about it.

Let’s say I have a table called tv_releases

My sphinx.conf contains (small portion) :

source tv_releases
{
    type            = mysql

    sql_host        = localhost
    sql_user        = ---------
    sql_pass        = ---------
    sql_db          = --------
    sql_port        = 3306  

    sql_query_pre = SET NAMES utf8

    #ingore for example ( delta updates ).
    sql_query_pre = REPLACE INTO title_counter SELECT 3, MAX(id) FROM tv_releases

    sql_query = SELECT id,rel ,tv_id,total_subs FROM tv_releases\

     #ignore for example ( delta updates).
     WHERE id<=( SELECT max_doc_id FROM title_counter WHERE counter_id=3 )

    sql_attr_uint = total_subs
    sql_attr_uint = tv_id
}

Indexing is fine , querying also.

Now sphinxapi ( php ) (portion) :

$sp = new SphinxClient();
---...

$sp->SetMatchMode(SPH_MATCH_ALL);
$sp->SetArrayResult(true);
$sp->SetLimits ( 0, 100);
$sp->SetSortMode ( SPH_SORT_EXTENDED, "@relevance DESC, ....more options" );



  $results = $sp->Query('SEARCHTERM', 'tv_releases');

Now My question :

Let’s say I have the following releases ( called rel in table ).

rel 1 : Name s01e02 Format-extradata
rel 2 : Name s01e03 Format-extradata
rel 3 : Name s02e05 Format-extradata
rel 4 : Name s02e06 Format-extradata
rel 5 : Name s03e06 Format-extradata

When my SEARCHTERM is “Name S01”

I want that the matching releases ( rel) ( ordered by Relevance )

will start with all the releases containing Name s01e**

The problem is , it will not do this.
A simple Like ‘Name s01%’ in sql will do that , but the whole point of sphinx was the speed.

Someone has a solution on how to accomplish the needed (search) results in sphinx ?

Cheers

  • 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-19T13:24:10+00:00Added an answer on May 19, 2026 at 1:24 pm

    min_prefix_len (http://sphinxsearch.com/docs/current.html#conf-min-prefix-len) can help you.

    Best wishes,
    Sergey

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

Sidebar

Related Questions

I am pretty new to php, but I am learning! I have a simple
I'm pretty new to regular expressions. I have a requirement to replace spaces in
I'm pretty new to my company (2 weeks) and we're starting a new platform
I'm a pretty new C# and .NET developer. I recently created an MMC snapin
I'm pretty new to the idea of recursion and this is actually my first
I am pretty new to VB.NET - and I'm struggling to convert the signature
I'm pretty new to JSF and the many many related technologies out there. I'm
I'm pretty new to the C++ build flow, and I'm thinking of switching to
I'm pretty new to the Spring Framework, I've been playing around with it and
I am pretty new to the Unity Application Block and am a little stuck

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.