Re: [sqlite] small sqlite fts snippet function or Fts Bug!

2015-01-27 Thread Dan Kennedy
On 01/27/2015 06:48 PM, boscowitch wrote: and the in an sqlite shell (SQLite version 3.8.8.1 2015-01-20 16:51:25) I get following for a select with snippet: EXAMPLE OUTPUT: sqlite select docid,*,snippet(test) from test where german match a; 1|[1] a b c|1] ba/b b c 2|[{[_.,:;[1] a b c|1] ba/b

Re: [sqlite] small sqlite fts snippet function or Fts Bug!

2015-01-27 Thread boscowitch
Yeah, -ID 4 was just a desperate experiment for a hack with longer data in the search to see if it would lead the snippet function to start grabbing the data from the start (or at least one word/char more). The offsets beeing wrong and therefore the b... was kinda expected of me, but in case it

[sqlite] small sqlite fts snippet function or Fts Bug!

2015-01-27 Thread boscowitch
Hello since it this bug report (+ a dirty-fix) it might be useful for both users and devs. that's why I send a copy to both mailing lists! I hope I don't bother the diligent devs who read all of both list, sry to them, and thx for sqlite btw. ;)! recently I wanted to use the snippet function in

Re: [sqlite] FTS pagination

2014-10-27 Thread supermariobros
Just to be clear. It basically means that after MATCH records are returned it iterates through ALL the rowids of the returned set and removes them from the set and orders them accordingly. -- View this message in context: http://sqlite.1065341.n5.nabble.com/FTS-pagination-tp78754p78849.html

Re: [sqlite] FTS pagination

2014-10-26 Thread Clemens Ladisch
supermariobros wrote: Well, they all give exactly the same output. sqlite EXPLAIN QUERY PLAN SELECT rowid FROM activity_text_content WHERE activity_text_content MATCH 'x' ORDER BY rowid ASC LIMIT 100; 0|0|0|SCAN TABLE activity_text_content VIRTUAL TABLE INDEX 4:ASC (~0 rows) sqlite

Re: [sqlite] FTS pagination

2014-10-25 Thread supermariobros
Well, they all give exactly the same output. sqlite EXPLAIN QUERY PLAN SELECT rowid FROM activity_text_content WHERE activity_text_content MATCH 'x' ORDER BY rowid ASC LIMIT 100; 0|0|0|SCAN TABLE activity_text_content VIRTUAL TABLE INDEX 4:ASC (~0 rows) sqlite EXPLAIN QUERY PLAN SELECT rowid

Re: [sqlite] FTS pagination

2014-10-24 Thread supermariobros
Hi Thanks For quick response Of course you are right that I can not use row id in the way I used it above. I guess I wrote it quicker than I thought about it. However If I use original rowid and LIMIT it should be fine, knowing that the submited rowid is the rowid of the last element of the

Re: [sqlite] FTS pagination

2014-10-24 Thread Clemens Ladisch
supermariobros wrote: EXPLAIN QUERY PLAN SELECT rowid FROM activity_text_content WHERE activity_text_content MATCH 'x' AND rowid1000 ORDER BY rowid ASC LIMIT 10; 0|0|0|SCAN TABLE activity_text_content VIRTUAL TABLE INDEX 4: (~0 rows) If I understand it correctly it uses indexes properly on

Re: [sqlite] FTS pagination

2014-10-23 Thread supermariobros
Or maybe, if I am using android, it should be done at the cursor level? -- View this message in context: http://sqlite.1065341.n5.nabble.com/FTS-pagination-tp78754p78755.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users

[sqlite] FTS pagination

2014-10-23 Thread supermariobros
Quick question. If I am using FTQ that looks like this SELECT * FROM mail WHERE body MATCH 'sqlite' can I add to it WHERE rowid 5 AND rwoid 10 or it will significantly slow it down. If so what would be the best approach for pagination, For example if I get 500 rows with the matching term and

Re: [sqlite] FTS pagination

2014-10-23 Thread Clemens Ladisch
supermariobros wrote: If I am using FTQ that looks like this SELECT * FROM mail WHERE body MATCH 'sqlite' can I add to it WHERE rowid 5 AND rwoid 10 or it will significantly slow it down. How much did it slow down when you tested it? Anyway, without index: sqlite EXPLAIN QUERY PLAN

Re: [sqlite] FTS full-text query vs. query by rowid

2014-08-28 Thread Clemens Ladisch
Milan Kříž wrote: 3) A query which should use a linear scan according to the SQLite documentation (http://www.sqlite.org/fts3.html#section_1_4) SELECT docId FROM ftsTable WHERE docId BETWEEN 20 AND 23 - gets a following query plan: SCAN TABLE ftsTable VIRTUAL TABLE INDEX 393216: -

Re: [sqlite] FTS full-text query vs. query by rowid

2014-08-28 Thread Milan Kříž
Clemens Ladisch wrote: 4) The I have a query with both 'match ?' sub-clause and 'rowid=?' sub-clause. It is not clear to me which variant will be used. But according to definition of Full-text query it should use full-text query at first. And then? Will it use index to rowid after full-text

