429 Commits

Author SHA1 Message Date
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
Kishore Nallan
ae597f40ba Merge branch 'v0.25-join' into v0.26-facets
# Conflicts:
#	include/index.h
#	src/collection.cpp
#	test/collection_vector_search_test.cpp
2023-10-30 21:41:47 +05:30
Kishore Nallan
59f7bf0f48 Add background thread for periodic housekeeping. 2023-10-30 18:17:54 +05:30
Kishore Nallan
9d0eaaad21
Merge pull request #1333 from ozanarmagan/v0.25-join
Support `remote_embedding_timeout_ms` and `remote_embedding_num_tries` for indexing
2023-10-27 17:36:01 +05:30
ozanarmagan
34ade97636 Support remote_embedding_timeout_ms and remote_embedding_num_tries for indexing 2023-10-26 01:04:39 +03:00
Kishore Nallan
e6876fa147 Merge branch 'v0.25-join' into v0.26-facets
# Conflicts:
#	include/field.h
#	src/collection.cpp
#	src/index.cpp
#	test/collection_vector_search_test.cpp
2023-10-23 18:45:18 +05:30
Harpreet Sangar
4ffbe3aad1 Add reference_index for reference array field. 2023-10-20 13:41:02 +05:30
Kishore Nallan
dcfd336b06 Refactor field-wise search configuration parsing. 2023-10-16 11:37:25 +05:30
Kishore Nallan
5119af384e
Merge pull request #1301 from ozanarmagan/v0.25-join
Sort by vector query
2023-10-16 10:44:24 +05:30
ozanarmagan
4167fe69c8 Sort by vector query 2023-10-14 02:07:51 +03:00
Kishore Nallan
91209a17dc Merge branch 'v0.25-join' into v0.26-facets
# Conflicts:
#	include/collection.h
#	include/index.h
#	src/collection.cpp
#	src/collection_manager.cpp
#	src/index.cpp
#	test/collection_specific_more_test.cpp
#	test/collection_vector_search_test.cpp
2023-10-13 19:00:17 +05:30
Kishore Nallan
40a684619b Add both sides drop tokens mode. 2023-10-10 19:18:42 +05:30
Kishore Nallan
2bef32f9c6 Drop tokens direction. 2023-10-09 21:04:33 +05:30
krunal
6b60b62afa refactor rev_iterator and add skip_to_rev() 2023-10-06 20:44:33 +05:30