How can I implement a sounds like/soundex search using Google Appengine Full Text Search?

158 views
Skip to first unread message

Greg via StackOverflow

unread,
Jan 23, 2014, 2:06:32 PM1/23/14
to google-appengin...@googlegroups.com

Is there some way to make a "sounds like" query against an appengine search index?

For example, I have the document:

my_document = search.Document(
    doc_id = 'PA6-5000',
    fields=[search.TextField(name='customer', value='John Jackson')])
index = search.Index(name="myIndex")
index.put(my_document)

I'd like to be able to do a search like:

index.search('Jon Jackson')

and see my_document in the search results.

Is there some way to do this with appengine full text search?



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/21317098/how-can-i-implement-a-sounds-like-soundex-search-using-google-appengine-full-tex

Isaac via StackOverflow

unread,
Jan 24, 2014, 1:38:27 AM1/24/14
to google-appengin...@googlegroups.com

The full text search API does not support fuzzy matching. However, you could simulate fuzziness by performing multiple searches with increasing 'fuzzing' and use of boolean operators. For example, a search of "John Jackson" could be translated into:

  1. John Jackson
  2. ((Jon OR Johnny) AND Jackson) OR (John AND (Jack OR Jacks OR Jasonsons))

etc. This requires a function which returns potential fuzzy matches (in this case Jon, Johnny for "John").



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/21317098/how-can-i-implement-a-sounds-like-soundex-search-using-google-appengine-full-tex/21326000#21326000

Isaac via StackOverflow

unread,
Jan 30, 2014, 1:03:54 PM1/30/14
to google-appengin...@googlegroups.com

Edit: Use the tilde (~) operator. This is fuzzy match, and more powerful than the documentation suggests.

Reply all
Reply to author
Forward
0 new messages