Re: [sqlite] FTS full-text query vs. query by rowid

2014-08-28 Thread Clemens Ladisch
Milan Kříž wrote: Clemens Ladisch wrote: INDEX 1 is the full-text search. Sorry, that's wrong. The idxNum value is determined as follows: (see fts3Int.h) /* ** The Fts3Cursor.eSearch member is always set to one of the following. ** Actualy, Fts3Cursor.eSearch can be greater than or equal to

Re: [sqlite] FTS full-text query vs. query by rowid

2014-08-28 Thread Milan Kříž
Clemens Ladisch wrote: Milan Kříž wrote: Clemens Ladisch wrote: INDEX 1 is the full-text search. Sorry, that's wrong. So does it mean that the full-text search is not performed for the following query at all? And that only the docId index is used to get entries in the IN sub-clause and

Re: [sqlite] FTS full-text query vs. query by rowid

2014-08-28 Thread Clemens Ladisch
Milan Kříž wrote: So does it mean that the full-text search is not performed for the following query at all? SELECT docId FROM ftsTable WHERE ftsTable MATCH 'a*' AND rowId IN (20,21, 22, 23) SCAN TABLE ftsTable VIRTUAL TABLE INDEX 1: EXECUTE LIST SUBQUERY 1 No, it means that you

Re: [sqlite] FTS full-text query vs. query by rowid

2014-08-28 Thread Milan Kříž
Dne 28.8.2014 14:54, Clemens Ladisch napsal(a): Milan Kříž wrote: So does it mean that the full-text search is not performed for the following query at all? SELECT docId FROM ftsTable WHERE ftsTable MATCH 'a*' AND rowId IN (20,21, 22, 23) SCAN TABLE ftsTable VIRTUAL TABLE INDEX 1:

Re: [sqlite] FTS full-text query vs. query by rowid

2014-08-28 Thread Clemens Ladisch
Milan Kříž wrote: Dne 28.8.2014 14:54, Clemens Ladisch napsal(a): Milan Kříž wrote: So does it mean that the full-text search is not performed for the following query at all? No, it means that you are using a different version. But I still cannot understand that query plan. Then try with

Re: [sqlite] FTS full-text query vs. query by rowid

2014-08-28 Thread Milan Kříž
Dne 28.8.2014 16:48, Clemens Ladisch napsal(a): Then try with 3.8.6. Ouuu . .sorry again. I have tested it with 3.8.6 and the query plan looks ok now. SCAN TABLE nameftsTable VIRTUAL TABLE INDEX 18: EXECUTE LIST SUBQUERY 1 But I also tested it with my version again and I'm getting

[sqlite] FTS full-text query vs. query by rowid

2014-08-27 Thread Milan Kříž
Hello, I would like to ask several questions regarding to SQLite FTS module and how it uses indexes. I have following queries: 1) A full-text query SELECT docId FROM ftsTableWHERE ftsTable MATCH 'a*' - gets a following query plan: SCAN TABLE ftsTable VIRTUAL TABLE INDEX 18: 2) A query

Re: [sqlite] FTS module and DB close

2014-06-08 Thread gwenn
Ok, Maybe the solution is: 1) try to close the connection: sqlite3_close 2) if error code is SQLITE_BUSY, a) use sqlite3_next_stmt to finalize dangling statements b) retry to close the connection Step (1) ensures that FTS related statements are finalized. Thanks. On Sat, Jun 7, 2014 at 7:49 PM,

[sqlite] FTS module and DB close

2014-06-07 Thread gwenn
Hello, How do you prevent double free/finalize of statements created by the FTS module ? I am using sqlite3_next_stmt to finalize all dangling statements before closing the connection but the program crashes because the FTS module finalizes them too when sqlite3_close is called... May be I should

[sqlite] FTS performance (mobile devices)

2013-06-20 Thread Jan Slodicka
gains in terms of speed, risk of high memory consumption. 4. There is some problem in SQLite FTS code as the described crash proves. (Might relate to empty index only) 5. DB size: This is not described above, but it is important to realize, that SQLite DB does not shrink. FTS index takes compareble

Re: [sqlite] FTS Find Tokens at Record Start

2013-04-05 Thread Clemens Ladisch
Paul Vercellotti wrote: using FTS, how do you match records that contain certain tokens beginning at the start of the record Apparently, this information is not stored in the FTS index. Search for the tokens, then manually check with LIKE or something like that. Regards, Clemens

