Note that there are some explanatory texts on larger screens.

plurals
  1. POSearch app in Django
    primarykey
    data
    text
    <p>I am building search app using django &amp; sphinx. I got the setup working but when I search I get irrelevant results. Here is what I do - </p> <pre><code># this is in my trial_data Model search = SphinxSearch( index = 'trial_data trial_datastemmed', weights = {'name': 100,}, mode = 'SPH_MATCH_ALL', rankmode = 'SPH_RANK_BM25', ) </code></pre> <p>When I search I get this (from my trial data) - </p> <pre><code>from trial.models import * res = trial_data.search.query('godfather') for i in res: print i </code></pre> <blockquote> <pre><code>3 Godfathers (7.000000) Bonanno: A Godfather's Story (1999) (6.400000) Disco Godfather (4.300000) Godfather (6.100000) Godfather: The Legend Continues (0.000000) Herschell Gordon Lewis: The Godfather of Gore (2010) (6.900000) Mafia: Farewell to the Godfather (0.000000) Mumbai Godfather (2.600000) Russian Godfathers (2005) (7.000000) Stan Tracey: The Godfather of British Jazz (2003) (6.200000) The Black Godfather (3.500000) The Burglar's Godfather (0.000000) The Fairy Godfather (0.000000) The Fairy Godfather (0.000000) The Godfather (9.200000) The Godfather (1991) (6.400000) </code></pre> </blockquote> <p>the problem is the most relevant result for "godfather" is shown at 19th position. All the top results are junk. How can I <code>order</code> or <code>sort</code> my results using <code>Django-sphinx</code>. </p> <p>Rather, what can I do to make the results more relevant using this setup. </p> <p><strong>NOTE:</strong> I am using python 2.6.x + django 1.2.x + sphinx 0.99 + django-sphinx 2.3.3 + mysql</p> <p>Also, the data i custom made &amp; is only about 100 rows with only one field <code>name</code> searchable. There is one more fields <code>rating</code> (which is what you see in brackets). <code>rating</code> field is an attribute (non searchable).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload