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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:54:02+00:00 2026-06-14T03:54:02+00:00

im trying to write a sphinx query to list domains that start with a

  • 0

im trying to write a sphinx query to list domains that start with a certain keyword.

Say I have a sphinx index with the following items.

stack.com
stack-it.com
stack.net
stack-studio.com
stackoverflow.com
stackmonkey.com

The following query

$cl->SetMatchMode ( SPH_MATCH_EXTENDED2 );
$cl->SetFieldWeights ( array ( "site_domain"=>100 ) );
$cl->SetSortMode ( SPH_SORT_EXTENDED  , "@weight DESC" );
$cl->SetLimits(0, 100);
$cl->AddQuery( '^stack', "domainsDb" );

Will only list:

stack.com
stack-it.com
stack.net
stack-studio.com

As it finds results that end in a . or -. But stackoverflow.com is not shown, as it’s not a full match I guess? How can I get ALL results that start with ‘query’ to show? Even if it’s part of a word.

  • 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-14T03:54:03+00:00Added an answer on June 14, 2026 at 3:54 am

    You should enanble star option (http://sphinxsearch.com/docs/1.10/conf-enable-star.html) and add * after keyword you are looking for:

    $cl->AddQuery( ‘^stack*, “domainsDb” );

    Also dont forget to setup minimal infix length (http://sphinxsearch.com/docs/1.10/conf-min-infix-len.html)

    Using MySQL for full text searching is not really a recommended idea.

    1) Fulltext searching with FT indexes is slow compared to sphinx/solr

    2) Fulltext search without FT indexes is very very slow and can utilize 100% of your DB server very quilckly and render it unusable even at very very low traffic

    3) To be able to have FT indexes you must use MyISAM engine, not Innodb which on other hand can have some drawbacks of its own

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

Sidebar

Related Questions

Trying to write function that numerize items of list and returns list of tuples
I'm trying write a query to find records which don't have a matching record
Trying to write a simple jQuery function that will multiple the index of an
I'm trying write a program that takes a list of names, sorts those names,
Trying to write a procedure that given a value and a list, it deletes
I'm trying to write a query that joins a handful of tables from MySQL
I am trying write a SQL query that filters a gridview by the fields
Trying to write a PowerShell cmdlet that will mute the sound at start, unless
I am trying write a query that will display if the person has anyone
I'm trying write a program that takes a list of names, sorts those names,

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.