Skip to content
feiben edited this page Jul 24, 2016 · 11 revisions

In order to support the natural language search for tons of text contents, we call

String table = "sales";
String column = "feedback";
db_instance.getTable(table).addFulltextSearchable(column);  

Then records that contain the column data will be indexed.

Query language is quite similar to the counterpart of Mysql:

String table = "sales";  
String query = "feedback against(\" keyword1, keyqord2 + keyword3\")";  
ArrayList<Record32KByte> result = db_instance.queryFulltext(table, query);    

Where against is the retained keyword of the query grammar. Comma(,), space, and plus(+) stand for the binary logical relationship among keywords respectively as: or, or, and.

For natural languages other than English, user shall implement his own tokenizer that parses the text into entities, words, names etc. Seek how to do it under this package of full-text search.

Clone this wiki locally