133 Commits

Author SHA1 Message Date
Kishore Nallan
539e7dd67b
Merge pull request #924 from krunal1313/group_hits_count
Allow sorting groups on group hits count
2023-03-06 14:15:29 +05:30
Kishore Nallan
f48b9ffe6e Extract doc validation functions out. 2023-03-05 10:55:42 +05:30
krunal1313
77ffcd9444 sorting grouped results on group hit count 2023-03-02 18:05:28 +05:30
Kishore Nallan
7655f6de1d Merge branch 'v0.24.1' into v0.25
# Conflicts:
#	src/collection.cpp
#	test/collection_locale_test.cpp
2023-02-26 20:37:42 +05:30
Kishore Nallan
47879ff35c Handle bad filter query in override. 2023-02-26 13:31:30 +05:30
Kishore Nallan
3b2e7e22f2 Merge branch 'v0.24.1' into v0.25 2023-02-20 18:10:49 +05:30
Kishore Nallan
5f4d43f877 The id cannot be a default sorting field. 2023-02-18 14:28:43 +05:30
Harpreet Sangar
70028c76ce Return wildcard matching facets only if count is greater than 0. #896 2023-02-16 15:41:03 +05:30
Harpreet Sangar
5f034f8b3b
Update documents using filter_by. (#845)
* Update documents.

* Return number of documents updated in the response.

* Update test.

* Use `add_many` to update documents.

* Test batching of updation.

* Support updation of all documents by `filter_by=*`.

* Update test to work on schema with nesting enabled.

* Fix memory leak.

* Add nested field updation test.

* Remove iterator key comparison.
2023-01-06 12:36:56 +05:30
Kishore Nallan
5c75d1553a Merge branch 'bazel-build' into v0.25 2023-01-03 11:02:09 +05:30
Kishore Nallan
b8b9fb20b3 Merge branch 'v0.24-nested' into v0.25
# Conflicts:
#	include/collection.h
#	src/collection.cpp
#	src/collection_manager.cpp
#	test/collection_faceting_test.cpp
2023-01-03 09:42:21 +05:30
Kishore Nallan
bf0f7430a0 Allow vector query to pass a document ID. 2023-01-01 18:00:50 +05:30
Harpreet Sangar
34b16cdb21
Add != compatibility for numeric type. (#835)
* Add `!=` compatibility for numeric type.

* Add `numeric_not_equals_filter` method.

* Refactor `numeric_not_equals_filter` method.

* Support `!=` for numeric field multi-value filter_by.

* Ignore local settings file.

* Add comment.

* Add tests.

* Update negation test.

* Set `apply_not_equals` flag for string fields as well.

* Add `field: [!=value]` test.
2022-12-29 20:57:10 +05:30
Kishore Nallan
df8f6849fe Facet estimation for large result sets. 2022-12-15 16:27:01 +05:30
Krunal Gandhi
2e8ad0f7c3
Range faceting (#823)
* facet range base commit

* ammending range checks to strictly abide to range, ignoring outliers

* range facet query parsing and results

* Making facet processing generic for both
range and non-range facets

* Adding facet parsing tests and bug fixes

* Adding range facet search tests and some refactoring

* Refactoring and adding more tests for seach. adding Range should be continuous check

* Refactoring the code

* making test case asserts more verbose

Co-authored-by: Kishore Nallan <kishorenc@gmail.com>
2022-12-14 15:49:14 +05:30
Kishore Nallan
cbf5985307 Fix duplication of nested fields during flattening. 2022-11-23 15:08:04 +05:30
Kishore Nallan
4e7c5560aa Handle missing optional object fields. 2022-11-19 08:49:11 +05:30
Kishore Nallan
4212a107ed Ensure that detected nested fields inherit field properties. 2022-11-01 17:19:45 +05:30
Kishore Nallan
81b6712296 Fix highlighting for fields with dot in their names. 2022-10-31 13:07:09 +05:30
Kishore Nallan
ae49dab8fd Vector flat search: handle missing values. 2022-10-21 16:42:23 +05:30
Kishore Nallan
4808d1610a Flat search cutoff for vector search. 2022-10-19 13:48:07 +05:30
Harpreet Sangar
f75cbca920
Filter query (#737)
* Implement advance filter query parser.

* Remove `exclude_filters`.

* Review changes

* Implement do_filtering2

* Use updated implementation

* Pass failing tests.

* Handle special characters in value.

* Add space around  in embedded filters

* Update tokenize

* Rename to `recursive_filtering`

* Deconstruct filter tree.

* Remove separating space requirement for operators

* Fix rebase errors.

* Undo filter override change

* Format changes

* Pass StaticFilteringMultipleRuleMatch

* Undo formatting changes

* Pass DynamicFilteringMultipleRuleMatch

* Review changes.

* Add filter_query guard.
2022-10-11 11:21:20 +05:30
Kishore Nallan
4679d298c7 Geopoint field cannot be a default sorting field. 2022-09-20 15:12:31 +05:30
Kishore Nallan
c8afd1e7c6 Use k value from vector query params. 2022-09-17 16:00:56 +05:30
Kishore Nallan
49268d648e Persist vector field properties and restore. 2022-09-15 17:32:17 +05:30
Kishore Nallan
c7f879bf30 Return vector distance in response. 2022-09-15 11:34:27 +05:30
Kishore Nallan
d2daad2c3d Basic alter support for nested fields.
No longer storing .flat inside the document.
2022-09-13 14:47:17 +05:30
Kishore Nallan
dff7f8b746 Don't persist flattened nested field values on disk.
Instead, we will reconstruct them when we fetch them from disk, trading cpu for storage.
2022-09-12 15:04:12 +05:30
Kishore Nallan
aeb4424662 Better error messages for nested field type mismatch. 2022-09-11 18:53:14 +05:30
Kishore Nallan
720855f406 Use cosine similarity as default vector distance. 2022-09-02 17:48:02 +05:30
Kishore Nallan
a98e5bacdd Vector search basics. 2022-08-27 13:47:09 +05:30
Kishore Nallan
57782cfd74 Fix eval valgrind errors. 2022-08-16 15:43:40 +05:30
Kishore Nallan
9b4fb12729 Explicitly dot separated fields should have precedence. 2022-08-08 12:18:16 +05:30
Kishore Nallan
58bdcc2e6f Merge branch 'v0.24-changes' into v0.24-nested
# Conflicts:
#	src/index.cpp
2022-08-05 14:14:52 +05:30
Kishore Nallan
db3c014463 Implement optional filtering via sort_by clause. 2022-08-04 16:23:29 +05:30
Kishore Nallan
a90bfba930 Multiple explicit nested fields should be allowed. 2022-08-03 18:38:18 +05:30
Kishore Nallan
f86f8b5487 Support nested fields with explicit schema. 2022-08-01 19:44:25 +05:30
Kishore Nallan
bef79000e1 Skeleton for nested field indexing and highlighting. 2022-07-25 17:25:49 +05:30
Kishore Nallan
d4cfe81a90 Allow missing values sort config on numerical fields. 2022-05-30 13:33:57 +05:30
Kishore Nallan
cf3b28bb77 String sort: allow missing values to be sent to either end. 2022-05-28 17:27:22 +05:30
Kishore Nallan
e68458aff3 Don't allow field with same name as regexp field pattern. 2022-05-26 15:07:09 +05:30
Kishore Nallan
5b462f5233 Drop/readd within same schema change set. 2022-04-14 12:23:38 +05:30
Kishore Nallan
a5b06a0e0d Schema change basics. 2022-03-26 08:22:40 +05:30
Kishore Nallan
369c1b45b7 Fix issue with index: false setting. 2022-03-23 21:06:41 +05:30
Kishore Nallan
3f8135d4b0 Tweak error message. 2022-02-20 17:32:04 +05:30
Kishore Nallan
f4993de8a1 Ensure that infix property is restored on restart. 2022-02-15 14:12:38 +05:30
Kishore Nallan
ba101d0b40 Infix basics. 2022-01-27 16:34:06 +05:30
Kishore Nallan
774d7dbce5 Allow bucketing of text match score. 2022-01-08 19:23:02 +05:30
Kishore Nallan
f9942e4358 Let sortable string field be a default sorting field. 2022-01-05 12:55:00 +05:30
Kishore Nallan
b9f624c297 Fix sort property of float and geopoint array fields. 2021-12-30 14:09:51 +05:30