Re: [sqlite] FTS Find Tokens at Record Start

2013-04-05 Thread Fabian Klebert
An: sqlite-users@sqlite.org Betreff: Re: [sqlite] FTS Find Tokens at Record Start Paul Vercellotti wrote: using FTS, how do you match records that contain certain tokens beginning at the start of the record Apparently, this information is not stored in the FTS index. Search for the tokens

[sqlite] FTS Find Tokens at Record Start

2013-04-04 Thread Paul Vercellotti
Hi there, I couldn't find this from the documentation: using FTS, how do you match records that contain certain tokens beginning at the start of the record (or any token position for that matter). For example, I want to match records that start with Four score and seven years ago but not

Re: [sqlite] FTS problem with 'NOT term' queries

2013-02-03 Thread Alexey Pechnikov
Hello! And as result it's impossible to search docs in some situations: SELECT * FROM docs WHERE docs MATCH 'NOT sqlite'; Error: malformed MATCH expression: [NOT sqlite] As far as I can tell, in MATCH syntax NOT is a binary operator, denoting set difference. You are trying to use it as a

Re: [sqlite] FTS problem with 'NOT term' queries

2013-02-03 Thread Dan Kennedy
On 02/04/2013 12:18 AM, Alexey Pechnikov wrote: Hello! And as result it's impossible to search docs in some situations: SELECT * FROM docs WHERE docs MATCH 'NOT sqlite'; Error: malformed MATCH expression: [NOT sqlite] As far as I can tell, in MATCH syntax NOT is a binary operator,

[sqlite] FTS SQLite optimize command creates very large BLOBs in *_segment table.

2013-01-31 Thread Dominique Pellé
Hi I have a database using SQLite-3.7.14 with a FTS4 virtual table (Free Text Search). The FTS table contains several millions of small documents. The FTS DB is created on a server (where creating time does not matter) and then used on an embedded device as a read-only database for FTS queries

[sqlite] FTS problem with 'NOT term' queries

2013-01-29 Thread Alexey Pechnikov
Hello! From http://www.sqlite.org/fts3.html#section_3_1 we can see the query SELECT * FROM docs WHERE docs MATCH 'database NOT sqlite'; But the equal query doesn't works: SELECT * FROM docs WHERE docs MATCH 'NOT sqlite AND database'; Error: malformed MATCH expression: [NOT sqlite AND database]

Re: [sqlite] FTS problem with 'NOT term' queries

2013-01-29 Thread Igor Tandetnik
On 1/29/2013 11:30 PM, Alexey Pechnikov wrote: From http://www.sqlite.org/fts3.html#section_3_1 we can see the query SELECT * FROM docs WHERE docs MATCH 'database NOT sqlite'; But the equal query doesn't works: SELECT * FROM docs WHERE docs MATCH 'NOT sqlite AND database'; Error: malformed

Re: [sqlite] FTS problem with 'NOT term' queries

2013-01-29 Thread Kevin Benson
The explanation right above that table of examples contains these important (I believe) phrases: ...BINARY SET operators... ...TWO operands to an operator... (emphasis mine) On Tue, Jan 29, 2013 at 11:30 PM, Alexey Pechnikov pechni...@mobigroup.ruwrote: SELECT * FROM docs WHERE docs MATCH 'NOT

[sqlite] FTS questions

2013-01-12 Thread moti lahiani
Hello all I'm new with sqlite3 and sql. I have data base that include path columns (file system path like c:\bla bla\myFiles\1.txt) On that columns I need to do 1) search for patterns in case the user want to find a file or directory 2) search for prefix path in case the user rename

[sqlite] FTS questions

2013-01-12 Thread moti lahiani
Hello all I'm new with sqlite3 and sql. I have data base that include path columns (file system path like c:\bla bla\myFiles\1.txt) On that columns I need to do 1) search for patterns in case the user want to find a file or directory 2) search for prefix path in case the user rename

Re: [sqlite] FTS questions

2013-01-12 Thread Michael Black
Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of moti lahiani Sent: Saturday, January 12, 2013 4:37 AM To: sqlite-users@sqlite.org Cc: Moti LAHIANI Subject: [sqlite] FTS questions Hello all I'm new with sqlite3 and sql. I have data base

Re: [sqlite] FTS questions

2013-01-12 Thread moti lahiani
: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of moti lahiani Sent: Saturday, January 12, 2013 4:37 AM To: sqlite-users@sqlite.org Cc: Moti LAHIANI Subject: [sqlite] FTS questions Hello all I'm new with sqlite3 and sql. I have data base that include

Re: [sqlite] FTS questions

2013-01-12 Thread Michael Black
of SQLite Database Subject: Re: [sqlite] FTS questions Thanks for your reply Why I care the language: according to the documentation: A term is a contiguous sequence of eligible characters, where eligible characters are all alphanumeric characters and all characters with Unicode codepoint values

