Jump to content

Hello, Sphinx!


Recommended Posts

Turn came of the next experiment! :)

How to properly configure the Sphinx Engine?

This is a standard configuration file. What to specify the database to my community: one that uses the IPS, or create a new one?

/etc/sphinx/sphinx.conf

#
# Minimal Sphinx configuration sample (clean, simple, functional)
#

source src1
{
	type			= mysql

	sql_host		= localhost
	sql_user		= test
	sql_pass		=
	sql_db			= test
	sql_port		= 3306	# optional, default is 3306

	sql_query		= \
		SELECT id, group_id, UNIX_TIMESTAMP(date_added) AS date_added, title, content \
		FROM documents

	sql_attr_uint		= group_id
	sql_attr_timestamp	= date_added

	sql_query_info		= SELECT * FROM documents WHERE id=$id
}


index test1
{
	source			= src1
	path			= /var/lib/sphinx/test1
	docinfo			= extern
	charset_type		= sbcs
}


index testrt
{
	type			= rt
	rt_mem_limit	= 32M

	path			= /var/lib/sphinx/testrt
	charset_type		= utf-8

	rt_field		= title
	rt_field		= content
	rt_attr_uint	= gid
}


indexer
{
	mem_limit		= 32M
}


searchd
{
    listen          = 127.0.0.1:9312
	listen			= 9306:mysql41
	log			= /var/log/sphinx/searchd.log
	query_log		= /var/log/sphinx/query.log
	read_timeout		= 5
	max_children		= 30
	pid_file		= /var/run/sphinx/searchd.pid
	max_matches		= 1000
	seamless_rotate		= 1
	preopen_indexes		= 1
	unlink_old		= 1
	workers			= threads # for RT to work
	binlog_path		= /var/lib/sphinx
}

I would be very grateful for the rest of the tips!
Thank you!

Link to comment
Share on other sites

ok, but before this step of generating a file from ІPS, I need to specify is that the database used by the IPS in this section of /etc/sphinx/sphinx.conf ?

source src1
{
    type            = mysql

    sql_host        = localhost
    sql_user        = test
    sql_pass        =
    sql_db            = test
    sql_port        = 3306    # optional, default is 3306

 

Link to comment
Share on other sites

You need to give permission to that log file.

I have tested IPS4 with the default Search and with Sphinx and this time im not noticing any kind of difference between them. IPS4 now uses a new Table just for the Search Index. It was a good decision.

I've been using Sphinx with 3.4 for a long time, but i guess i will return to the Mysql Search.

Link to comment
Share on other sites

  • 1 month later...

You need to give permission to that log file.

I have tested IPS4 with the default Search and with Sphinx and this time im not noticing any kind of difference between them. IPS4 now uses a new Table just for the Search Index. It was a good decision.

I've been using Sphinx with 3.4 for a long time, but i guess i will return to the MysqlSearch

So.. would you recommend sphinx instead of mysql for a 6 gb database, slow hdds and 8 gb of ram? Thanks. 

Link to comment
Share on other sites

Yes. I have returned to Sphinx, because that way my Database is smaller and occupies less space in the buffers.

Would you mind sharing your sphinx conf file?  I can't get some of the functionality to work still...like wildcard searches for example.

Link to comment
Share on other sites

My sphinx conf file is the one you download in the acp.

Does wildcard or partial word searching work for you?  The default sphinx conf file from the ACP doesn't config these options, at least it didn't for me.

Example, take a word used on your forums, call it 'example' - if you search for examp, or examp*, there are no results, again, at least in the testing I've done.

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...