-
Notifications
You must be signed in to change notification settings - Fork 1.1k
How to turn on and use rtree spatial? How to use full text search? #390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Look for "load extension", "FTS3", "spatialite" in the existing issues: |
don't know about rtree, but the following full-text-search example works fine in the online-demo: -- Create an FTS table
DROP TABLE IF EXISTS pages;
CREATE VIRTUAL TABLE pages USING fts4(title, body);
-- Insert a row with a specific docid value.
INSERT INTO pages(docid, title, body) VALUES(53, 'Home Page', 'SQLite is a software...');
-- Insert a row and allow FTS to assign a docid value using the same algorithm as
-- SQLite uses for ordinary tables. In this case the new docid will be 54,
-- one greater than the largest docid currently present in the table.
INSERT INTO pages(title, body) VALUES('Download', 'All SQLite source code...');
INSERT INTO pages(title, body) VALUES('Upload', 'Upload SQLite src code...');
-- Example full-text-search queries
SELECT * FROM pages WHERE pages MATCH 'sqlite';
SELECT * FROM pages WHERE pages MATCH 's* code'; |
I looked all, find impossible, no easy way, unless, you know how to compile raw c include spatial. Can any of you provide a browser distribution with spatial extension included? |
Very good. full text search use virtual table in memory, not store on physical hard disk, correct? |
https://www.sqlite.org/fts3.html I find some answer to my own question: FTS3,4 means full text search, + version 3, 4 On c version of sqlite, virtual table no in ram(memory), still store in disk.
Does it auto update index everytime insert a row? Yes.
|
sql.js runs entirely in memory. i'm not sure its practical to load the 2gb enron dataset w/ sql.js. my experience with chrome-browser (windows version) is that it will frequently crash when loading databases >200mb into memory. 100mb (typically a table with <500k rows) is probably the practical limit for sql.js datasets. and by practical, i mean the UX-performance is near limit in terms of human-usability:
|
Very good, to clear these fact, that give me the idea how the performance is. I use lunr.js for full text search, looking for alternative, due to
that will avoid "out of memory" crash.
|
I have compare sql.js with lunr.js in terms of full text search. Both use in memory storage, small to medium size data, both are same fast, but when large data, 150k json items will crash lunr.js, not sure why. sqlite wins here. |
thx for feedback on real-world performance. that's always good-to-know : ) |
I know this have rtree already, but I don't know how to use it.
Can you write some usage in readme?
How to turn on and use rtree , do spatial query, like intersect, within? How to use full text search?
spatial query and full text search are 2 fundermental function I need.
The text was updated successfully, but these errors were encountered: