开发者

How to use sqlite icu in like query

hi I modified my sql statement as

CREATE VIRTUAL TABLE [v_fts] USING fts4 
(
 [title], 
tokenize=icu
)" 

But when I am trying to insert data I am getting error SQL logic error or missing database

Edit

I had compiled sqlite with icu option using -DSQLITE_ENABLE_ICU

option.

how to load icu ?

I had uploaded shell code with makefile here

http://www.2shared.com/file/8hxA3KIn/sqlite.html

all: release32

CFLAGS = -fPIC -O6 -DNO_TCL -DSQLITE_THREADSAFE=1 -DHAVE_USLEEP=1 -DSQLITE_ENABLE_FTS3=1  -O3 -Os  -I. -DSQLITE_ENABLE_ICU `/home/vivek/downloads/icu/des32/bin/icu-config --cppflags`

export LDFLAGS += -Wl,--start-group 
export LDFLAGS += /home/vivek/downloads/icu/des32/lib/libsicui18n.a
export LDFLAGS += /home/vivek/downloads/icu/des32/lib/libsicuuc.a
export LDFLAGS += /home/vivek/downloads/icu/des32/lib/libsicudata.a
export LDFLAGS += -lcrypt -ldl -lz -lrt  -lssl -lpthr开发者_JS百科ead   
export LDFLAGS += -Wl,--end-group

OBJ=sqlite3.o\
    shell.o\
    icu.o\

release32: $(OBJ)
     g++34  -fno-exceptions -fno-operator-names ${CFLAGS} -DNDEBUG -m32  -static  $(OBJ) $(LDFLAGS) -o s.out
%.o:%.c
    gcc34 ${CFLAGS} -DNDEBUG -m32 -c    $<

my query are

CREATE VIRTUAL TABLE [vivek_fts] USING fts4 ( [title],tokenize=icu en_US)
insert into vivek_fts values("a");


According to the full text search documentation you should use tokenize=icu en_US for example (specify an ICU locale identifier).

Also, you should have ICU loaded.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