[sqlite] FTS substring behavior

2012-11-08 Thread Paul Vercellotti
Hi there, I wanted to clarify if FTS could provide any optimization for substring matches like '*ion*' or similar? That is, does it only scan the token index for matching tokens to locate the main table records that contain those tokens, or does it do a full table scan of the main table?

Re: [sqlite] FTS substring behavior

2012-11-08 Thread Dan Kennedy
On 11/09/2012 01:49 AM, Paul Vercellotti wrote: Hi there, I wanted to clarify if FTS could provide any optimization for substring matches like '*ion*' or similar? No. I think it will actually search for tokens that start with the 4 ASCII characters *ion if you try that. Dan.

Re: [sqlite] FTS substring behavior

2012-11-08 Thread Yongil Jang
How about look at following URL? https://github.com/jonasfj/trilite AFAIK, FTS doesn't support substring search. I also tried to edit FTS to find substring by changing simple tokenizer. It was worked partially, but not a good solution to use generally. 2012/11/9 Dan Kennedy

Re: [sqlite] FTS substring behavior

2012-11-08 Thread Paul Vercellotti
From: Yongil Jang yongilj...@gmail.com To: General Discussion of SQLite Database sqlite-users@sqlite.org Sent: Thursday, November 8, 2012 2:26 PM Subject: Re: [sqlite] FTS substring behavior How about look at following URL? https://github.com/jonasfj/trilite AFAIK, FTS doesn't

Re: [sqlite] FTS substring behavior

2012-11-08 Thread Yongil Jang
: Thursday, November 8, 2012 2:26 PM Subject: Re: [sqlite] FTS substring behavior How about look at following URL? https://github.com/jonasfj/trilite AFAIK, FTS doesn't support substring search. I also tried to edit FTS to find substring by changing simple tokenizer. It was worked partially

[sqlite] FTS returns out of memory when use NEAR and OR

2012-10-24 Thread Vlad Seryakov
Hello For some time already i noticed that when i use NEAR/1 and OR in one query like SELECT * FROM search WHERE search MATCH 'tom NEAR/1 hanks or tom hanks' i get out of memory error. Running this on 16Gb laptop cannot be memory issue and the database only has several thousands of records.

Re: [sqlite] FTS returns out of memory when use NEAR and OR

2012-10-24 Thread Dan Kennedy
On 10/24/2012 11:07 PM, Vlad Seryakov wrote: Hello For some time already i noticed that when i use NEAR/1 and OR in one query like SELECT * FROM search WHERE search MATCH 'tom NEAR/1 hanks or tom hanks' Are you able to share the database file that you use to reproduce this? Thanks. Dan.

[sqlite] FTS: Phrase queries

2012-07-13 Thread Fabian
Ever since I started using FTS extensively, I frequently ran into this limitation: ** TODO: Strangely, it is not possible to associate a column specifier ** with a quoted phrase, only with a single token. Not sure if this was ** an implementation artifact or an intentional decision when

[sqlite] FTS Example Fails (matchinfo arguments)

