Re:Writing a full-text search engine using Bloom filters
by code_duck on Tuesday December 24, 2013 @11:55AM
(#6960099)
Leveraging grep was my point, not that this would actually be code I'd use. Let's assume the line before that was getting $terms out of the query and sanitizing it. I suppose that doubles the length of my solution, though!
[ Parent
| on HN ]
Re:Writing a full-text search engine using Bloom filters
by jrockway on Tuesday December 24, 2013 @08:04PM
(#6961791)
Ah yes, php_real_escape_grep_parameters(3).
Re:Writing a full-text search engine using Bloom filters
by code_duck on Wednesday December 25, 2013 @11:20PM
(#6965248)
Filtering out all characters other than ASCII alphabetical with preg_replace would probably do it.
And yeah, I'm not a huge fan of php - or the ridiculous function names it is known for. However, it can be dead simple to set up for trivial tasks (which is about all od want to use it for).