Skip to content

[Deprecated, code is 5 years old] A specialized Reddit search engine for a CSGO Steam item trading subreddit.

License

Notifications You must be signed in to change notification settings

Voyager-Two/gotrade.plus

Repository files navigation

Deprecated and outdated project. Code originally written in 2018.

Full source code for gotrade.emre.earth, a specialized Reddit search engine for a CSGO Steam item trading subreddit.

source gotrade_plus
{
  type          = mysql

  sql_host      = localhost
  sql_user      = 
  sql_pass      = 
  sql_db        = 
  sql_port      = 3306

  sql_query     = \
  SELECT id,username,steamid,type,closed,link,have,want,time \
  FROM trades

  sql_attr_uint = type
  sql_attr_uint = closed
  sql_attr_string = username
  sql_attr_bigint = steamid
  sql_attr_string = link
  sql_field_string = have
  sql_field_string = want
  sql_attr_uint = time
}

index gotrade
{
  source            = gotrade_plus
  path              = /var/lib/sphinxsearch/data/gotrade
  docinfo           = extern
}

searchd
{
  listen            = 127.0.0.1:9306:mysql41
  log               = /var/log/sphinxsearch/searchd.log
  query_log         = /var/log/sphinxsearch/query.log
  read_timeout      = 5
  max_children      = 30
  pid_file          = /var/run/sphinxsearch/searchd.pid
  seamless_rotate   = 1
  preopen_indexes   = 1
  unlink_old        = 1
  binlog_path       = /var/lib/sphinxsearch/data
}
sudo service sphinxsearch start
sudo service sphinxsearch stop
sudo service sphinxsearch restart
  • A cron-job indexes the searches from MySQL every 15 seconds (sudo crontab -e):
* * * * * /usr/bin/indexer --rotate --config /etc/sphinxsearch/sphinx.conf --all
* * * * * sleep 15; /usr/bin/indexer --rotate --config /etc/sphinxsearch/sphinx.conf --all
* * * * * sleep 30; /usr/bin/indexer --rotate --config /etc/sphinxsearch/sphinx.conf --all
* * * * * sleep 45; /usr/bin/indexer --rotate --config /etc/sphinxsearch/sphinx.conf --all

About

[Deprecated, code is 5 years old] A specialized Reddit search engine for a CSGO Steam item trading subreddit.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published