2012-06-14 Thread Sergei G
I am running sqlite3 version 3.7.3 on debian. I run the following commands from fts3.html documentation page: CREATE VIRTUAL TABLE t1 USING fts4(a, b); INSERT INTO t1 VALUES('transaction default models default', 'Non transaction reads'); INSERT INTO t1 VALUES('the default transaction', 'these

Re: [sqlite] FTS Example Fails (matchinfo arguments)

2012-06-14 Thread Dan Kennedy
On 06/14/2012 01:27 PM, Sergei G wrote: I am running sqlite3 version 3.7.3 on debian. I run the following commands from fts3.html documentation page: CREATE VIRTUAL TABLE t1 USING fts4(a, b); INSERT INTO t1 VALUES('transaction default models default', 'Non transaction reads'); INSERT INTO t1

Re: [sqlite] FTS Example Fails (matchinfo arguments)

2012-06-14 Thread Sergei G
Is there a way I can obtain documentation that matches my version? Online documentation is for the most current version. I have found that both my hosting provider and debian stable are a bit behind, so I have to work with what I've got. Thanks On Thu, Jun 14, 2012 at 1:16 AM, Dan Kennedy

Re: [sqlite] FTS Example Fails (matchinfo arguments)

2012-06-14 Thread Kees Nuyt
On Thu, 14 Jun 2012 13:13:58 -0700, Sergei G sergeig.pub...@gmail.com wrote: Is there a way I can obtain documentation that matches my version? Online documentation is for the most current version. I have found that both my hosting provider and debian stable are a bit behind, so I have to work

Re: [sqlite] FTS Example Fails (matchinfo arguments)

2012-06-14 Thread Kevin Benson
On Thu, Jun 14, 2012 at 4:27 PM, Kees Nuyt k.n...@zonnet.nl wrote: On Thu, 14 Jun 2012 13:13:58 -0700, Sergei G sergeig.pub...@gmail.com wrote: Is there a way I can obtain documentation that matches my version? Online documentation is for the most current version. I have found that both my

Re: [sqlite] FTS Example Fails (matchinfo arguments)

2012-06-14 Thread Richard Hipp
On Thu, Jun 14, 2012 at 4:13 PM, Sergei G sergeig.pub...@gmail.com wrote: Is there a way I can obtain documentation that matches my version? Online documentation is for the most current version. I have found that both my hosting provider and debian stable are a bit behind, so I have to work

[sqlite] FTS simple tokenizer with custom delimeters

2012-05-06 Thread Jos Groot Lipman
While looking around in the source of the simple tokenizer I found code that suggests custom delimeters can be specified (I want to exclude the underscore). http://www.sqlite.org/src/artifact/5c98225a53705e5ee34824087478cf477bdb7004? ln=76-87 An indeed: CREATE VIRTUAL TABLE ft USING

[sqlite] Sqlite FTS retrieve inverted index

2012-03-12 Thread Mario Annau
Hello, unfortunately I have already posted this question on stackoverflowhttp://stackoverflow.com/questions/9657016/get-inverted-index-from-sqlite-fts-table, hope that this mailing list is right address. After I have implemented a full text search function in my application using Sqlite and FTS

Re: [sqlite] Sqlite FTS retrieve inverted index

2012-03-12 Thread Alexey Pechnikov
See http://www.sqlite.org/draft/fts3.html#fts4aux 2012/3/13 Mario Annau mario.an...@gmail.com: Hello, unfortunately I have already posted this question on stackoverflowhttp://stackoverflow.com/questions/9657016/get-inverted-index-from-sqlite-fts-table, hope that this mailing list is right

Re: [sqlite] Sqlite FTS retrieve inverted index

2012-03-12 Thread Mario Annau
, mario 2012/3/13 Mario Annau mario.an...@gmail.com: Hello, unfortunately I have already posted this question on stackoverflow http://stackoverflow.com/questions/9657016/get-inverted-index-from-sqlite-fts-table , hope that this mailing list is right address. After I have implemented

Re: [sqlite] FTS simple tokenizer

2012-02-28 Thread Dan Kennedy
On 02/28/2012 12:09 AM, Jos Groot Lipman wrote: It was reported before (and not solved) http://www.mail-archive.com/sqlite-users@sqlite.org/msg55959.html The document sources are updated now. So the fix will appear on the website next time it is regenerated.

Re: [sqlite] FTS simple tokenizer

2012-02-28 Thread Matt Young
Using the _ character to separate words is an informal language standard, s in: method_do_this... On Tue, Feb 28, 2012 at 12:40 AM, Dan Kennedy danielk1...@gmail.com wrote: On 02/28/2012 12:09 AM, Jos Groot Lipman wrote: It was reported before (and not solved)

Re: [sqlite] FTS simple tokenizer

2012-02-27 Thread Hamish Allan
Thanks Dan. Have just checked how to report bug, and apparently we already have :) Please excuse the brevity -- sent from my phone On 27 Feb 2012, at 07:06, Dan Kennedy danielk1...@gmail.com wrote: On 02/27/2012 05:59 AM, Hamish Allan wrote: The docs for the simple tokenizer

Re: [sqlite] FTS simple tokenizer

2012-02-27 Thread Jos Groot Lipman
Discussion of SQLite Database Cc: sqlite-users@sqlite.org Subject: Re: [sqlite] FTS simple tokenizer Thanks Dan. Have just checked how to report bug, and apparently we already have :) Please excuse the brevity -- sent from my phone On 27 Feb 2012, at 07:06, Dan Kennedy danielk1

[sqlite] FTS simple tokenizer

