I was wondering if anyone can point me to a library that can search a string using google-ish syntax. Examples:
Google advanced search syntax
Craigslist advanced search syntax
So if the query were
food -pizza
and the search subject was
Ray's Pizza, best food in town!
It would not result in a match. Etc etc.
String find() in Python The find(query) method is built-in to standard python. Just call the method on the string object to search for a string, like so: obj. find(“search”). The find() method searches for a query string and returns the character position if found.
Introduction to Python string find() method The find() is a string method that finds a substring in a string and returns the index of the substring.
The find() method finds the first occurrence of the specified value. The find() method returns -1 if the value is not found.
Whoosh is really great fast, full-text search engine written in Python, it has a nice API and nice documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With