45 Commits

Author SHA1 Message Date
kishorenc
bc1d88f1eb Consider tokens matching across fields during ranking. 2020-12-28 19:20:00 +05:30
kishorenc
d7f94aa25a Remove field based match score aggregation in topster.
This is now handled outside.
2020-12-28 19:19:59 +05:30
kishorenc
8f818f7fcb More exhaustive multi-field ranking. 2020-12-28 19:19:59 +05:30
kishorenc
f164de4702 Multi field matching: ensure best matched field prevails. 2020-12-28 19:19:59 +05:30
kishorenc
7e2b0fcdcb Match query tokens across multiple fields effectively. 2020-12-28 19:19:59 +05:30
Kishore Nallan
908a8b0026 [Bug] String array field update + faceting.
Updates to string array fields were triggering a crash during faceting due to mismatch in array position.
2020-11-03 19:36:25 +05:30
kishorenc
ef40516790 Fixing an issue with grouping across indices. 2020-06-18 18:17:33 +05:30
kishorenc
b7dcb7367b Expose group by params. 2020-06-10 19:58:55 +05:30
kishorenc
8ffb9c5154 Reuse KV pointers instead of copying as objects. 2020-06-07 17:36:27 +05:30
kishorenc
b97c37215a Basic distinct test is passing. 2020-06-06 15:14:53 +05:30
kishorenc
8f458640fd Choose sift down/up based on array size. 2020-06-06 13:20:42 +05:30
kishorenc
5b2407433f Refactor topster to support grouping. 2020-06-05 20:41:51 +05:30
kishorenc
eced0873c2 Remove some duplication in topster. 2020-05-29 09:14:31 +05:30
kishorenc
5e1c5f2093 Ditch use of number_t for sorting. 2020-03-05 08:03:01 +05:30
kishorenc
eed10d554d Sort results on custom order. 2020-03-04 20:27:33 +05:30
kishorenc
7943839de2 Delete kvs. 2020-02-18 21:35:22 +05:30
kishorenc
fd285b6fbe Allow maximum hits returned to be configurable.
This obviously has a performance impact, but it might not be a big deal for most people and is now left to their discretion. The default of 500 results stays to maintain backward compatibility.
2020-02-10 20:54:38 +05:30
Kishore Nallan
c1b9501351 Lay foundations for overriding search results. 2019-08-10 19:46:37 +05:30
Kishore Nallan
13964b6a57 Allow collections to be symlinked by an alternative name. 2018-07-30 19:48:17 +05:30
Kishore Nallan
4f1736124b Use heap allocation rather than stack allocation for topster data. 2018-05-04 20:23:28 +05:30
Kishore Nallan
56ed39e3ff Refactor topster to ensure that it handles insertion of duplicate keys.
Instead of ignoring a duplicate blindly, ignore when match score is less than existing key.
2018-04-30 20:28:56 +05:30
Kishore Nallan
71f1fbb4aa Refactor query index logic. 2018-04-25 19:32:46 +05:30
Kishore Nallan
1d1cd2459b When multiple fields are searched, the same document should not be returned twice. 2018-04-24 17:49:04 +05:30
Kishore Nallan
3d38b63d7f Support upto 500 search results. 2017-11-24 17:53:38 +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
6a6785ef74 Short circuit to speed up single token searches.
- Refactor token position population
- Store only the query index in topster instead of storing the full offsets.
- Calculate the offsets finally on the results that are to be returned.
2017-08-08 17:39:23 -04:00
Kishore Nallan
3efaed15b8 Fixed a few bugs with calculation of best matched token offsets to be used for highlighting. 2017-06-13 12:03:24 -05:00
Kishore Nallan
50e08726da String field tokens which match with query tokens are highlighted in the results. 2017-06-09 14:59:06 -05:00
Kishore Nallan
1d5146f7ff Track best-matched token offsets needed for highlighting.
- We store the best matched token offset positions in Topster KV
- Using run-length encoding (via unions) to pack the offset diffs intelligently
2017-06-09 13:32:03 -05:00
Kishore Nallan
da263b69ea Stable sort does not require key comparison. 2017-01-11 21:47:28 +05:30
Kishore Nallan
a67e8f4caa Refactor - use std::tie for comparator. 2017-01-11 20:43:55 +05:30
Kishore Nallan
ce471c9bb1 Keep the hashset bounded by deleting the element to be replaced in heap from the set. 2017-01-09 19:17:53 +05:30
Kishore Nallan
d831c49817 Move duplicate ID detection right inside topster. 2017-01-08 21:44:36 +05:30
Kishore Nallan
54a60398ab Parameterize rank fields. 2016-12-29 21:45:38 +05:30
Kishore Nallan
473aa6d5f6 Basic test for topster. 2016-12-28 21:28:27 +05:30
Kishore Nallan
8aaa9b174f Allow use of custom primary and secondary attributes for ranking. 2016-12-23 21:07:53 +05:30
Kishore Nallan
5736888935 Tests for collection. 2016-11-13 21:59:32 +05:30
Kishore Nallan
9d5a120dab Replace unordered_map with sparsepp hashmap. Much faster! 2016-09-27 22:03:41 +05:30
Kishore Nallan
080eceea79 Remove bit packing - use proper struct. 2016-09-27 20:53:38 +05:30
Kishore Nallan
5cd8b72d0b Fixed a bug in top-K sorting. 2016-09-25 13:10:34 +05:30
Kishore Nallan
ba33da1d51 Lots of code clean up.
* Move stuff out of main to classes
* Standardize naming conventions.
2016-08-07 14:55:26 -07:00
Kishore Nallan
0f756efe74 Fix sorting - should be in ascending order. 2016-05-30 20:13:44 +05:30
Kishore Nallan
383212be46 Fix bugs in top-K implementation. 2016-05-15 09:01:05 +05:30
Kishore Nallan
ee77fb4d22 Add 2 more external dependencies via git submodule. 2016-01-24 14:35:40 +05:30