2012-02-26 Thread Hamish Allan
The docs for the simple tokenizer (http://www.sqlite.org/fts3.html#tokenizer) say: A term is a contiguous sequence of eligible characters, where eligible characters are all alphanumeric characters, the _ character, and all characters with UTF codepoints greater than or equal to 128. If I do:

Re: [sqlite] FTS simple tokenizer

2012-02-26 Thread Dan Kennedy
On 02/27/2012 05:59 AM, Hamish Allan wrote: The docs for the simple tokenizer (http://www.sqlite.org/fts3.html#tokenizer) say: A term is a contiguous sequence of eligible characters, where eligible characters are all alphanumeric characters, the _ character, and all characters with UTF

Re: [sqlite] FTS malformed MATCH expression: [( a* OR b*)]

2012-02-03 Thread Joe Mistachkin
The native SQLite code bundled with System.Data.SQLite is not compiled with the SQLITE_ENABLE_FTS3_PARENTHESIS option, which is required for the expression you are asking about to work properly. Of course, it can always be recompiled if you have access to Visual C++, by editing one of the

Re: [sqlite] FTS malformed MATCH expression: [( a* OR b*)]

2012-02-03 Thread Stefan Rogin
Thank you, I'll try to recompile. I looked in the Navicat folder and it had 2 sqlite dlls(sqlite and sqlite3), could those be of any good? În data de 03.02.2012 16:52, Joe Mistachkin sql...@mistachkin.com a scris: The native SQLite code bundled with System.Data.SQLite is not compiled with the

Re: [sqlite] FTS malformed MATCH expression: [( a* OR b*)]

2012-02-03 Thread Stefan Rogin
Hi, I tried to build with all default and it gave me this: Error 5 error LNK1181: cannot open input file 'root\SQLite.Interop\..\bin\2010\ReleaseModule\bin\System.Data.SQLite.netmodule' root \SQLite.Interop\LINK SQLite.Interop.2010 On Fri, Feb 3, 2012 at 5:32 PM, Stefan Rogin

Re: [sqlite] FTS malformed MATCH expression: [( a* OR b*)]

2012-02-03 Thread Stefan Rogin
Forget the last question. I've managed to get passed it :), I didn't open the whole solution file, just the SQLite.Interop.2010 project, I've seen that it's set on .Net 4 How can I set it to 3.5 and are there any drawbacks? Anyway, thanks for the quick reply. +1 for the support On Fri, Feb 3,

Re: [sqlite] FTS malformed MATCH expression: [( a* OR b*)]

2012-02-03 Thread Joe Mistachkin
Stefan Rogin wrote: I've seen that it's set on .Net 4 The VS 2010 project uses .NET 4, the VS 2008 project uses .NET 3.5. How can I set it to 3.5 and are there any drawbacks? Depends on what environment(s) you are going to use your application in. There are trade-offs; however, that is

[sqlite] FTS malformed MATCH expression: [( a* OR b*)]

2012-02-02 Thread Stefan Rogin
Hi, I've encountered some issues when using *FTS4 MATCH* on a database, like the one mentioned in the subject (*malformed MATCH expression: [( a* OR b*)]*). From what I discovered it is triggered by using a quote at the beginning of a parenthesis, if I write *(b* OR a*)* it works just fine. What

[sqlite] [FTS] Executing Sql statements inside a custom tokenizer

2012-01-03 Thread Abhinav Upadhyay
Hi, I would like to build up a table of all the unique words occurring in my corpus (for spelling suggestion feature). Presently I am using the Porter stemming tokenizer and I would not like to stop using the stemmer at any cost. Although if I was not using the Porter stemmer then I could easily

Re: [sqlite] [FTS] Executing Sql statements inside a custom tokenizer

2012-01-03 Thread Petite Abeille
On Jan 3, 2012, at 8:30 PM, Abhinav Upadhyay wrote: What other options do I have ? Two FTS tables? One with the Porter stemmer, for search, one without, to build the auxiliary tables? ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] [FTS] Executing Sql statements inside a custom tokenizer

2012-01-03 Thread Abhinav Upadhyay
Two FTS tables? One with the Porter stemmer, for search, one without, to build the auxiliary tables? Yeah, that is the last option, if nothing else works. For a small set of documents the extra processing time might be ok but for a larger set of documents building the FTS tables twice might be

[sqlite] Fts */or. Inconsistencies

2011-12-12 Thread Ephraim Stevens
SQLite Gurus, In SQLIte FTS3/4, does the '*' (wildcard expansion character) discriminate between alphanumeric characters vs non-alpha numeric characters when matching? I have two test cases below which causes me to believe that it does. Also, the OR operator appears to fail when matching against

Re: [sqlite] Fts */or. Inconsistencies

2011-12-12 Thread Dan Kennedy
On 12/13/2011 02:29 AM, Ephraim Stevens wrote: I'm using a custom tokenizer in each scenario (yes it works and the proof is enclosed). In the first dataset, the data was tokenized such that any alphanumeric character qualifies as part of a token. In the second dataset, the data was tokenized

[sqlite] FTS Tokenizer (separator)

2011-12-09 Thread Ephraim Stevens
Greetings All, From section seven of the FTS3/FTS4 documentation: A term is a contiguous sequence of eligible characters, where eligible characters are all alphanumeric characters, the _ character, and all characters with UTF codepoints greater than or equal to 128. All other characters are

Re: [sqlite] FTS Tokenizer (separator)

2011-12-09 Thread Richard Hipp
On Fri, Dec 9, 2011 at 6:48 AM, Ephraim Stevens ephraim.stev...@gmail.comwrote: Greetings All, From section seven of the FTS3/FTS4 documentation: A term is a contiguous sequence of eligible characters, where eligible characters are all alphanumeric characters, the _ character, and all

Re: [sqlite] FTS: Phrase queries

2011-11-27 Thread Fabian
2011/11/14 nobre rafael.ro...@novaprolink.com.br Comment from the source: ** TODO: Strangely, it is not possible to associate a column specifier ** with a quoted phrase, only with a single token. Not sure if this was ** an implementation artifact or an intentional decision when fts3 was

Re: [sqlite] FTS: Phrase queries

2011-11-14 Thread nobre
Comment from the source: ** TODO: Strangely, it is not possible to associate a column specifier ** with a quoted phrase, only with a single token. Not sure if this was ** an implementation artifact or an intentional decision when fts3 was ** first implemented. Whichever it was, this

[sqlite] FTS: Phrase queries

2011-11-13 Thread Fabian
When I have a basic FTS query that needs to be restricted to a column, I can write it in two ways: 1.) WHERE column MATCH 'apple' 2.) WHERE table MATCH 'column:apple' But when I have a phrase query, I can only write it in one way: 1.) WHERE column MATCH 'apple juice' The problem is that when I

