Skip to content

Instantly share code, notes, and snippets.

@cbiggins
Created June 17, 2011 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbiggins/1031284 to your computer and use it in GitHub Desktop.
Save cbiggins/1031284 to your computer and use it in GitHub Desktop.
A simple sphinx config file
source suburbs_src
{
type = mysql
sql_host = localhost
sql_user = tester
sql_pass = pass
sql_db = misc
sql_port = 3306 # optional, default is 3306
sql_sock = /Applications/MAMP/tmp/mysql/mysql.sock
# make sure lines end in \ with no trailing space
sql_query =\
SELECT id, suburb, state, postcode, RADIANS(lat) as lat, RADIANS(lon) AS lon\
FROM suburbs
sql_attr_float = lat
sql_attr_float = lon
sql_attr_uint = postcode
# This is for returning row data from MySQL to give context to command line based searches
sql_query_info = SELECT * FROM suburbs WHERE id=$id
}
index suburbs
{
source = suburbs_src
path = /var/data/suburbs
docinfo = extern
mlock = 0
morphology = none
min_word_len = 1
charset_type = sbcs
html_strip = 0
enable_star = 1
}
indexer
{
mem_limit = 32M
}
searchd
{
log = /var/log/searchd.log
query_log = /var/log/query.log
read_timeout = 5
client_timeout = 300
max_children = 30
pid_file = /var/data/searchd.pid
max_matches = 1000
seamless_rotate = 1
preopen_indexes = 0
unlink_old = 1
mva_updates_pool = 1M
max_packet_size = 8M
max_filters = 256
max_filter_values = 4096
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment