summaryrefslogtreecommitdiffstats
path: root/document/src/tests/documentselectparsertest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyrightJon Bratseth2023-10-091-1/+1
|
* Reduce creation of Document instances without DocumentTypeRepo.Geir Storli2023-03-131-3/+3
|
* Fix regression where supertype in field expression would not resolveTor Brede Vekterli2023-02-211-2/+3
| | | | | | | | | | | | | | | A change between 7 and 8 to use exact-matching for document types was implemented a tad too aggressively, as it should still be possible to match against supertypes in a document selection field expression. Let type `B` inherit `A`, and `A` have a field `foo`, and matching a document of type `B`: Prior to this fix: * `B.foo` _would_ match (implicit supertype field resolving) * `A.foo` would _not_ match due to exact type mismatch After this fix, both will match as generally expected.
* Add test for negative infinity tooHenning Baldersheim2023-02-041-0/+1
|
* Use exact document type matching semantics for C++ document selector ↵Tor Brede Vekterli2022-06-081-3/+3
| | | | implementation
* Support boolean literals in subexpressions for C++ document selection, not ↵Tor Brede Vekterli2022-04-201-4/+36
| | | | | | | | just as expression leaves Adds a new `BoolValueNode` type and the appropriate AST visiting overloads for it. For the sake of comparisons, node is treated as a numeric value node with value in {0, 1}.
* Minor simplifications after PR feedback.Henning Baldersheim2022-03-291-1/+1
|
* Remove copy constructors.Henning Baldersheim2022-03-281-2/+2
|
* Use both lvalue and rvalue specifier to avoid explicit std::move()Henning Baldersheim2022-03-281-4/+4
|
* Avoid the need for clone by using unique_ptr.Henning Baldersheim2022-03-281-2/+2
|
* Avoid need to copy/clone FieldUpdateHenning Baldersheim2022-03-271-5/+5
|
* Add basic support for BoolFieldValues in C++ document selection implTor Brede Vekterli2022-03-151-1/+20
|
* Use XXFieldValue::make over std::make_uniqueHenning Baldersheim2022-03-071-10/+10
|
* GC redundant convenience wasy of assigning primitive field values.Henning Baldersheim2022-03-071-10/+10
|
* As a first step to reduce code complexity around FieldValue move test-only ↵Henning Baldersheim2022-03-051-13/+10
| | | | | | convenience methods out to test-only helpers.
* Reduce use of Identifiable for document::DatatTypeHenning Baldersheim2022-03-031-0/+8
|
* Update 2017 copyright notices.gjoranv2021-10-071-1/+1
|
* Postpone the future.Henning Baldersheim2021-01-281-2/+2
|
* Port to gcc 8.Tor Egge2020-12-061-1/+1
|
* c++17 and c++2a need different handling.Henning Baldersheim2020-12-021-2/+9
|
* Make it compatible with c++2aHenning Baldersheim2020-12-021-7/+16
|
* Revert "Revert "Support 'id' as field name in C++ document selection ↵Henning Baldersheim2020-09-101-2/+7
| | | | lexing/parsing" MERGEOK"
* Revert "Support 'id' as field name in C++ document selection lexing/parsing"Jon Marius Venstad2020-09-091-7/+2
|
* Support 'id' as field name in C++ document selection lexing/parsingTor Brede Vekterli2020-09-091-2/+7
| | | | | | | 'id' is normally a reserved keyword and wasn't explicitly allowed for the purpose of field name identifiers. Change `ID` to be lexed as a string token to allow for preserving the original casing when used as an identifier.
* GC unused code.Henning Baldersheim2020-08-131-5/+5
|
* Support "user" and "group" as identifiers in C++ selection parserTor Brede Vekterli2020-06-171-4/+21
| | | | | | These were not included in the explicit list of allowed tokens and would therefore cause parse failures if e.g. a document type was called "user".
* Don't have implicitly inlined test destructorTor Brede Vekterli2020-04-011-0/+3
|
* Also include actual expression size in messageTor Brede Vekterli2020-04-011-1/+2
|
* Add more limit details to parse failure messagesTor Brede Vekterli2020-04-011-5/+5
|
* Compile Flex lexer with options for better code generationTor Brede Vekterli2020-03-311-0/+10
|
* Add explicit limits to backend document selection parsingTor Brede Vekterli2020-03-311-9/+59
| | | | | | | | | | | | | | Adds the following (very generous) limits: - Max AST depth of 1024 - Max input selection string size of 1 MiB Have to track AST depth manually, as there is no exposed way of doing this natively via Bison. Also removed a regex that had the potential of catastrophic backtracking in case of massive inputs. It wasn't removed during the previous purge due to being used with capture groups, which are not supported by our current vespalib regex wrapper.
* Use Google RE2 as underlying regex engineTor Brede Vekterli2020-03-041-0/+15
| | | | | | | | | | | | This introduces guaranteed upper bounds for memory usage and CPU time during regex evaluation. Most importantly, it removes the danger of catastrophic backtracking that is currrently present in GCC's std::regex implementation. With this commit, RE2 will be used instead of std::regex for: * Document selection regex/glob operators * Attribute regex search * Evaluation of mTLS authorization rules
* Add non-commutative operator tests to C++ implementationTor Brede Vekterli2020-02-181-0/+16
|
* Consistent test namingTor Brede Vekterli2020-02-071-1/+1
|
* Simplify regexes generated from document selection glob patternsTor Brede Vekterli2020-02-061-34/+56
| | | | | | | | | | | | | | | | | | | Attempts to simplify the resulting regex as much as possible to help minimize the number of possible catastrophic backtracking cases that can be triggered by wildcard regexes. The following simplifications are currently performed: * '' -> /^$/ (empty string match) * '*' -> // (any string match) * '*foo*' -> /foo/ (substring match) * '*foo' -> /foo$/ (suffix match) * 'foo*' -> /^foo/ (prefix match) * collapsing runs of consecutive `*` wildcards into a single wildcard. `***` is identical to `**` which is identical to `*` etc, as all these match 0-n characters each. This also works with simplification, i.e. `***foo***` -> /foo/ and `***` -> // This relates to issue #12068
* Detect and handle simple imported fields in expressions (C++)Tor Brede Vekterli2020-01-311-1/+27
|
* Revert "Revert "doc: -> id:""Henning Baldersheim2019-08-211-36/+26
|
* Revert "doc: -> id:"Henning Baldersheim2019-08-211-26/+36
|
* doc: -> id:Henning Baldersheim2019-08-191-36/+26
| | | | | Unify documentid java/cpp GC old formats v6 and v7
* Remove visitor ordering and order selection.Henning Baldersheim2019-08-091-46/+28
|
* Migrate document unit tests from cppunit to gtest.Tor Egge2019-04-161-149/+115
|
* Eliminate clang warnings in documentTor Egge2019-02-071-1/+1
|
* Remove whitespaceHenning Baldersheim2018-08-121-2/+2
|
* Pass stringref by valueHenning Baldersheim2018-08-101-2/+2
|
* 1 - Use a backing buffer for the DocumentUpdate that always is source of truth.Henning Baldersheim2018-06-121-2/+1
| | | | | | | | | | | 2 - Use this buffer for re-serialization. 3 - Make deserialization lazy where possible. Currently lazy on replay and when arriving over the storageapi. Still needs to eager over documentapi. 4 - Deserialize eagerly in the persistence thread since those are plentyfull and not bottlenecked, instead of in the single master thread. Use real repo.
* Use shared pointer to const DocumentTypeRepo.Tor Egge2018-04-041-1/+1
|
* Route document removes only to the recipient(s) handling the document type ↵Geir Storli2018-02-131-0/+15
| | | | | | (as given in the document id). For legacy document ids (without document type) we still use all the routes.
* Use new C++ document selection parserTor Brede Vekterli2017-11-141-92/+418
| | | | | | | | | | Based on Flex/Bison and replaces old Spirit.Classic parser. New parser is pure and does not require any locking, unlike the previous implementation. This also removes parsing of the deprecated searchcolumn feature. Adds build-time dependencies on Flex and Bison.
* Make FieldPath non-copyable.Henning Baldersheim2017-07-311-8/+8
|
* Update copyright headersJon Bratseth2017-06-141-1/+1
|