The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!
You are not logged in.
Pages: 1
I am using Sphinx for search.
In user frontend, it seems that videos that are not approved yet can still be searched. Yet, it returns 404 when trying to click into the unapproved videos.
Please check.
Offline
This should not be possible, because only videos with status 1 will be indexed by sphinx.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Well, it is really strange.
I have checked the database, the videos are of status 2.
And I also check sphinx.conf. As you said, it should only index status 1 videos. I see that there is a WHERE clause "v.status = 1"
But these status 2 videos can still be searched in user frontend.
I am sure that this only happens after I upgrade from 1.2.3 to 2.0.6.
I have check my both sites and the same thing happens. So please help to check it.
Last edited by discuss4u (2015-08-01 12:06:45)
Offline
Sphinx is enabled in Admin?
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Yes, in video::config::search setting, search type is set to complex (sphinx) with these setting in admin::configuration
Sphinx Host: Localhost
Sphinx Port: 9312
Sphinx index: videos
In fact, i didn't change these settings since 1.2.x.
Thanks
Offline
I have digged into the problem a bit.
I tried to update sphinx index manually after a video is uploaded.
I update sphinx index when video status = 2, the video COULD BE search.
I digged into the sphinx.conf file again and find that changing
sql_query = \
SELECT v.video_id, v.title, v.description, v.mobile, v.add_time, \
v.rating, v.total_views, v.duration, v.video_id AS video, \ #added in RC4
GROUP_CONCAT(DISTINCT t.name SEPARATOR ' ') AS tags \
FROM video AS v \
LEFT JOIN video_tags AS t ON (t.video_id = v.video_id) \
AND v.status = 1 \
GROUP BY v.video_id
to
sql_query = \
SELECT v.video_id, v.title, v.description, v.mobile, v.add_time, \
v.rating, v.total_views, v.duration, v.video_id AS video, \ #added in RC4
GROUP_CONCAT(DISTINCT t.name SEPARATOR ' ') AS tags \
FROM video AS v \
LEFT JOIN video_tags AS t ON (t.video_id = v.video_id) \
WHERE v.status = 1 \
GROUP BY v.video_id
will solve the problem.
Seems that because using "AND v.status=1" may not filter out the row with other status.
So, using "WHERE v.status=1" is a better option
Last edited by discuss4u (2015-08-04 03:56:17)
Offline
Hmm...it should not work with AND. Sphinx should report a error when indexing :-(
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Well, I have tested the SELECT statement in other sql management program and there was no error when using AND. The only thing is that it will show all videos no matter what the video "status" is.
I will suggest making changes to this thread http://forum.adultscriptpro.com/viewtopic.php?id=160 so as to correct the issue.
Offline
Fixed in the documentation also.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
Pages: 1