Re: [sqlite] Extending Porter Tokenizer

2016-07-09 Thread Abhinav Upadhyay
On Fri, Jul 8, 2016 at 3:01 AM, Matthias-Christian Ott wrote: > On 2016-07-05 18:11, Abhinav Upadhyay wrote: >> I'm wondering if it is possible to extend the functionality of the >> porter tokenizer. I would like to use the functionality of the Porter >> tokenizer but be

[sqlite] Extending Porter Tokenizer

2016-07-05 Thread Abhinav Upadhyay
Hi, I'm wondering if it is possible to extend the functionality of the porter tokenizer. I would like to use the functionality of the Porter tokenizer but before stemming the token, I want to decide whether the token should be stemmed or not. Do I need to copy the Porter tokenizer and modify it t

[sqlite] Preventing certain query keywords from getting stemmed

2016-05-29 Thread Abhinav Upadhyay
Hi, While running queries, sometimes there are technical keywords which shouldn't be stemmed by the tokenizer. For example, if I query for "lfs" (which is a file system), the porter stemmer, converts it to "lf", which matches many other unrelated keywords in the corpus (such as ascii lf or some ot

Re: [sqlite] Limit on the Compound Select Statements

2012-02-23 Thread Abhinav Upadhyay
On Thu, Feb 23, 2012 at 6:50 PM, Simon Slavin wrote: > > On 23 Feb 2012, at 1:16pm, Abhinav Upadhyay > wrote: > >> I do not remember the >> exact error message but it close to this. As per the documentation on >> the compound select statements >> (http:/

[sqlite] Limit on the Compound Select Statements

2012-02-23 Thread Abhinav Upadhyay
Hi, I have a single column table, in which I wish to store around several thousands of rows. I was wondering if I could insert them using a single INSERT query and came across this Stackoverflow answer: http://stackoverflow.com/a/1734067/348637 . According to that answer it is possible to insert m

Re: [sqlite] File checking mechanism.

2012-02-01 Thread Abhinav Upadhyay
On Wed, Feb 1, 2012 at 1:37 PM, bhaskarReddy wrote: > > Hi Friends, > >         Is there any File checking mechanism in sqilte3. > >         Suppose i have a file ABCD.db, before i want to create the data > base file, i want to check whether it is already exit with the same or not. > If it is exis

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 b

[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 o

Re: [sqlite] FTS3/FTS4 - Finding the term(s) that completes the input

2011-11-20 Thread Abhinav Upadhyay
On Mon, Nov 21, 2011 at 12:17 AM, Mohit Sindhwani wrote: > Hi, I'm finding my way through FTS3/FTS4 to replace some of the old code > that we have for searching terms within titles.  I now know that FTS3/4 > should be the way to proceed. > > So far, I have this: > - an FTS4 table that has two colu

Re: [sqlite] Attaching an in-memory database

2011-08-27 Thread Abhinav Upadhyay
On Sat, Aug 27, 2011 at 9:52 PM, Simon Slavin wrote: > > On 27 Aug 2011, at 4:50pm, Abhinav Upadhyay wrote: > >> sqlite3_exec(db, "ATTACH DATABASE :memory AS metadb", NULL, NULL, &errmsg); > > Need a colon after 'memory': > > ATTACH DATABASE &

[sqlite] Attaching an in-memory database

2011-08-27 Thread Abhinav Upadhyay
Hi, I am trying to attach an in-memory database and then create a table in it. Here is the code that I am using: /* I have already opened a connection to a database before the following */ sqlite3_exec(db, "ATTACH DATABASE :memory AS metadb", NULL, NULL, &errmsg); if (errmsg != NULL) {

Re: [sqlite] Use of VACUUM

2011-08-11 Thread Abhinav Upadhyay
On Fri, Aug 12, 2011 at 12:28 AM, Richard Hipp wrote: > On Thu, Aug 11, 2011 at 2:48 PM, Abhinav Upadhyay < > er.abhinav.upadh...@gmail.com> wrote: > >> On Fri, Aug 12, 2011 at 12:05 AM, Michael Stephenson >> wrote: >> > If you use INTEGER PRIMARY KEY, t

Re: [sqlite] Use of VACUUM

2011-08-11 Thread Abhinav Upadhyay
On Fri, Aug 12, 2011 at 12:05 AM, Michael Stephenson wrote: > If you use INTEGER PRIMARY KEY, that column becomes your rowids; this does > not create a new, separate column in addition to the rowid column. Indeed, but the INTEGER PRIMARY KEY column would count as a user defined column and thus aff

Re: [sqlite] Use of VACUUM

2011-08-11 Thread Abhinav Upadhyay
On Thu, Aug 11, 2011 at 11:14 PM, Igor Tandetnik wrote: > On 8/11/2011 1:35 PM, Abhinav Upadhyay wrote: >> The documentation page of the VACUUM command says that "The VACUUM >> command may change the ROWIDs of entries in any tables that do not >> have an explicit INTEGER

Re: [sqlite] Use of VACUUM

2011-08-11 Thread Abhinav Upadhyay
On Thu, Aug 11, 2011 at 11:15 PM, Simon Slavin wrote: > > On 11 Aug 2011, at 6:35pm, Abhinav Upadhyay wrote: > >> The documentation page of the VACUUM command says that "The VACUUM >> command may change the ROWIDs of entries in any tables that do not >> have an e

[sqlite] Use of VACUUM

2011-08-11 Thread Abhinav Upadhyay
Hi, The documentation page of the VACUUM command says that "The VACUUM command may change the ROWIDs of entries in any tables that do not have an explicit INTEGER PRIMARY KEY." So what are the possible cases in which the ROWIDs might change ? Thanks Abhinav ___

Re: [sqlite] [FTS3] Understanding the Flow of data through the tokenizer

2011-07-25 Thread Abhinav Upadhyay
On Mon, Jul 25, 2011 at 9:54 AM, Dan Kennedy wrote: > On 07/24/2011 08:16 PM, Abhinav Upadhyay wrote: >> Hi, >> >> I am trying to write my own custom tokenizer to filter stopwords apart >> from doing normalization and stemming. I have gone through the >> comments

[sqlite] [FTS3] Understanding the Flow of data through the tokenizer

2011-07-24 Thread Abhinav Upadhyay
Hi, I am trying to write my own custom tokenizer to filter stopwords apart from doing normalization and stemming. I have gone through the comments in fts3_tokenizer.h and also read the implementation of the simple tokenizer. While overall I am able to understand what I need to do to implement this

Re: [sqlite] [FTS3] Header to include for a custom tokenizer

2011-07-23 Thread Abhinav Upadhyay
On Sun, Jul 24, 2011 at 1:40 AM, Abhinav Upadhyay wrote: > On Sat, Jul 23, 2011 at 11:00 PM, Richard Hipp wrote: >> On Sat, Jul 23, 2011 at 1:01 PM, Abhinav Upadhyay < >> er.abhinav.upadh...@gmail.com> wrote: >> >>> Hi, >>> >>>  I am usi

Re: [sqlite] [FTS3] Header to include for a custom tokenizer

2011-07-23 Thread Abhinav Upadhyay
On Sat, Jul 23, 2011 at 11:00 PM, Richard Hipp wrote: > On Sat, Jul 23, 2011 at 1:01 PM, Abhinav Upadhyay < > er.abhinav.upadh...@gmail.com> wrote: > >> Hi, >> >>  I am using the Sqlite3 amalgamation. I am trying to register a custom >> tokenizer with sq

[sqlite] [FTS3] Header to include for a custom tokenizer

2011-07-23 Thread Abhinav Upadhyay
Hi, I am using the Sqlite3 amalgamation. I am trying to register a custom tokenizer with sqlite for my FTS application. The custom tokenizer is in it's separate source file. I have included sqlite3.h header with the tokenizer source but sqlite3.h does not contain the declaration of the various st

Re: [sqlite] [FTS3] The Compress and Uncompress functions and extension

2011-07-22 Thread Abhinav Upadhyay
On Fri, Jul 22, 2011 at 1:32 PM, Abhinav Upadhyay wrote: > On Fri, Jul 22, 2011 at 12:38 PM, Alexey Pechnikov > wrote: >> But why you don't use compress/uncompress functions from DRH? See >> http://www.mail-archive.com/sqlite-users%40sqlite.org/msg17018.html >> >&

Re: [sqlite] [FTS3] The Compress and Uncompress functions and extension

2011-07-22 Thread Abhinav Upadhyay
On Fri, Jul 22, 2011 at 12:38 PM, Alexey Pechnikov wrote: > But why you don't use compress/uncompress functions from DRH? See > http://www.mail-archive.com/sqlite-users%40sqlite.org/msg17018.html > > I did wrap these into extension and add SQLITE_COMPRESS_MIN_LENGTH > http://sqlite.mobigroup.ru/ar

Re: [sqlite] [FTS3] The Compress and Uncompress functions

2011-07-20 Thread Abhinav Upadhyay
On Wed, Jul 20, 2011 at 7:51 PM, Abhinav Upadhyay wrote: > Hi, > > I have an FTS table with compress and uncompress options enabled. I am > using zlib(3) for doing the compression. The compression function > seems to be doing ok as I can see the size of the database coming down >

[sqlite] [FTS3] The Compress and Uncompress functions

2011-07-20 Thread Abhinav Upadhyay
Hi, I have an FTS table with compress and uncompress options enabled. I am using zlib(3) for doing the compression. The compression function seems to be doing ok as I can see the size of the database coming down drastically. But I the uncompress function is not working properly. For example if I

[sqlite] Data type of the blob returned by matchinfo()

2011-07-12 Thread Abhinav Upadhyay
Hi, Quoting the ranking function given in the appendix of the FTS3 documentation page (http://www.sqlite.org/fts3.html#appendix_a) static void rankfunc(sqlite3_context *pCtx, int nVal, sqlite3_value **apVal){ int *aMatchinfo;/* Return value of matchinfo() */ ... ... aMatchinfo =