3882 Commits

Author SHA1 Message Date
Krunal Gandhi
058eb9db52
handle userid with '_' (#1853)
* fix endpoints and unused vars

* add response on failure of writing events to db

* update response code

* handle userid with '_' & dont process events with log_to_store disabled

* use '%' as separator instead of '_'

* optimize '%' removal from userid
2024-07-24 10:44:07 +05:30
Kishore Nallan
cc1588ecfa Flush analytics store before snapshot. 2024-07-22 21:29:32 +05:30
Krunal Gandhi
b0359000b1
Fx endpoint and unused vars for events API (#1849)
* fix endpoints and unused vars

* add response on failure of writing events to db

* update response code
2024-07-22 18:20:52 +05:30
Ozan Armağan
4ef900983d
Update CLIP tokenizer (#1845)
* Update CLIP tokenizer

* Add test

* Fix test

* Remove logs

* Update clip tokenizer repo
2024-07-22 14:20:52 +05:30
Krunal Gandhi
3494155b7a
update flag for logging events to store (#1846)
* remove analytics logging to tsv file

* add event_type in db_key & add tests for db persistence

* add test for sparsely added event retrieval

* update flag name to log events to store
2024-07-22 07:21:59 +05:30
Krunal Gandhi
99a774d359
remove analytics logging to tsv file (#1843)
* remove analytics logging to tsv file

* add event_type in db_key & add tests for db persistence

* add test for sparsely added event retrieval
2024-07-18 15:43:27 +05:30
Harpreet Sangar
d9b83a9fc7
Fix cascade deletion in case of a reference array field. (#1844)
* Add `Collection::cascade_remove_docs`.

* Fix recursive mutex locking.
2024-07-18 12:02:46 +05:30
Ozan Armağan
d5fa1809eb
Fix hanging issue when no response from OpenAI API (#1841)
Co-authored-by: Kishore Nallan <kishorenc@gmail.com>
2024-07-16 07:56:21 +05:30
Harpreet Sangar
bbeff25b6a
Fix failing persistence tests. (#1836) 2024-07-16 07:09:27 +05:30
Kishore Nallan
917cca9439 Fix persistence range_index and stem properties. 2024-07-14 22:10:18 +05:30
Kishore Nallan
99e11064a6 Fix highlighting for nested array of string. 2024-07-14 17:25:04 +05:30
Ozan Armağan
eb36846f17
Fix conversation model init order (#1833) 2024-07-12 21:49:53 +05:30
Kishore Nallan
6466249f76 Fix logic for finding first error in loading coll from disk. 2024-07-11 10:57:28 +05:30
Ozan Armağan
0b75cdcc3d
Support embedding generation from both image and text fields (#1826)
* Support embedding generation from both image and text fields

* Fix tests

* Fix test query

* Remove unnecessary logs

* Remove commented code

* Refactoring

* Refactor batch_embed_fields

* Refactor batch_embed_fields
2024-07-10 16:43:03 +05:30
Kishore Nallan
74e09ed8f5 Add sum_score text match type. 2024-07-10 10:49:29 +05:30
Harpreet Sangar
87e33e1970
Allow joining export documents. (#1822)
* Allow joining export documents.

* Add tests.
2024-07-10 10:48:57 +05:30
Krunal Gandhi
2f1dab72dd
return store value in collection_schema response (#1823) 2024-07-05 17:39:18 +05:30
Kishore Nallan
0eae0819ff Properly send analytics ptr. 2024-07-05 15:20:10 +05:30
Harpreet Sangar
b0014f9c05
Fix empty reference array field update. (#1820) 2024-07-04 12:41:33 +05:30
Kishore Nallan
8047b9f359 When alter fails unexpectedly, reset alter running state. 2024-07-03 13:20:53 +05:30
Kishore Nallan
4e7da7c643 Verify presence of analytics snapshot before loading. 2024-07-02 22:11:38 +05:30
Harpreet Sangar
6189fec042
Fix id field filter value parsing crash. (#1817) 2024-07-02 21:42:55 +05:30
Harpreet Sangar
6cb6a07891
sort_by nested join collection field. (#1793)
* sort_by nested join collection field.

* Refactor reference sort logic.
2024-07-02 15:17:08 +05:30
Harpreet Sangar
b92bba5f3f
Handle null value update of reference field. (#1814)
* Handle null value update of reference field.

* Fix `CollectionVectorTest, VectorWithNullValue`.

* Add tests.
2024-07-02 12:42:20 +05:30
Krunal Gandhi
b88f1fedbe
analytics db minor fixes (#1807)
* initial commit for analytics db with ttl

* refactor store class

* get last N events from db and minor changes

* add more tests & limit keys fetching per user

* fix local cluster sync & add test with alias

* revert get_collection_unsafe() call

* fix asan error & add event weight check
2024-07-01 14:42:42 +05:30
Krunal Gandhi
a1f8d7257a
analytics db with ttl (#1789)
* initial commit for analytics db with ttl

* refactor store class

* get last N events from db and minor changes

* add more tests & limit keys fetching per user
2024-06-27 12:41:51 +05:30
Ozan Armağan
7b1ed4ee79
Fix conversation model initialization (#1806)
* Fix conversation model initialization

* Rename `conversation_collection` to `history_collection`
2024-06-27 06:23:05 +05:30
Kishore Nallan
fed1a6300b Fix update of array reference field. 2024-06-25 14:12:03 +05:30
Krunal Gandhi
4c2b5d328f
fix typo for create event response (#1800) 2024-06-24 18:41:57 +05:30
Kishore Nallan
423577c04a Check length of filter token index during prefix/exact match. 2024-06-22 14:26:28 +05:30
Krunal Gandhi
e1bdfc1ca6
delete associated events on deleting rule (#1794)
* delete associated events on deleting rule

* remove mandatory query param & unnecessary if

* update failing test
2024-06-21 22:26:57 +05:30
Ozan Armağan
63f0b8025d
Fix conversation model id generation (#1790)
* Fix conversation model id generation

* Fix typo
2024-06-19 21:57:59 +05:30
Krunal Gandhi
34e864d4a8
enable counter events without analytics dir (#1788) 2024-06-18 13:14:32 +05:30
Kishore Nallan
03358bcf37 Fix null values in embed from field values. 2024-06-17 22:33:02 +05:30
Harpreet Sangar
b471620a24
Remove values from reference_index and object_array_reference_index in Index::remove_field. (#1787) 2024-06-17 19:32:54 +05:30
Ozan Armağan
9caffccfc8
Do not index role and message for default conversation collection (#1786)
* Do not index `role` and `message` for default conversation collection

* Fix using custom conversation model id

* Remove unnecessary get_conversation call

* Check model id type
2024-06-16 18:03:31 +05:30
Harpreet Sangar
cf5278f267
Timeout filter_result_iterator during compute_iterators. (#1785)
* Handle timeout during computation of filter_result_iterator in case of wildcard search.

* Pass `override_function_call_counter` as true in `filter_result_iterator_t::get_n_ids`.

* Invalidate iterator in `filter_result_iterator_t::get_n_ids`.

* Pass `timeout_info` into subtree in `filter_result_iterator_t::compute_iterators`.

* Fix `FilterTest, FilterTreeIteratorTimeout`.

* Refactor timeout logic.
2024-06-14 18:50:29 +05:30
Kishore Nallan
f45beb23cc Add option to log inflight queries in /debug 2024-06-13 21:06:25 +05:30
Harpreet Sangar
966a622072
Geosearch sorting with precision fix. (#1623)
* Add `geo_distance_meters` assert.

* Return real distances when precision is specified.

* Fix `CollectionSortingTest, GeoPointSorting`.

* Lock mutex in `Index::get_distance`.
2024-06-12 14:45:26 +05:30
Krunal Gandhi
2f16a71d98
add support for include exclude fields in doc fetch (#1782)
Co-authored-by: Kishore Nallan <kishorenc@gmail.com>
2024-06-12 09:33:14 +05:30
Kishore Nallan
e1615dddf8 Add test for field value coercion during removal. 2024-06-11 22:01:43 +05:30
Kishore Nallan
cdb6552898 Fix facet value hash mapping being cleared on sparsification.
We still need it for maintaning str -> id mapping.
2024-06-11 21:42:02 +05:30
Kishore Nallan
37d7ecabe7 Do value coercion before removing value from index. 2024-06-11 16:09:03 +05:30
Kishore Nallan
bc9e24fb57 Move thread pool exhaustion logging to separate func. 2024-06-11 16:00:22 +05:30
Kishore Nallan
de413783c8 Log about threadpoool exhuastion. 2024-06-10 17:10:43 +05:30
Kishore Nallan
f6108feec5 Add validation and test for empty alter payload. 2024-06-07 21:49:05 +05:30
Krunal Gandhi
629def6f0f
support updation of collection meta (#1779)
* support updation of collection meta

* error on altering anything except fields and meta

* fix test

* add alter schema validation test

* extend alter schema fields check
2024-06-07 20:44:53 +05:30
Harpreet Sangar
4fee4dc286
Exact prefix value filter. (#1763)
* Exact prefix match on `string` field.

* Exact prefix match on `string[]` field.

---------

Co-authored-by: Kishore Nallan <kishorenc@gmail.com>
2024-06-07 14:57:34 +05:30
Kishore Nallan
25762a7c69 Fix test. 2024-06-07 14:02:51 +05:30
Kishore Nallan
f2632a00e0 Accept config writes even under oom. 2024-06-07 12:13:24 +05:30