442 Commits

Author SHA1 Message Date
Kishore Nallan
cf12afe4ac Fix typo threshold for curated hits.
Some checks failed
tests / test (push) Has been cancelled
2024-10-29 21:00:08 +05:30
Kishore Nallan
db892457a8 Refactor curated ids usage. 2024-10-29 21:00:08 +05:30
Krunal Gandhi
643f825d1c
Sortby decay funtions (#2036)
* add support for decay function with sort_by

* add validation tests

* add test

* update score as float and add test

* add func key and other minor changes

* add diff function
2024-10-29 20:34:13 +05:30
Harpreet Sangar
e15d7d94f0
Fix nested reference sorting. (#2035)
Some checks failed
tests / test (push) Has been cancelled
* Fix nested reference sorting.

* Refactor `Index::get_ref_seq_id`.

* Refactor.
2024-10-28 11:57:04 +05:30
Harpreet Sangar
89c2c87dc1
Load async_reference property. (#2023)
Some checks failed
tests / test (push) Has been cancelled
* Load `async_reference` property.

* Use `set` instead of `vector` to avoid duplicates.

* Fix test.

* Refactor `reference_info_t::operator <` and `reference_pair_t::operator <`.
2024-10-21 09:10:04 +05:30
Harpreet Sangar
9eead17e62
Fix direct leak due to pointers being passed by value. (#2015) 2024-10-15 11:55:38 +05:30
Harpreet Sangar
a5aa1a4966
Add Collection::get_referenced_geo_distance. (#1990)
Some checks are pending
tests / test (push) Waiting to run
* Add `Collection::get_referenced_distance`.

* Add test.

* Refactor geo distance logic.

* Add `get_collection_name_with_lock`.

* Refactor to use ternary operator instead.
2024-10-14 12:06:50 +05:30
Kishore Nallan
9135869813 Refactor topster init + consider pagination.
Some checks are pending
tests / test (push) Waiting to run
2024-10-13 20:53:30 +05:30
Krunal Gandhi
ca84d55beb
Hybrid search aux score (#1968)
Some checks are pending
tests / test (push) Waiting to run
* aux score for hybrid search

* move redundant code to loop

* compute aux text_match using posting lists

* release expanded lists, update tests

* fix merge issues

* make compute_aux_score as member function

* update flag name to rerank_hybrid_matches
2024-10-03 10:52:08 +05:30
Harpreet Sangar
a891ff1a15
Add max_filter_by_candidates option. (#1969)
* Add `max_filter_by_candidates` option.

* Add tests.

* Fix tests.
2024-09-30 15:13:17 +05:30
Harpreet Sangar
95b0483446
Fix geo_distance_meters returning values in KM/MI. (#1962) 2024-09-20 13:03:54 +05:30
Harpreet Sangar
fa6bdb685c
Filtering shouldn't timeout during Export, Delete by query, Update by query, Cascade deletion of references, and Updating async references. (#1942) 2024-09-10 16:17:02 +05:30
Krunal Gandhi
2b4d7ba695
Vector query parse bugs (#1937)
* fix _vector_query parsing in sort_by param

* update model and make brace counter integer

* _vector_query bug fixes

* set default distance_threshold to max float value
2024-09-06 16:40:28 +05:30
Krunal Gandhi
0d030f08fe
Faceting on top k (#1878)
* do faceting on top_k results

* make top_k faceting on single thread

* remove logging to tsv file

* Revert "remove logging to tsv file"

This reverts commit 42bd4fdc4607d3cb5000080ac8aeba21b602e279.

* add validation checks & aggregate facets

* add tests

* refactor code

* refactor facet parsing to single pass

---------

Co-authored-by: Kishore Nallan <kishorenc@gmail.com>
2024-09-03 13:01:46 +05:30
Harpreet Sangar
c8cd7e0472
Async reference field. (#1835)
* Add `async_reference` property to reference field.

* Accept `"async_reference": true` only when `reference` is provided.

* Avoid reference lookup during updation if ref helper field is present.

* Clear `referenced_in_backlog` on dispose.

* Add references asynchronously to singular reference field.

Store only the reference field name in the indexes instead of reference helper field name.

* Only update async references when a document is indexed successfully.

* Remove unused params.

* Refactor reference index.

* Move `update_async_references` into `Index`.

* Refactor `Collection::update_async_references_with_lock`.

* Handle async update of reference array field.

* Add test case.

* Remove `update_async_references` method from `Collection`.

* Add `Join` class.
2024-08-30 11:20:05 +05:30
Harpreet Sangar
65151cd51b
Fix crash when reference expression is passed in _eval. (#1863) 2024-08-01 16:20:26 +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
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
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
Kishore Nallan
37d7ecabe7 Do value coercion before removing value from index. 2024-06-11 16:09:03 +05:30
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
Kishore Nallan
0082c0f0da Rename the facet index type parameter to facet strategy. 2024-05-05 21:26:52 +05:30
Kishore Nallan
506ead9066 Expose facet_index_type parameter. 2024-05-02 04:08:55 +05:30
Krunal Gandhi
15114a6c87
add boolean for enabling typos for alphanumeric tokens (#1651)
Co-authored-by: Kishore Nallan <kishorenc@gmail.com>
2024-04-05 14:25:28 +05:30
Kishore Nallan
3d4ad20bba Merge branch 'main' into v27
# Conflicts:
#	include/collection.h
#	include/index.h
2024-04-04 16:07:54 +05:30
Kishore Nallan
4328ee359c Add cli flag for enabling lazy filter. Disable by default. 2024-03-30 22:31:34 +05:30
Kishore Nallan
e7f9bd30bd Merge branch 'v0.26-facets' into v27
# Conflicts:
#	include/collection.h
#	include/index.h
#	src/collection.cpp
#	src/collection_manager.cpp
#	src/index.cpp
#	test/collection_synonyms_test.cpp
2024-03-30 16:44:57 +05:30
Kishore Nallan
c1b49ef0b9 Add flag for lazy filtering. 2024-03-30 15:30:10 +05:30
Kishore Nallan
8ef6bcb939 Merge branch 'v0.26-facets' into v27
# Conflicts:
#	include/collection.h
#	include/collection_manager.h
#	include/synonym_index.h
#	include/tsconfig.h
#	src/collection.cpp
#	src/collection_manager.cpp
#	src/synonym_index.cpp
#	src/typesense_server_utils.cpp
#	test/collection_manager_test.cpp
#	test/collection_synonyms_test.cpp
2024-03-20 15:34:28 +05:30
Krunal Gandhi
c3560dee27
Synonyms typos (#1620)
* correct query token typos before synonym reduction

* use art_tree for typo searching synonyms

* add prefix support, add typos, prefix config params
2024-03-18 12:21:03 +05:30
Krunal Gandhi
d7f638059e
add boolean to enable synonyms (#1603) 2024-03-07 19:58:31 +05:30
Kishore Nallan
f608656393 Move lock inside hnsw_t destructor. 2024-02-29 11:41:59 +05:30
Kishore Nallan
1b5846fe49 Remove old search_field API and code. 2024-02-24 12:28:51 +05:30
Krunal Gandhi
01bedbb342
fix the wrong boolean val (#1559) 2024-02-19 20:31:06 +05:30
Ozan Armağan
18306e3dd2
Make HNSW params configurable (#1521) 2024-01-30 18:30:03 +05:30
Krunal Gandhi
85dd93bc10
Disable typo tolerance for digits (#1478)
* set max_cost to 0 when matching digits in art_fuzzy_search

* fix condition of trailing digits

* refactor the approach

* updating test

* change param name
2024-01-16 15:01:17 +05:30
Harpreet Sangar
08c0a087a1 Support nested join. 2024-01-02 14:14:21 +05:30
Kishore Nallan
c21c855703 Add response metadata via override. 2023-12-11 18:33:48 +05:30
Harpreet Sangar
bfd251d1d9 Return error when trying to do infix search without enabling first. 2023-12-11 17:09:41 +05:30
Kishore Nallan
614f3c290c Restore concurrent facet processing. 2023-12-06 09:33:08 +05:30
Kishore Nallan
b3f8954229
Merge pull request #1394 from happy-san/filtering_cutoff
Filtering cutoff
2023-12-05 19:05:23 +05:30
Harpreet Sangar
9d73461ec7 Add filter_result_iterator_t::is_timed_out. 2023-12-04 16:58:30 +05:30
Kishore Nallan
e231fc2002 Optimize get distinct id for non-array fields. 2023-12-02 18:15:02 +05:30
Kishore Nallan
40ac195be7 Merge conflict resolution. 2023-11-29 10:25:54 +05:30
Kishore Nallan
c11f25b45f
Merge pull request #1356 from happy-san/reference_includes
Allow a field inside an object to have `reference`.
2023-11-14 09:35:24 +05:30
Kishore Nallan
91415a649f Fix phrase query messing up facet counts.
Global facet counts were being returned.
2023-11-13 19:57:25 +05:30
Harpreet Sangar
10a334cf07 Add object_array_reference_index. 2023-11-13 15:31:49 +05:30
Kishore Nallan
60d5951b80 Handle repeating facet values in value facet index. 2023-11-11 20:00:49 +05:30
Kishore Nallan
9921d2dc9c Spread the hash for sort index key.
This addresses an edge case where look ups were slow when there are gaps in a large key range.
2023-11-10 12:37:01 +05:30