Page 1 of 3
search form not working
Posted: Fri Mar 31, 2017 2:44 pm
by dcoderk
hi
just want to know how can i make the search form work
every time I search for keyword
i got no result the page is blank
Re: search form not working
Posted: Fri Mar 31, 2017 9:35 pm
by admin
Check this in rotation settings
Search fields
If you don't use Sphinx the script will use Mysql
built-in functionality. It's slower so we limit amount of fields
Please, read the last WIKI about the last option.
Re: search form not working
Posted: Thu Apr 13, 2017 7:49 am
by dcoderk
Re: search form not working
Posted: Thu Apr 13, 2017 8:06 am
by admin
Yes
Re: search form not working
Posted: Thu Apr 13, 2017 11:43 am
by dcoderk
do i need to add this code and how exactly?
Sphinx configs TCMS
TCMS (version 2.X)
searchd
{
listen = your_port:mysql41
addition of mysql41 is the most important part. It's called SphinxQL
source your_name_source
{
type = mysql
sql_host = localhost
sql_user =
sql_pass =
sql_db =
sql_port = 3306 # optional, default is 3306
sql_query_pre = SET NAMES utf8
sql_query = SELECT gi.gallery_id, UNIX_TIMESTAMP(gi.activation_date) as date, alt, description, gi.duration, sponsor_id, gs.total_ctr, gi.content_type, \
(SELECT group_concat(tag_name) FROM rot_gal2tag g2t \
LEFT JOIN rot_tags as t on t.tag_id = g2t.tag_id \
WHERE g2t.gallery_id = gi.gallery_id) as tags, \
(SELECT group_concat(tag_id) FROM rot_gal2tag g2t \
WHERE g2t.gallery_id = gi.gallery_id) as tag_ids, \
(SELECT group_concat(gss.group_id) FROM rot_gallery_stats1 as gss \
WHERE gss.gallery_id = gi.gallery_id AND group_id != 0) as categories \
FROM rot_gallery_info AS gi \
JOIN rot_gallery_data1 AS gd ON gi.gallery_id = gd.gallery_id \
JOIN rot_gallery_stats1 AS gs ON gs.gallery_id = gi.gallery_id \
WHERE gallery_status = 'active' and gallery_type = 0 \
and gs.best_thumb = 'yes' and gs.group_id = 0
sql_attr_timestamp = date
sql_attr_uint = duration
sql_attr_uint = sponsor_id
sql_attr_float = total_ctr
sql_attr_uint = content_type
sql_attr_multi = uint categories from field;
sql_attr_multi = uint tag_ids from field;
}
index your_name_index
{
source = your_name_source
path = /your_path
docinfo = extern
morphology = stem_en
charset_type = utf-8
I already create scj/sphinx directory
what file should I add on that sphinx directory?
Re: search form not working
Posted: Thu Apr 13, 2017 12:01 pm
by admin
yes, you have to add it to sphinx config
not to some folder
Also based on your questions I would recommend you to read some docs about Sphinx so you;d understand what you are doing
Or to ask admin to do it for you
Re: search form not working
Posted: Thu Apr 13, 2017 1:28 pm
by dcoderk
ok
so I will just need to follow sphinx installation guide and modify the config and that's it?
Re: search form not working
Posted: Thu Apr 13, 2017 1:50 pm
by dcoderk
what about using the built in search function only without sphinx?
how can I setup and where is the link for tutorial?
Re: search form not working
Posted: Thu Apr 13, 2017 6:32 pm
by admin
There's no setup
just /?search=.. and that's it
Re: search form not working
Posted: Fri Apr 14, 2017 7:47 am
by dcoderk
do i need to add anything from admin, if so where?