What is a good template for inaccurate queries in the Google App Engine datastore?

The Google App Engine (gql) search engine query language does not offer inaccurate operators such as "LIKE" or even case insensitivity. You can work around the case-sensitive issue by storing the version of the field in lower case. But what if I want to find a person, but I'm not sure about the spelling of the name? Is there an acceptable template for solving this scenario?

+3
source share
2 answers

Quote from the documentation:

. , :

db.GqlQuery("SELECT * FROM MyModel WHERE prop >= :1 AND prop < :2", "abc", u"abc" + u"\ufffd")

MyModel string, abc. unicode u "\ ufffd" . , , , , .

http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html

- SearchableModel, , .

http://billkatz.com/2008/8/A-SearchableModel-for-App-Engine

+8

soundex http://effbot.org/librarybook/soundex.htm . , , soundex , , .

+1

Source: https://habr.com/ru/post/1702661/


All Articles