[sqlite] FTS vs INDEX

2011-10-19 Thread Fabian
Did anyone do some benchmarks how the insert-speed of FTS compares to a TEXT INDEX column? I don't need many of the extra features of FTS, because I always need to look up rows by prefix or exact match, and both can be implemented efficiently via TEXT INDEX too. But if the overhead is comparable,

Re: [sqlite] FTS vs INDEX

2011-10-19 Thread Black, Michael (IS)
, 2011 9:20 AM To: General Discussion of SQLite Database Subject: EXT :[sqlite] FTS vs INDEX Did anyone do some benchmarks how the insert-speed of FTS compares to a TEXT INDEX column? I don't need many of the extra features of FTS, because I always need to look up rows by prefix or exact match

Re: [sqlite] FTS vs INDEX

2011-10-19 Thread Fabian
] Sent: Wednesday, October 19, 2011 9:20 AM To: General Discussion of SQLite Database Subject: EXT :[sqlite] FTS vs INDEX Did anyone do some benchmarks how the insert-speed of FTS compares to a TEXT INDEX column? I don't need many of the extra features of FTS, because I always need to look up rows

Re: [sqlite] FTS vs INDEX

2011-10-19 Thread Alexey Pechnikov
FTS use index multi-tree and de-facto has _no_ insert speed degradation. I did do test for 400+ millions of records. With b-tree index there is insert speed degradation: http://geomapx.blogspot.com/2010/04/sqlite-index-degradation-tests.html http://geomapx.blogspot.com/search?q=index+speed So FTS

Re: [sqlite] FTS vs INDEX

2011-10-19 Thread Fabian
2011/10/19 Alexey Pechnikov pechni...@mobigroup.ru FTS use index multi-tree and de-facto has _no_ insert speed degradation. Thanks, that's good to hear! It makes me wonder why SQLite doesn't use that same multi-tree mechanism for regular indexes, but that's a whole different question.

Re: [sqlite] FTS vs INDEX

2011-10-19 Thread Alexey Pechnikov
2011/10/19 Fabian fabianpi...@gmail.com: Thanks, that's good to hear! It makes me wonder why SQLite doesn't use that same multi-tree mechanism for regular indexes, but that's a whole different question. It's impossible with SQLite3 database format. May be SQLite4 will be support it :) --

Re: [sqlite] FTS vs INDEX

2011-10-19 Thread Black, Michael (IS)
: [sqlite] FTS vs INDEX Very interesting benchmarks! However it seems to focus mainly on the speed of SELECT queries, and the total size of the resulting database on disk. But my main concern is about the speed of INSERT queries vs normal tables. Any chance you compared that too

Re: [sqlite] FTS vs INDEX

2011-10-19 Thread Scott Hess
On Wed, Oct 19, 2011 at 7:56 AM, Fabian fabianpi...@gmail.com wrote: 2011/10/19 Alexey Pechnikov pechni...@mobigroup.ru FTS use index multi-tree and de-facto has _no_ insert speed degradation. Thanks, that's good to hear! It makes me wonder why SQLite doesn't use that same multi-tree

Re: [sqlite] FTS vs INDEX

2011-10-19 Thread Fabian
2011/10/19 Scott Hess sh...@google.com To be clear, how it works is that new insertions are batched into a new index tree, with index trees periodically aggregated to keep selection efficient and to keep the size contained. So while the speed per insert should remain pretty stable constant,

[sqlite] FTS: Reduce tokens

