views:

37

answers:

1

Hi,

I have a User class and store the user's submitted full name as a single String:

class User {
    private String mFullName;
}

there's no partial string matching available in app engine though. I am looking through current options, looks like this project has come up with a pretty good solution:

http://www.allbuttonspressed.com/projects/nonrel-search

I'm using java though. I don't think there's a java port of that project. What are other java users doing?

I'm thinking of just writing user info to a separate mysql database on account creation, and just hitting that database with a %like% search when users need it (this should be pretty infrequent).

Duplicating user info to a separate mysql database would be a temporary solution until something comes built-in for app-engine java, but I haven't heard of anything like this on the roadmap.

Any info/ideas would be great!

Thanks

+1  A: 

On the python side of things, I've seen one or two full text search implementations mentioned. The way they work is to tokenize the text to be searched and then create App Engine indexes that can be used for queries. I'm not sure if anything comparable has been created for Java at this time.

If you can make do with searches that are equivalent to 'string%' or '%string', it shouldn't be too difficult to make your own index and do a range scan. In the case of '%string', you would want to store the strings to be searched in reverse, e.g., 'gnirts%'.

Eric W.
Cool thanks, yeah I'd like to support a full %LIKE% search, so for now I think I'm going to just duplicate my user objects to a mysql instance via the task queue. When users perform a user search on my site, I'll just hit the mysql instance. The data might not be completely synchronous with the app datastore, but should be good enough for my purposes. Thanks!