382 Commits

Author SHA1 Message Date
Kishore Nallan
42d0c31140 HTTPS is now supported! 2017-11-25 18:24:33 +05:30
Kishore Nallan
3d38b63d7f Support upto 500 search results. 2017-11-24 17:53:38 +05:30
Kishore Nallan
7b168616ab Remove document from memory only from the index it exists in. 2017-11-22 09:54:28 +05:30
Kishore Nallan
2c9f3f973f NODE48 deletion during tear down of the tree was not considering all children. [ART] 2017-11-22 09:53:47 +05:30
Kishore Nallan
17b2201c52 Another round of h2o related resource clean up. [Valgrind]
No more h2o related valgrind warnings.
2017-11-20 07:39:46 +05:30
Kishore Nallan
d132098463 Free h2o related resources to have a clean shutdown. [Valgrind] 2017-11-19 20:41:31 +05:30
Kishore Nallan
7fc26d0799 Use find in scoring loop to speed up things. 2017-11-19 08:38:18 +05:30
Kishore Nallan
eff61d2c25 Search for documents parallely. 2017-11-18 22:22:52 +05:30
Kishore Nallan
78b9ee52ec Make match score computation predictable and consistent across multiple indexes. 2017-11-12 22:31:29 +05:30
Kishore Nallan
f347375adb Compiles, but tests are failing. 2017-11-07 17:17:32 +05:30
Kishore Nallan
9856c3888a Create new collection.h and collection.cpp as a clone of index.h and index.cpp. 2017-11-06 12:47:43 +05:30
Kishore Nallan
883a9f14a0 Rename collection.h and collection.cpp to index.h and index.cpp. 2017-11-06 12:46:00 +05:30
Kishore Nallan
543b9b1139 Dockerfile with gdb and valgrind installed for testing. 2017-11-05 10:46:54 +05:30
Kishore Nallan
c1c7d493e5 Allow an integer to be passed to a field defined as a float.
In the real world, this is common and it's better to be practical here.
2017-11-05 10:45:45 +05:30
Kishore Nallan
6f231dd989 Init collection requires a json object. 2017-11-05 10:22:53 +05:30
Kishore Nallan
e4a7371219 Upgrade json lib. 2017-11-05 10:21:52 +05:30
Kishore Nallan
3907c2d3f9 Fixed an out-of-bounds bug with highlighting. 2017-11-03 21:07:56 +05:30
Kishore Nallan
a7479171b1 Limit number of prefix candidates to a constant.
Using number of results for comparison results in change of total count during pagination.
2017-11-02 18:04:55 +05:30
Kishore Nallan
93430444d0 Prefix sort field can also be a float 2017-10-25 18:18:07 +05:30
Kishore Nallan
a7ba29666e Float field type should be captialized. 2017-10-24 08:33:16 +05:30
Kishore Nallan
a6dced3c43 Do all validations upfront before attempting to index fields. 2017-10-23 21:32:51 +05:30
Kishore Nallan
82403ff618 Extract token normalization to a separate function. 2017-10-22 20:26:01 +05:30
Kishore Nallan
a2ce56fd67 Allow string fields to be filtered on.
A rather convenient feature to have - but it would be a match of all tokens without typo tolerance.
2017-10-22 19:52:09 +05:30
Kishore Nallan
ca3a55974e Change search_by to query_by. 2017-10-22 18:46:03 +05:30
Kishore Nallan
da295e90e8 Tests for array utils. 2017-10-22 17:05:25 +05:30
Kishore Nallan
0e4517d901 Combine search, facet and sort fields into a single "fields".
1. All numerical fields are added to sort index automatically since that makes logical sense.
2. Search fields to be used as a facet are to have a `facet: true` property - removes duplication.
3. If someone wants to use a faceted field also to search against (rare scenario), then they can duplicate that field without the `facet: true` property.
2017-10-17 21:51:07 +05:30
Kishore Nallan
8644fa5d79 Minor changes in API response field names. 2017-10-14 09:51:36 +05:30
Kishore Nallan
bb3ca4211a Test for pagination. 2017-09-24 22:00:57 +05:30
Kishore Nallan
b3689e16aa Improve test harness to cover some missing cases. 2017-09-23 21:21:13 +05:30
Kishore Nallan
b0cb3ceb41 Set a ceiling on num_typos so that 1 and 2 char prefix searches make sense. 2017-09-22 20:59:26 +05:30
Kishore Nallan
e24e0fae5d Node score should be a int32_t. 2017-09-21 19:40:41 +05:30
Kishore Nallan
b2f0ca495d Refactor a couple of methods in collection manager. 2017-09-21 16:55:15 +05:30
Kishore Nallan
9c1a8a2364 Defensive checks against JSON parse failures. 2017-09-21 08:42:07 +05:30
Kishore Nallan
901626652a Make type definitions less verbose.
Use string[] instead of STRING_ARRAY and so on.
2017-09-19 22:01:08 +05:30
Kishore Nallan
6ab58d1839 Added a dispose() method for freeing collection manager's in-memory data. 2017-09-18 12:35:37 +05:30
Kishore Nallan
7220a9e51d Cleanly exit server on sigint.
Valgrind "definitely lost" and "indirectly lost" are zero now.
2017-09-17 13:59:47 +05:30
Kishore Nallan
6a2f2fa26f Find curl library using find_package.
For Apple, rely on dynamic version of the curl library since the static version is not linking properly.
2017-09-16 20:41:51 +05:30
Kishore Nallan
8b740efc7a Add curl dependency - build from source. 2017-09-16 20:40:03 +05:30
Kishore Nallan
f946f25c62 Fix a couple of valgrind errors. 2017-09-16 20:38:50 +05:30
Kishore Nallan
58bc73312d Replicate deletion of document and dropping of collection. 2017-09-14 22:44:29 +05:30
Kishore Nallan
58a10877ee Basics of background replication.
Supports inserts. Deletion will be tackled next.
2017-09-14 09:58:44 +05:30
Kishore Nallan
3febb7840a Generalize the custom message struct such that it can support multiple types of messages and values. 2017-09-10 15:48:41 +05:30
Kishore Nallan
ea246f1c45 Collect and send replication updates in an async fashion.
This ensures that the query performance is not affected by replication running constantly in the background.
2017-09-02 15:56:07 +05:30
Kishore Nallan
6a465a0289 API for fetching all transactions from a given transaction sequence number.
Relying on RocksDB underlying APIs for that. The updates are sent in a Base64 encoding in the JSON response.
2017-08-31 09:42:11 +05:30
Kishore Nallan
7509de2300 Upgrade H2O + fixed core dump on Linux release build.
Core dump on Linux on release build (debug build is fine) when `h2o_accept_ctx_t` was stack allocated.
2017-08-21 12:30:48 +05:30
Kishore Nallan
47aca7e664 Use reference instead of copy. 2017-08-21 09:17:05 +05:30
Kishore Nallan
d351523655 Allow results to be sorted on a float field. 2017-08-20 21:15:48 +05:30
Kishore Nallan
3104dea42a Generify the topster container to hold both integer and float.
Benchmarked to ensure that performance is on par.
2017-08-20 15:25:11 +05:30
Kishore Nallan
ea550f167c For prefix search, only the last term in the query should be considered as prefix. 2017-08-19 10:42:49 +05:30
Kishore Nallan
f5848be750 Address prefix search issues.
Score based comparison was broken - test has been enhanced.
2017-08-18 23:17:28 +05:30