Jump to content

Sphinx experts? Need configuration help.


Recommended Posts

My forum is about tractors which have model numbers like C-160, B-80, C-195 etc... Search doesn't like to search with the dash (hyphen). When I turn off FULLTEXT native search, I can search with the hyphen but it's slow and inaccurate with other searches.

I loaded up Sphinx in hopes to get a great search but I am at a complete loss how to configure it so it will search for items like mentioned above. Can anyone help me so I can get search working for my data? I am using the standard IPB configuration generated file for the Sphinx configuration.

Link to comment
Share on other sites

I wish that I knew PHP, it seems to me that the the Hyphen is getting stripped out and never even passed to Sphinx. Anyone know where the search routine is located, maybe I could dig through it and see if that may be the case.

I say this because if I stop the searchd daemon, then run a search for C-160, IPB comes back and says that C160 is not found. If the damon is stopped, could Sphinx even have stripped it? Also, it doesn't seem that the Sphinx escape character is doing anthing (or the wildcard "*" character)

Link to comment
Share on other sites

I found the module: /admin/applications/core/modules_public/search/search.php which seems to be replacing several characters

$_search_term = trim( preg_replace( '#(^|s)(+|-|||~)#', " ", $search_term ) );

Is this on the right track?

Link to comment
Share on other sites

  • 2 weeks later...

Ok, I found the problem and it's not Sphinx. See this post which shows where the problem is, and an enhancement request to make it right. Worst case scenario, you have to modify the core IPB code, BUT be sure that you have the proper char_table set in the conf file. My testing worked but I am apprehensive in applying it until someone from IPB can look and see to be sure that I don't break anything else.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...