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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:14:19+00:00 2026-06-14T02:14:19+00:00

Using Thinking Sphinx in my rails app, I set it up to allow partial

  • 0

Using Thinking Sphinx in my rails app, I set it up to allow partial match with infix (for example, searching for “tray” would match “ashtray”).

However, I’d like complete word match to have more weight (relevance) than infix match.

So, if my search for ‘tray’ returns these 3 results : “Silver Tray”, “Ashtray” and “Some other tray” – I want the “Ashtray” to be the last result when sorting by relevance.

Is there a way to configure Sphinx to do that ?

  • 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-14T02:14:20+00:00Added an answer on June 14, 2026 at 2:14 am

    You need to define your own ranker. Here’s how the default ones look like:

    SPH_RANK_PROXIMITY_BM25 = sum(lcs*user_weight)*1000+bm25
    
    SPH_RANK_BM25 = bm25
    
    SPH_RANK_NONE = 1
    
    SPH_RANK_WORDCOUNT = sum(hit_count*user_weight)
    
    SPH_RANK_PROXIMITY = sum(lcs*user_weight)
    
    SPH_RANK_MATCHANY = sum((word_count+(lcs-1)*max_lcs)*user_weight)
    
    SPH_RANK_FIELDMASK = field_mask
    
    SPH_RANK_SPH04 = sum((4*lcs+2*(min_hit_pos==1)+exact_hit)*user_weight)*1000+bm25
    

    http://sphinxsearch.com/docs/2.0.6/weighting.html

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

Sidebar

Related Questions

I am using Thinking Sphinx for a Rails application. Everything works perfectly. I just
I'm using Thinking Sphinx in a Rails application combined with the jQuery autocomplete plugin
I am using rails 2.3.4 and sphinx 1.4.4 and raspell 1.0.0. Now I would
I'm searching in two different modes using Thinking Sphinx: Full search on a single
I've recently installed thinking-sphinx on my ruby on rails app. As first sight, everything
I have serious problem with Thinking Sphinx in my Rails application. My app specifications
I am using Ruby on Rails and the Thinking-Sphinx Gem with Sphinx as the
I'm using delta indexing for my Thinking Sphinx indexes in my Rails project. In
I'm thinking about using Sphinx as a search engine for my site. But since
I'm using a Sphinx search engine to perform my searches in a Rails project,

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.