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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:26:54+00:00 2026-05-26T02:26:54+00:00

I am loosing my mind on this for two days now… I would like

  • 0

I am loosing my mind on this for two days now…

I would like to use slovenian letters in sphinx search, all english ones + č ž š (and just in case ć)

I was looking all over the net to get the proper chars but I found squat…

so I decided to make my own step by step…

this is my index

index classifieds
{
    source          = classifieds_src
    path            = c:\Sphinx\data\classifieds
    docinfo         = extern

    min_infix_len       = 2
    infix_fields        = title,keywords,summary,text
    expand_keywords     = 1
    enable_star     = 1


    charset_type        = utf-8
    charset_table = 0..9, a..z, _, A..Z->a..z,-, U+002C, \
    U+010C->U+010D, U+0106->U+0107, U+0160->U+0161, U+017D->U+017E, \
    U+010D->c,U+0107->c, U+0161->s, U+017E->z, \
    U+010D, U+0107, U+0161, U+017E
}

where I mapped big Č, Ć Š Ž to their lowercase counterparts, and added mapping from
č into c, ć into c, š into s and ž into z
and finally I added those four chars to the table….

these are my classifieds titles:

t1: HP USB optična miška za prenosnik RH304
t2: Čiška PCplus MO-U033+F2 (optična, brezžična, PS/2)
t3: Miška Logitech optična Nano M235 siva

db encoding: utf8_general_ci
table’s encoding: utf8_general_ci
title field encoding: utf8_general_ci

test case:

$testcase = array(
        "miška",
        "mi*ka",
        "Čiška",
        "čiška",
        "miska",
        "usb prenosnik",
        "prenosnik miska",
        "miška usb"
);

//api settings:

$this->sphinx->SetArrayResult(true);
$this->sphinx->setLimits(0, 100);
$this->sphinx->setMatchMode(SPH_MATCH_EXTENDED2);
$this->sphinx->SetSortMode(SPH_SORT_RELEVANCE, '@weight DESC');
$this->sphinx->SetRankingMode(SPH_RANK_PROXIMITY_BM25);
$this->sphinx->SetFieldWeights(array("title"=>100, "keywords"=>80, "summary"=>60,
"text"=>20, "slug"=>10));

and finally the test results:

Keyword (total / total_found)
words

miška     (0/0)

Array
(
    [*miška*] => Array
        (
            [docs] => 0
            [hits] => 0
        )

    [miška] => Array
        (
            [docs] => 0
            [hits] => 0
        )

)

mi*ka     (0/0)

Array
(
    [*mi*] => Array
        (
            [docs] => 3
            [hits] => 4
        )

    [mi] => Array
        (
            [docs] => 1
            [hits] => 1
        )

    [*2aka*] => Array
        (
            [docs] => 0
            [hits] => 0
        )

    [2aka] => Array
        (
            [docs] => 0
            [hits] => 0
        )

)

Čiška     (0/0)

Array
(
    [*čiška*] => Array
        (
            [docs] => 0
            [hits] => 0
        )

    [čiška] => Array
        (
            [docs] => 0
            [hits] => 0
        )

)

čiška     (0/0)

Array
(
    [*čiška*] => Array
        (
            [docs] => 0
            [hits] => 0
        )

    [čiška] => Array
        (
            [docs] => 0
            [hits] => 0
        )

)

miska     (0/0)

Array
(
    [*miska*] => Array
        (
            [docs] => 0
            [hits] => 0
        )

    [miska] => Array
        (
            [docs] => 0
            [hits] => 0
        )

)

usb prenosnik     (1/1)

Array
(
    [*usb*] => Array
        (
            [docs] => 1
            [hits] => 1
        )

    [usb] => Array
        (
            [docs] => 1
            [hits] => 1
        )

    [*prenosnik*] => Array
        (
            [docs] => 1
            [hits] => 1
        )

    [prenosnik] => Array
        (
            [docs] => 1
            [hits] => 1
        )

)

prenosnik miska     (0/0)

Array
(
    [*prenosnik*] => Array
        (
            [docs] => 1
            [hits] => 1
        )

    [prenosnik] => Array
        (
            [docs] => 1
            [hits] => 1
        )

    [*miska*] => Array
        (
            [docs] => 0
            [hits] => 0
        )

    [miska] => Array
        (
            [docs] => 0
            [hits] => 0
        )

)

miška usb     (0/0)

Array
(
    [*miška*] => Array
        (
            [docs] => 0
            [hits] => 0
        )

    [miška] => Array
        (
            [docs] => 0
            [hits] => 0
        )

    [*usb*] => Array
        (
            [docs] => 1
            [hits] => 1
        )

    [usb] => Array
        (
            [docs] => 1
            [hits] => 1
        )

)

You can clearly see I get positive results only in the queries without slovenian special chars

Please, please help I am loosing my mind on this

  • 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-26T02:26:55+00:00Added an answer on May 26, 2026 at 2:26 am

    The problem is that sphinx indexer wasn’t using utf8 character set by default. Fixed by adding the following to sphinx.conf

    sql_query_pre = SET CHARACTER_SET_RESULTS=utf8
    sql_query_pre = SET NAMES utf8
    

    References

    • http://ryaneby.com/2009/11/21/unicode-and-sphinx.html
    • http://sphinxsearch.com/docs/1.10/conf-sql-query-pre.html
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

ok I have two strings. (I use this for a language library system to
I have two tables. First table looks like this: Table: Records rid | user
I'm losing my mind on this one. My last question answered a syntax issue,
After loosing much sleep I still cannot figure this out: The code below (its
Recently I have been writing parameterized queries like this: SQL = INSERT INTO myTable
I have two tables that I designed this way with a possible reshuffling of
I think I am losing my mind. :) I've been struggling with this for
This is a follow-up question to this question because I'm losing my mind over
Is something like this possible? If so, could you point me in the right
I've been looking to the answer to this question for a few days and

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.