Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>To perform such query you have to use <a href="https://developers.google.com/appengine/docs/python/cloud-sql/developers-guide" rel="nofollow noreferrer">Google Cloud SQL</a>. </p> <p>If you're using Datastore, so it doesn't support fulltext search. You have to manually create all possible variations of name and use them to query entities. You can store them in special entity's multivalued field (it can be expensive) or use special <a href="https://developers.google.com/appengine/docs/java/search/" rel="nofollow noreferrer">Search API</a> that perfectly fit this purpose (Search doesn't support substring matching so you have to use variations all the same). </p> <p>It two words working with Search API is:</p> <ol> <li><p>List item Create Person entity in Datastore with some <code>name</code></p></li> <li><p>Create corresponding Document in search Index named <code>Persons</code>, with fields <code>possible_names</code> and <code>entity_id</code> (also you can use Document.doc_id to store entity's id). In <code>possible_names</code> you store all useful variations of name divided by space.</p></li> <li><p>Query <code>Persons</code> index to find all documents where field <code>possible_names</code> matches your search string.</p></li> <li><p>Use field <code>entity_id</code> form result's Documents to retrieve entity from Datastore by id.</p></li> </ol> <p><a href="https://stackoverflow.com/questions/10960384/google-app-engine-python-search-api-string-search">Here</a> is little example.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload