mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Make DL_POSITION the default mode in FTS1. Remove the need to compile
with SQLITE_CORE when SQLITE_ENABLE_FTS1 is used. (CVS 3462) FossilOrigin-Name: df1a4b4834fdc88056371bcc767c5dfde2eaab72
This commit is contained in:
@ -14,6 +14,10 @@
|
||||
*/
|
||||
#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS1)
|
||||
|
||||
#if defined(SQLITE_ENABLE_FTS1) && !defined(SQLITE_CORE)
|
||||
# define SQLITE_CORE 1
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
#if !defined(__APPLE__)
|
||||
#include <malloc.h>
|
||||
@ -180,15 +184,14 @@ typedef enum DocListType {
|
||||
} DocListType;
|
||||
|
||||
/*
|
||||
** By default, positions and offsets are stored in the doclists.
|
||||
** To change this so that only positions are stored, compile
|
||||
** with
|
||||
** By default, only positions and not offsets are stored in the doclists.
|
||||
** To change this so that offsets are stored too, compile with
|
||||
**
|
||||
** -DDL_DEFAULT=DL_POSITIONS
|
||||
** -DDL_DEFAULT=DL_POSITIONS_OFFSETS
|
||||
**
|
||||
*/
|
||||
#ifndef DL_DEFAULT
|
||||
# define DL_DEFAULT DL_POSITIONS_OFFSETS
|
||||
# define DL_DEFAULT DL_POSITIONS
|
||||
#endif
|
||||
|
||||
typedef struct DocList {
|
||||
@ -1912,9 +1915,9 @@ static int constructVtab(
|
||||
return SQLITE_NOMEM;
|
||||
}
|
||||
/* TODO(shess) For now, add new tokenizers as else if clauses. */
|
||||
if( spec->azTokenizer[0]==0 || !strcmp(spec->azTokenizer[0], "simple") ){
|
||||
if( spec->azTokenizer[0]==0 || startsWith(spec->azTokenizer[0], "simple") ){
|
||||
sqlite3Fts1SimpleTokenizerModule(&m);
|
||||
}else if( strcmp(spec->azTokenizer[0], "porter")==0 ){
|
||||
}else if( startsWith(spec->azTokenizer[0], "porter") ){
|
||||
sqlite3Fts1PorterTokenizerModule(&m);
|
||||
}else{
|
||||
*pzErr = sqlite3_mprintf("unknown tokenizer: %s", spec->azTokenizer[0]);
|
||||
|
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Modify\sthe\smakefile(s)\sto\sknow\sabout\sthe\sFTS1\smodule\s-\showever\sFTS1\sis\nturned\soff\sby\sdefault.\s\sBump\sthe\sversion\snumber\sto\s3.3.8.\s(CVS\s3461)
|
||||
D 2006-10-03T19:12:32
|
||||
C Make\sDL_POSITION\sthe\sdefault\smode\sin\sFTS1.\s\sRemove\sthe\sneed\sto\scompile\nwith\sSQLITE_CORE\swhen\sSQLITE_ENABLE_FTS1\sis\sused.\s(CVS\s3462)
|
||||
D 2006-10-03T19:37:37
|
||||
F Makefile.in 4379c909d46b38b8c5db3533084601621d4f14b2
|
||||
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
|
||||
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
|
||||
@ -21,7 +21,7 @@ F ext/README.txt 913a7bd3f4837ab14d7e063304181787658b14e1
|
||||
F ext/fts1/README.txt 20ac73b006a70bcfd80069bdaf59214b6cf1db5e
|
||||
F ext/fts1/ft_hash.c 3927bd880e65329bdc6f506555b228b28924921b
|
||||
F ext/fts1/ft_hash.h 1a35e654a235c2c662d3ca0dfc3138ad60b8b7d5
|
||||
F ext/fts1/fts1.c 302d4fa00d5e3b1da0518c0b7f648d7cded900d0
|
||||
F ext/fts1/fts1.c 6eca4867e4c4288747534e548ea0c8a7026afbfa
|
||||
F ext/fts1/fts1.h 6060b8f62c1d925ea8356cb1a6598073eb9159a6
|
||||
F ext/fts1/fts1_hash.c 3196cee866edbebb1c0521e21672e6d599965114
|
||||
F ext/fts1/fts1_hash.h 957d378355ed29f672cd5add012ce8b088a5e089
|
||||
@ -195,7 +195,7 @@ F test/fts1a.test 46090311f85da51bb33bd5ce84f7948359c6d8d7
|
||||
F test/fts1b.test 5d8a01aefbecc8b7442b36c94c05eb7a845462d5
|
||||
F test/fts1c.test 8790cc74bfc3141772f5cc0252dcdef20832f755
|
||||
F test/fts1d.test a73deace5c18df4a549b12908bade4f05dcf1a2f
|
||||
F test/fts1porter.test 73426d3493952f5fbca1a46f103244ad99cd92b2
|
||||
F test/fts1porter.test d86e9c3e0c7f8ff95add6582b4b585fb4e02b96d
|
||||
F test/func.test 0ed54b5aeaad319f68016c033acfebef56f5874a
|
||||
F test/hook.test 7e7645fd9a033f79cce8fdff151e32715e7ec50a
|
||||
F test/in.test 369cb2aa1eab02296b4ec470732fe8c131260b1d
|
||||
@ -402,7 +402,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
|
||||
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
|
||||
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
|
||||
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
|
||||
P 70501e4ea588ed762e4f6bc211ce63397faa3367
|
||||
R e608d22d93934718615b43088eb7db99
|
||||
P 288ff63783725a5d8f86b6171473bb4ae3c4e37b
|
||||
R 4c6ab5743c7283201ca8b740acc3c42e
|
||||
U drh
|
||||
Z c1ca20833118d2dc59259071f997a987
|
||||
Z c73be47be2252984fc8c61e70a747c7c
|
||||
|
@ -1 +1 @@
|
||||
288ff63783725a5d8f86b6171473bb4ae3c4e37b
|
||||
df1a4b4834fdc88056371bcc767c5dfde2eaab72
|
@ -12,7 +12,7 @@
|
||||
# focus of this script is testing the FTS1 module, and in particular
|
||||
# the Porter stemmer.
|
||||
#
|
||||
# $Id: fts1porter.test,v 1.4 2006/10/01 20:41:03 drh Exp $
|
||||
# $Id: fts1porter.test,v 1.5 2006/10/03 19:37:37 drh Exp $
|
||||
#
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
@ -23573,7 +23573,7 @@ set porter_test_data {
|
||||
db close
|
||||
sqlite3 db :memory:
|
||||
db eval {
|
||||
CREATE VIRTUAL TABLE t1 USING fts1(word, tokenize porter);
|
||||
CREATE VIRTUAL TABLE t1 USING fts1(word, tokenize Porter);
|
||||
}
|
||||
|
||||
foreach {pfrom pto} $porter_test_data {
|
||||
|
Reference in New Issue
Block a user