3846 Commits

Author SHA1 Message Date
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
Kishore Nallan
500fd851a6 Set init hnsw size to 16 elements. 2024-06-06 21:00:06 +05:30
Kishore Nallan
59313e5986 Allow dynamic update of cache size. 2024-06-06 21:00:06 +05:30
Ozan Armağan
79018dd2b9
Add API key support for vLLM conversation models (#1777) 2024-06-06 17:45:58 +05:30
Ozan Armağan
5859e0fd3f
Fix filtering on stemmed fields (#1776)
* Fix filtering on stemmed fields

* Fix getting stemmer twice
2024-06-06 16:49:12 +05:30
Krunal Gandhi
b4b399a4b7
allow integer val for geopoint (#1773) 2024-06-05 20:42:22 +05:30
Ozan Armağan
002b188b56
Force whisper to not transcribe punctuations (#1771)
* Force whisper to not transcribe punctuations

* Fix the test
2024-06-05 14:53:39 +05:30
Harpreet Sangar
561b01bb51
Assign default sorting score if reference is not found while sorting by a reference field. (#1770) 2024-06-04 17:21:39 +05:30
Kishore Nallan
f47c09fd63 Fix synonym upserts. 2024-06-04 12:10:12 +05:30
Harpreet Sangar
2c3b595982
Fix posting_list_t::has_exact_match. (#1767)
* Add failing tests for `posting_list_t::has_exact_match`.

* Fix failing test.

* Add test case for `string[]` field.
2024-06-03 20:54:12 +05:30
Kishore Nallan
3291fca5ba Account for maximum number of search fields supported. 2024-05-31 08:48:03 +05:30
Kishore Nallan
0bf8669327 Semantic search faceting should work only on k returned docs. 2024-05-29 18:02:00 +05:30
Ozan Armağan
b02782656c
Fix conversation history bug in multi search (#1762) 2024-05-29 16:37:57 +05:30
Kishore Nallan
a3d7b9a24a Add guard for collection document counter decrement. 2024-05-29 13:03:28 +05:30
Kishore Nallan
b3db94867f Increase max length of facet value stored. 2024-05-29 10:35:28 +05:30
Krunal Gandhi
94af3afb66
allow special char in range facet labels (#1760) 2024-05-28 18:48:02 +05:30
Kishore Nallan
fdf16b0e23 Fix facet index type auto population for wildcard faceting. 2024-05-28 16:21:56 +05:30
Krunal Gandhi
3ab8517a8c
facet parent for array fields (#1756)
* return object itself as parent for array fields

* make variables const reference
2024-05-28 08:32:53 +05:30
Jason Bosco
055425a2eb
Merge pull request #1754 from typesense/fix-infix-json-quoting
Remove double quotes to prevent bad escaping in JSON response for infix search
2024-05-24 17:45:47 -05:00
Jason Bosco
1c0c5c4d51 Remove double quotes to prevent bad escaping in JSON response.
Fix for #1753
2024-05-24 16:26:00 -05:00
Ozan Armağan
ed87e63961
Fix stemming for non-English locales (#1745)
* Fix stemming for non-English locales

* Fix synoyms

* Use `query_tokens_t.q_unstemmed_tokens` for passing unstemmed tokens-

* Refactoring

* Move for loop in parse_search_query to process_tokens completely

* Use q_phrase_dummy and q_exclude_tokens_dummy for unstemmed process_tokens

* Add stopwords_set to process_tokens

* remove unused variables
2024-05-23 01:20:20 +05:30
Harpreet Sangar
85c5c80445
Fix numeric filter performance regression. (#1749) 2024-05-23 00:13:40 +05:30
Ozan Armağan
4c8a3f18ec
Dynamic model existence check for Cloudflare models + bug fix (#1744)
* Fix standalone question generation for Cloudflare models

* Check cloudflare model existence dynamically

* Fix typo

* Persist cloudflare model migration

* Fix init function
2024-05-21 14:00:24 -07:00
Ozan Armağan
85a5e244da
Suppress non-speech tokens for whisper (#1743) 2024-05-21 19:52:55 +05:30
Harpreet Sangar
8e808d4e29
Fix cascade deletion bug. (#1742)
* Fix cascade deletion bug.

* Add test case.
2024-05-21 19:52:21 +05:30
Harpreet Sangar
35e6a097af
Remove limit of 10 filter values to compute filter iterator. (#1739) 2024-05-21 03:02:29 +05:30
Krunal Gandhi
ef674a80f9
add flag hide_from_analytics (#1737)
* add flag hide_from_analytics

* change param name to enable_analytics
2024-05-21 02:34:48 +05:30
Kishore Nallan
aab81887e4 Log in-flight search queries during a crash. 2024-05-21 00:08:17 +05:30
Krunal Gandhi
468f071be2
limit groups by per page limit (#1735) 2024-05-16 12:36:26 -04:00
Kishore Nallan
c9737b843c Fix compile error. 2024-05-16 18:09:41 +05:30
Kishore Nallan
b9d70433b4 Revert "Do grouping in two pass (#1677)"
This reverts commit dccf6eb1864870cffc5ca71e3307e59b6ee5d9b2.

# Conflicts:
#	src/index.cpp
2024-05-16 17:37:54 +05:30
Ozan Armağan
89bcd383c3
Fix recursive mutex lock while migrating conversation models (#1734)
* Fix recursive mutex lock while migrating conversation models

* Add `add_model_unsafe` and guard for `remove_conversation_collection`

* undo unrelated change

* undo unrelated changes
2024-05-16 07:06:47 +05:30
Harpreet Sangar
52b9d5a959
Fix sort_by parsing bug. (#1733) 2024-05-15 17:10:10 +05:30
Krunal Gandhi
6075362709
throw error when range faceted field has sorting disabled (#1726)
* range facets with sort disabled

* update test names

* throw error when range faceted field has sort disabled
2024-05-15 17:08:57 +05:30
Kishore Nallan
be57f68e64 Merge branch 'v0.26-facets' into v27 2024-05-15 08:32:21 +05:30
Ozan Armağan
1b4e08b29d
Use collections to store conversations (#1723)
* Use collections to store conversations

* Use conversation model to select conversation history collections

* Fix multi search add conversation call

* Add support for migrating conversation models

* use same suffix for all default conversation collections

* delete `delete_models_With_conversation_collection`
2024-05-14 15:32:35 -04:00
Harpreet Sangar
a6fa986286
Add float filter tests. (#1729) 2024-05-14 15:31:25 -04:00