2011-10-19 Thread Fabian
Using the default tokenizer, everything that is not an alphanumeric character or an underscore, will generate a new token. I have a lot of columns that contains e-mail addresses or URL's, and most of them have characters like '.', '@' and '/'. Is there a simple way to make FTS see them as one

Re: [sqlite] FTS vs INDEX

2011-10-19 Thread Scott Hess
On Wed, Oct 19, 2011 at 12:50 PM, Fabian fabianpi...@gmail.com wrote: 2011/10/19 Scott Hess sh...@google.com To be clear, how it works is that new insertions are batched into a new index tree, with index trees periodically aggregated to keep selection efficient and to keep the size contained.  

Re: [sqlite] FTS vs INDEX

2011-10-19 Thread Alexey Pechnikov
2011/10/19 Fabian fabianpi...@gmail.com: I always do inserts in batches of 100.000 rows, and after each batch I manually merge the b-trees using:  INSERT INTO table(table) VALUES('optimize'); Is there a possibility that it will do automatic maintenance half-way during a batch? Or will it

[sqlite] FTS management

2011-09-30 Thread Gabriele Favrin
Hello. I've always got great help in this list so I thank in advance who posts here and who will answer to my question. I've started to use FTS in a web site for search thru a table of sites. Given a main table containing, among others, fields id, url, nome (title) and descrizione

[sqlite] FTS: prefix wildcards?

2011-07-21 Thread Sebastian Vogelsang
Hey guys, as far as I understand the documentation FTS3/4 does not support prefix wildcards when searching (e.g. *board = skateboard, longboard, snowboard). Is there any way to get this working by now? I read that the right tokenizer may help. Are there any open source ones out there?

Re: [sqlite] FTS sqlite3_last_insert_rowid

2011-05-14 Thread Steven Parkes
Please try the latest code checkin ( http://www.sqlite.org/src/info/e569f18b98) and let me know if it works any better for you. Thanks. I've already adjusted the code to manually assign keys, but I'll try to get back to checking it. ___ sqlite-users

[sqlite] FTS sqlite3_last_insert_rowid

2011-05-13 Thread Steven Parkes
I gather sqlite3_last_insert_rowid doesn't play well with FTS? I don't see an exception noted in the docs but neither are there non-manually managed examples. I'd prefer not to manually mange them but ... ___ sqlite-users mailing list

Re: [sqlite] FTS sqlite3_last_insert_rowid

2011-05-13 Thread skywind mailing lists
Hi, FTS and sqlite3_last_insert_rowid do not work together. This is a known shortcoming. Basically this also means that you can't use any triggers involving FTS. Regards, Hartwig Am 13.05.2011 um 17:38 schrieb Steven Parkes: I gather sqlite3_last_insert_rowid doesn't play well with FTS? I

Re: [sqlite] FTS sqlite3_last_insert_rowid

2011-05-13 Thread Richard Hipp
On Fri, May 13, 2011 at 11:38 AM, Steven Parkes smpar...@smparkes.netwrote: I gather sqlite3_last_insert_rowid doesn't play well with FTS? I don't see an exception noted in the docs but neither are there non-manually managed examples. Please try the latest code checkin (

[sqlite] fts virtual table questions

2011-05-12 Thread Paul Shaffer
the source of data for fts virtual table creation, the fts virtual table retains all the expired data. In this case do you drop the fts table and recreate it, or try to delete rows in the fts table? I would gladly get all this info from docs and not bother you, but the docs on sqlite fts don't have

Re: [sqlite] fts virtual table questions

2011-05-12 Thread Richard Hipp
. In this case do you drop the fts table and recreate it, or try to delete rows in the fts table? Just delete the rows in the FTS table. I would gladly get all this info from docs and not bother you, but the docs on sqlite fts don't have much practical everyday usage information

Re: [sqlite] FTS snippet()

2011-04-14 Thread Gert Van Assche
Drake, if I do this, I get: SQL logic error or missing database. Thanks Gert ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] FTS snippet()

2011-04-13 Thread Gert Van Assche
Hi all, I'm sure I'm doing something stupid here... CREATE VIRTUAL TABLE example USING fts4(TOKEN, CONTEXT); INSERT INTO example(TOKEN, CONTEXT) VALUES('one', 'This is just one sentence.'); INSERT INTO example(TOKEN, CONTEXT) VALUES('two', 'This is just one sentence. Sorry, it

Re: [sqlite] FTS snippet()

2011-04-13 Thread Drake Wilson
Quoth Gert Van Assche ger...@gmail.com, on 2011-04-13 22:35:49 +0200: SELECT snippet(example, '[', ']') FROM example WHERE CONTEXT MATCH (SELECT TOKEN FROM example); You're asking to match a single independently arbitrarily chosen token from anywhere in the table (which is not even the

  1   2   3   >