New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FTS support #272

Open
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@emmx

emmx commented Sep 17, 2014

I added full-text search support in ActiveRecord. It's basically a flag in the table annotation.

@Table(name = "cars", fts = "4")
public class Car extends Model {
   //...
}

Here "4" is just the version of the FTS engine. Behind the scene it creates a virtual table instead of a normal table if this flag is used.

PS: My editor screwed some lines converting TABs into spaces. There's a good reason not to use TABs to indent code!!

@emmx emmx referenced this pull request Sep 17, 2014

Open

Adding Sqlite FTS3 support #29

@kenjiru

This comment has been minimized.

kenjiru commented Oct 15, 2014

Nice work. I would like to see this feature in.

@emmx

This comment has been minimized.

emmx commented Oct 28, 2014

I've updated and fixed a couple more things regarding FTS support in ActiveAndroid.

There must be taken into account that FTSs tables in SQLite does not support any kind of constraint restriction (not even primary key validation, check the docs). For that a hidden column called /rowid/ shoud be used.

I've added all of that into the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment