Complex searches - SQL

Locked
Chao
Joined: Sun Apr 14, 2002 6:39 am
Org Profile

Complex searches - SQL

Post by Chao » Sat Jan 22, 2005 12:59 pm

I've seen quite a few requests and such to allow for some detailed searches (eg single anime only, only multiple anime vids, excluding these anime etc). Would it be possible to allow SQL statements as searches? This would mean the admins wouldn't have to consider and queue up potential new searches that few people would use, and allow those that want to be more detailed to do so.

User avatar
derobert
Phantom of the .Org
Joined: Wed Oct 24, 2001 8:35 am
Location: Sterling, Virginia
Contact:
Org Profile

Re: Complex searches - SQL

Post by derobert » Sat Jan 22, 2005 3:31 pm

Chao wrote:I've seen quite a few requests and such to allow for some detailed searches (eg single anime only, only multiple anime vids, excluding these anime etc). Would it be possible to allow SQL statements as searches? This would mean the admins wouldn't have to consider and queue up potential new searches that few people would use, and allow those that want to be more detailed to do so.
Filtering those SQL statements would be hard. We'd need to somehow prevent statements like:

Code: Select all

SELECT * FROM
  videos v, members m, videos_anime va, songs s, videos_songs vs,
  categories c, videos_categories vc
 WHERE 1=1
Key 55EA59FE; fingerprint = E501 CEE3 E030 2D48 D449 274C FB3F 88C2 55EA 59FE
A mighty order of ages is born anew.              http://twitter.com/derobert

User avatar
Phade
Site Admin
Joined: Fri Oct 20, 2000 10:49 pm
Location: Little cabin in the woods...
Org Profile

Post by Phade » Sat Jan 22, 2005 5:25 pm

Hey Chao,

With the Super Search switching over to a boolean mode fulltext search, you will soon be able to do all of those using the fulltext boolean operators. In this current implementation, the queries are set to maximum restrictiveness. Soon there will be better input string parsing to allow users more flexability in their searches.

Having members construct and execute their own SQL statements would generally be a Bad Thing.

I hope this helps.

Phade.

trythil
is
Joined: Tue Jul 23, 2002 5:54 am
Status: N͋̀͒̆ͣ͋ͤ̍ͮ͌ͭ̔̊͒ͧ̿
Location: N????????????????
Org Profile

Re: Complex searches - SQL

Post by trythil » Tue Jan 25, 2005 2:29 am

derobert wrote:

Code: Select all

SELECT * FROM
  videos v, members m, videos_anime va, songs s, videos_songs vs,
  categories c, videos_categories vc
 WHERE 1=1
You should also throw in joins on the anime and music tables, just to highlight the inanity of the idea.

With all the time it'd take to design, implement, debug, and test the filtering code, it'd most likely have been more efficient to just make new searches on request.

Locked

Return to “Site Help & Feedback”