Commit graph

107 commits

Author SHA1 Message Date
Stepan Bagritsevich
83569aca28
fix(search_family): Add options test for the FT.SEARCH command (#4478)
Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2025-01-30 09:43:01 +00:00
Shahar Mike
6f3c6e3d57
chore: Fix all clang build warnings (#4475)
* chore: Fix all clang build warnings

Also add `-Werror` to clang build in CI.

Fixes #4449

* all build targets

* fix search test
2025-01-20 10:24:07 +02:00
Stepan Bagritsevich
f6441df57a
chore: Remove template Callbacks (#4431)
Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2025-01-13 15:33:17 +02:00
Stepan Bagritsevich
aeeb625393
fix(search_family): Support multiple fields in SORTBY option in the FT.AGGREGATE command. SECOND PR (#4232)
fix(search_family): Support multiple fields in SORTBY option in the FT.AGGREGATE command

fixes dragonfly#3631

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-12-24 11:59:48 +04:00
Stepan Bagritsevich
3c7e31240f
fix(search_family): Support boolean and nullable types in indexes (#4314)
* fix(search_family): Support boolean and nullable types in indexes

fixes dragonflydb#4107, dragonflydb#4129

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

* refactor: address comments

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

---------

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-12-24 10:52:39 +04:00
Roman Gershman
01f24da2b6
fix: configure jsonconst double parser to use std::from_chars (#4360)
The problem: apparently, jsoncons uses strtod by default when parsing doubles.
On some platforms (alpine/musl) this function uses lots of stack, which potentially can lead to stack corruption.
This PR configures jsoncons to use std::from_chars that is more efficient and less stack hungry.
The single include point to consume jsoncons/json.hpp should be "core/json_object.h"

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-12-24 04:02:50 +02:00
Stepan Bagritsevich
1fa9a47a86
refactor(search_family): Add Aggregator class (#4290)
* refactor(search_family): Add Aggregator class

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

* fix(aggregator_test): Fix tests failing

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

* refactor: address comments

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

* refactor: Restore the previous comment

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

* refactor: address comments 2

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

* refactor: address comments 3

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

* fix(aggregator): Simplify comparator for the case when one of the values is not present

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

---------

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-12-23 08:43:48 +04:00
Stepan Bagritsevich
c5ef553ffc
fix(search_family): Fix logging in ParseFieldWithAtSign (#4343)
Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-12-19 14:11:13 +00:00
Stepan Bagritsevich
9d6b2a133c
fix(search_family): Fix FT.AGGREGATE output (#4311)
Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-12-15 21:05:49 +04:00
Stepan Bagritsevich
76f79f0e0b
fix(search_family): Remove the output of extra fields in the FT.AGGREGATE command (#4231)
* fix(search_family): Remove the output of extra fields in the FT.AGGREGATE command

fixes dragonflydb#4230

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

* refactor: address comments

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

---------

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-12-11 11:21:20 +00:00
Roman Gershman
c2f8349c51
chore: update command interface for cluster and search families (#4258) 2024-12-05 09:12:50 +02:00
Stepan Bagritsevich
bd143e4b81
fix(search_family): Fix crash when no SEPARATOR is specified in the FT.CREATE command (#4205)
fix(search_family): fix(search_family): Fix crash when no SEPARATOR is specified in the FT.CREATE command

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-11-27 16:30:36 +04:00
Kostas Kyrimis
2f748c24dd
chore: fix false positives sanitizers (#4190)
* disable false positive

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-11-26 11:49:20 +02:00
Stepan Bagritsevich
2b3c182cc9
fix(search_family): Fix LOAD fields parsing in the FT.AGGREGATE and FT.SEARCH commands (#4012)
* fix(search_family): Fix LOAD fields parsing in the FT.AGGREGATE and FT.SEARCH commands

fixes dragonflydb#3989

Signed-off-by: Stsiapan Bahrytsevich <stefan@dragonflydb.io>

* refactor: address comments

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

* refactor(search_family): Address comments 2

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

* refactor(search_family): address comments 3

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

* refactor(search_family): address comments 4

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

* refactor(search_family): address comments 5

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

---------

Signed-off-by: Stsiapan Bahrytsevich <stefan@dragonflydb.io>
Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-11-25 09:50:31 +00:00
Stepan Bagritsevich
503bb4ed33
fix(search_family): Process wrong field types in indexes for the FT.SEARCH and FT.AGGREGATE commands (#4070)
* fix(search_family): Process wrong field types in indexes for the FT.SEARCH and FT.AGGREGATE commands

fixes  #3986
---------

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-11-10 16:56:25 +02:00
Vladislav
eadce55b67
chore: remove old io (#3953)
* chore: Remove old IO

* fix: fix last error accounting
* chore: use unique_ptr<char> in MGetResponse storage

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-11-10 11:56:41 +02:00
Kostas Kyrimis
d3ef0a3630
fix(sanitizers): disable false positive FtProfileInvalidQuery (#4090)
* disable FtProfileInvalidQuery 

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-11-08 18:46:54 +02:00
Stepan Bagritsevich
7ac853567b
fix(search_family): Fix crash in FT.PROFILE command for invalid queries (#4043)
* refactor(search_family): Remove unnecessary std::move in FT.SEARCH

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

* fix(search_family): Fix crash in FT.PROFILE command for invalid queries

fixes dragonflydb#3983

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

* refactor(search_family_test): address comments

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

---------

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-11-04 18:18:12 +01:00
Kostas Kyrimis
566f246cee
chore: skip AggregateWithLoadOptionHard on sanitizers (false positive) (#4013)
The test fails because of false positive so I disabled it.

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-10-29 14:26:50 +02:00
Roman Gershman
92be74f4e4
fix: build break in search_family (#4008)
Also perform additional clean-up of cntx->reply_builder() - Part11

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-28 17:40:27 +02:00
Roman Gershman
1bdd56c973
chore: pass SinkReplyBuilder and Transaction explicitly. Part10 (#3998) 2024-10-28 16:18:52 +02:00
Stepan Bagritsevich
5dcad859b0
fix(search_family): Fix indexes loading in the FT.SEARCH and Ft.AGGREGATE commands (#3955)
fixes dragonflydb#3782, dragonflydb#3659

Signed-off-by: Stsiapan Bahrytsevich <stefan@dragonflydb.io>
2024-10-27 21:14:02 +01:00
Stepan Bagritsevich
e96a99a868
fix(search_family): Temporary remove the error when a field name does not have the '@' sign at the beginning in the FT.AGGREGATE command (#3956) 2024-10-21 18:35:23 +02:00
Vladislav
e71f083f34
feat(search): STOPWORDS (#3851)
Adds support for STOPWORDS option
2024-10-10 21:58:12 +03:00
Stepan Bagritsevich
c2da601f6b
fix(generic_family): Update indexes in the RESTORE and RENAME commands (#3803) 2024-09-26 14:04:09 +00:00
Stepan Bagritsevich
2fad54e41f
fix(search_family): Fix LOAD option behavior in the FT.AGGREGATE command (#3660)
* fix(search_family): Fix LOAD option behavior in the FT.AGGREGATE command

fixes dragonflydb#3646

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

* Update src/server/search/search_family.cc

Co-authored-by: Shahar Mike <chakaz@users.noreply.github.com>
Signed-off-by: Stepan Bagritsevich <43710058+BagritsevichStepan@users.noreply.github.com>

---------

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
Signed-off-by: Stepan Bagritsevich <43710058+BagritsevichStepan@users.noreply.github.com>
Co-authored-by: Shahar Mike <chakaz@users.noreply.github.com>
2024-09-09 09:21:48 +00:00
Stepan Bagritsevich
0e7c12f5d6
fix(search_family): Fix FT.AGGREGATE GROUPBY option (#3657) 2024-09-08 17:29:09 +02:00
Borys
a1e9ee1b6d
CmdArgParser improvement (#3633)
* feat: add processing of tail args into CmdArgParser::Check
* refactor: rename CmdArgParser::Switch to Map
* feat: add CheckMap method into CmdArgParser
2024-09-05 15:30:54 +03:00
Borys
d40e9088ae
refactor: remove extra code from CmdArgParser (#3619)
* refactor: remove extra code from CmdArgParser
2024-09-03 07:04:05 +00:00
Stepan Bagritsevich
a22eff15dc
fix(server_family): Remove search indexes during the FLUSHALL command (#3539)
* fix(server_family): Add search indixes removing to the FLUSHALL command

fixes dragonflydf#3532

---------

Signed-off-by: Stepan Bagritsevich <bagr.stepan@gmail.com>
Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-08-30 08:26:14 +03:00
Borys
88229cf365
refactor: remove toUpper() from cmd_arg_parser (#3599)
* refactor: remove usage of toUpper() from cmd_arg_parser

* refactor: remove CmdArgParser::NextUpper
2024-08-29 15:19:52 +03:00
Borys
ee1aee8cee
feat: add escaping symbols for tag search (#3578)
* feat: add escaping symbols for tag search
2024-08-28 12:15:23 +03:00
Vladislav
9f7cbc7d4d
chore(search): fix numeric index query in rev order (#3555) 2024-08-24 13:32:36 +03:00
Stepan Bagritsevich
3fd3c40b74
fix(search_family): Fix query parsing for the integer tags in OR expression (#3544)
fixes dragonflydb#3490

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-08-24 11:58:16 +03:00
Vladislav
f88e49ba68
chore: fix search replication (#3547)
chore: fix search replcation

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-08-23 08:35:09 +03:00
Stepan Bagritsevich
6cfbc08013
fix(jsonpath): Add JsonPath grammar for the child identifier in brackets (#3533)
* fix(jsonpath): Add json path grammar for the child identifier with brackets

fixes dragonflydb##3511

---------

Signed-off-by: Stepan Bagritsevich <bagr.stepan@gmail.com>
2024-08-22 13:49:50 +03:00
Stepan Bagritsevich
54cf6f0d06
fix(search_family): Add error on creating indexes from non-zero databases (#3537) 2024-08-21 15:19:21 +03:00
Roman Gershman
29a13893c2
feat: implement FT.TAGVALS (#3493)
* feat: implement FT.TAGVALS

Fixes #3491

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-11 22:53:25 +03:00
Roman Gershman
c9ed3f7b2b
chore: retire TEST_EnableHeartBeat (#3435)
Now unit tests will run the same Hearbeat fiber like in prod.
The whole feature was redundant, with just few explicit settings of maxmemory_limit
I succeeeded to make all unit tests pass.

In addition, this change allows passing a global handler that is called by heartbeat from a single thread.
This is not used yet - preparation for the next PR to break hung up replication connections on a master.

Finally, this change has some non-functional clean-ups and warning fixes to improve code quality.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-03 20:17:23 +03:00
Shahar Mike
d7351b315e
refactor: Use DbContext, OpArgs and Transaction to access DbSlice (#3311)
This is a refactor that will put us closer to adding namespaces, see
included `docs/namespaces.md`
2024-07-12 08:13:16 +03:00
Vladislav
6291c04016
chore(search): Add __vector_score alias (#3186) 2024-06-17 23:39:38 +03:00
Roman Gershman
32844e0f3d
chore: add parsing support for the rest of VECTOR parameters (#3179) 2024-06-16 12:29:27 +03:00
Roman Gershman
688f286f46
chore: improve ft.create for vector search (#3178)
metric name in vector parameters should be case insensitive

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-06-16 08:18:16 +03:00
Vladislav
8eb9d48c3a
feat(search): basic FT.ALTER (#3148)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-06-08 09:16:29 +03:00
Vladislav
1053633a6a
feat(search): Tag field options (separator, case sensitivity) (#3144)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-06-07 22:34:06 +03:00
Roman Gershman
9b9c32c91d
chore: Remove Schedule() call (#2938)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-04-21 11:32:44 +03:00
Kostas Kyrimis
9d5bd99f5c
fix: sanitizers clang build and clean up some warnings (#2793)
* fix sanitizers build on clang
* clean up some warnings
2024-03-29 17:13:37 +02:00
Vladislav
22e413a00b
Basic FT.AGGREGATE (#2413)
Introduces basic FT.AGGREGATE command, supporting GROUPBY, SORTBY, LIMIT

Signed-off-by: Vladislav <vladislav.oleshko@gmail.com>

---------
2024-03-08 08:51:51 +03:00
Kostas Kyrimis
f3ba448106
chore: make usan asan optional and enable them on CI (#2631)
* add daily job to run unit tests with asan/usan
2024-03-04 11:00:46 +02:00
Roman Gershman
93debc754c
chore: more fixes for macos (#2677)
1.Add back the search files to MacOs build (linker errors are fixed now).
2. Add default maxmemory argument (if not present already) when launching dragonfly process in regression tests.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-03-02 23:14:33 +02:00