File tree Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 128128 * @method static $this searchNotFuzzyPrefix($term, $fields = ['*'], $options = [])
129129 * @method static $this orSearchNotFuzzyPrefix($term, $fields = ['*'], $options = [])
130130 * -----------------------------------
131- * @method static $this searchQueryString($query, $fields = '*' , $options = [])
132- * @method static $this orSearchQueryString($query, $fields = '*' , $options = [])
133- * @method static $this searchNotQueryString($query, $fields = '*' , $options = [])
134- * @method static $this orSearchNotQueryString($query, $fields = '*' , $options = [])
131+ * @method static $this searchQueryString($query, $fields = null , $options = [])
132+ * @method static $this orSearchQueryString($query, $fields = null , $options = [])
133+ * @method static $this searchNotQueryString($query, $fields = null , $options = [])
134+ * @method static $this orSearchNotQueryString($query, $fields = null , $options = [])
135135 *===========================================
136136 * Speciality methods
137137 *===========================================
Original file line number Diff line number Diff line change 1717 * @method $this fuzzyMaxExpansions(int $value)
1818 * @method $this fuzzyPrefixLength(int $value)
1919 * @method $this fuzzyTranspositions(bool $value)
20+ * @method $this fuzzyRewrite(int $value)
2021 * @method $this lenient(bool $value)
2122 * @method $this maxDeterminizedStates(int $value)
2223 * @method $this minimumShouldMatch(string $value)
@@ -43,7 +44,6 @@ public function allowedOptions(): array
4344 'fuzzy_prefix_length ' ,
4445 'fuzzy_transpositions ' ,
4546 'fuzzy_rewrite ' ,
46- 'fuzzy_transpositions ' ,
4747 'lenient ' ,
4848 'max_determinized_states ' ,
4949 'minimum_should_match ' ,
Original file line number Diff line number Diff line change 5858
5959});
6060
61+ it ('tests basic query string combined with normal query operators ' , function () {
62+ $ users = User::searchQueryString ('age:35 ' )->where ('title ' , 'admin ' )->get ();
63+ expect ($ users )->toHaveCount (2 );
64+
65+ $ users = User::searchQueryString ('age:>30 ' )->count ();
66+ expect ($ users )->toBe (6 );
67+
68+ $ users = User::searchQueryString ('age:(NOT 35) ' )->skip (4 )->limit (3 )->get ();
69+ expect ($ users )->toHaveCount (2 );
70+
71+ });
72+
6173it ('tests AND query string ' , function () {
6274
6375 $ users = User::searchQueryString ('age:35 ' )->searchQueryString ('title:admin ' )->get ();
You can’t perform that action at this time.
0 commit comments