Note that there are some explanatory texts on larger screens.

plurals
  1. POSphinx returns wrong document ids
    primarykey
    data
    text
    <p>My sphinx search returns wrong results, if I search for a keyword, the document ids returned do not contain that keyword.</p> <p>Here is how I created conf settings:</p> <pre><code>source source_name { type = mysql sql_host = ****** sql_user = ****** sql_pass = ****** sql_db = ****** sql_port = # optional, default is 3306 sql_query_pre = SET CHARACTER_SET_RESULTS=utf8 sql_query_pre = SET NAMES utf8 sql_query = \ SELECT \ P.ID AS ID, P.TITLE AS TITLE, P.TITLE AS TITLE_SORT \ FROM \ PRODUCT P \ WHERE \ P.ISVALID='Y' sql_attr_string = TITLE_SORT sql_query_info = SELECT * FROM PRODUCT WHERE ID=$id } index index_name { source = source_name path = /path/to/data/file_name docinfo = extern min_word_len = 1 charset_type = utf-8 } indexer { mem_limit = 128M } searchd { listen = 3312 # port is deprecated from 2.1+ log = /path/to/log/searchd.log query_log = /path/to/log/query.log read_timeout = 5 max_children = 30 pid_file = /path/to/log/searchd.pid max_matches = 1000 seamless_rotate = 0 preopen_indexes = 0 unlink_old = 1 compat_sphinxql_magics = 0 } </code></pre> <p>One important thing is that <strong>If I search with the test.php tool, I can see that the attribute value shows products with searched keywords, but document ids are still wrong, which makes me thing why it is returning wrong document ids</strong></p> <p>Another important thing is that on the same machine and same conf file, I created an index for another mysql database and it works fine.</p> <p>Thanks</p> <p>EDIT:</p> <p>Here is an example:</p> <p>I search for "professional" and I get this result</p> <pre><code>1. doc_id=33285, weight=102, title_sort=Wella Professional Bezoplachový kondicionér pro objem vlasï SP Volumize 150 ml, manufacturer_id=217, category_id=4648, min_price=0, product_rating=4294967295, filter_userid=(2714222508,3149373076) 2. doc_id=33286, weight=102, title_sort=Wella Professional àampon pro lesk vlasï SP Shine Define 250 ml, manufacturer_id=217, category_id=3046113, min_price=0, product_rating=4294967295, filter_userid=(2714222508,3149373076) 3. doc_id=33287, weight=102, title_sort=Wella Professional àampon pro barvené vlasy SP Color Save 250 ml, manufacturer_id=217, category_id=3046113, min_price=0, product_rating=4294967295, filter_userid=(2714222508,3149373076) </code></pre> <p>.. and so on ..</p> <p>You can see that the title_sort field has the word professional in it, but the doc_ids returned (33285, 33286, 33287) are not these records.</p> <p>This below is the id - title data from database</p> <pre><code>33285 Avon Čisticí tonikum na tělo proti akné ve spreji Blemish Clearing 100 ml 33286 Biotherm Pleťový krém a sérum 2v1 pro navrácení pružnosti normální až smíšené pleti Age Fitness Elastic 30 ml AKCE 33287 Avon Dětský šampon Barbie® 200 ml </code></pre> <p>While the results you see in the title_sort above are tied to these ids:</p> <pre><code>32854 Wella Professional Bezoplachový kondicionér pro objem vlasů SP Volumize 150 ml 32855 Wella Professional Šampon pro lesk vlasů SP Shine Define 250 ml 32856 Wella Professional Šampon pro barvené vlasy SP Color Save 250 ml </code></pre>
    singulars
    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