I have built an index on a database that users can search on. Everything is very basic about what it does. I am currently doing nothing special with the input from the user, before applying calling find.
ex; $query = $_GET['query']; $hits = $index->find($query); This works most of the time, but throws exceptions if you include characters such as * or ?. It will also throw an exception if you end the query with a word like "and" or "or". Other than looking for exceptions and alerting the user to issues with the query, what would be considered best practices in regards to manipulating the query to search for exactly what the user entered (while still using find and not the search API)? What I mean by that is, could I remove special characters from the query (*, ?, etc.)? Should I remove the word "and" or "or" if the query ends with that word? What about the word "to"? If I search for "back to back" it will throw an exception also. -- View this message in context: http://www.nabble.com/Zend-Lucene-Search---find%28%29-best-Practices--tp14997184s16154p14997184.html Sent from the Zend Framework mailing list archive at Nabble.com.
