Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
48712c71
Commit
48712c71
authored
Jan 22, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added notes about default limit set by elasticsearch
fixes #1864
parent
4f7d55c7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
0 deletions
+24
-0
ActiveQuery.php
extensions/elasticsearch/ActiveQuery.php
+3
-0
ActiveRelation.php
extensions/elasticsearch/ActiveRelation.php
+5
-0
Query.php
extensions/elasticsearch/Query.php
+3
-0
README.md
extensions/elasticsearch/README.md
+13
-0
No files found.
extensions/elasticsearch/ActiveQuery.php
View file @
48712c71
...
@@ -39,6 +39,9 @@ use yii\db\ActiveQueryTrait;
...
@@ -39,6 +39,9 @@ use yii\db\ActiveQueryTrait;
* $customers = Customer::find()->with('orders')->asArray()->all();
* $customers = Customer::find()->with('orders')->asArray()->all();
* ~~~
* ~~~
*
*
* NOTE: elasticsearch limits the number of records returned to 10 records by default.
* If you expect to get more records you should specify limit explicitly.
*
* @author Carsten Brandt <mail@cebe.cc>
* @author Carsten Brandt <mail@cebe.cc>
* @since 2.0
* @since 2.0
*/
*/
...
...
extensions/elasticsearch/ActiveRelation.php
View file @
48712c71
...
@@ -22,6 +22,11 @@ use yii\db\ActiveRelationTrait;
...
@@ -22,6 +22,11 @@ use yii\db\ActiveRelationTrait;
*
*
* If a relation involves a pivot table, it may be specified by [[via()]] method.
* If a relation involves a pivot table, it may be specified by [[via()]] method.
*
*
* NOTE: elasticsearch limits the number of records returned by any query to 10 records by default.
* If you expect to get more records you should specify limit explicitly in relation definition.
* This is also important for relations that use [[via()]] so that if via records are limited to 10
* the relations records can also not be more than 10.
*
* @author Carsten Brandt <mail@cebe.cc>
* @author Carsten Brandt <mail@cebe.cc>
* @since 2.0
* @since 2.0
*/
*/
...
...
extensions/elasticsearch/Query.php
View file @
48712c71
...
@@ -46,6 +46,9 @@ use yii\db\QueryTrait;
...
@@ -46,6 +46,9 @@ use yii\db\QueryTrait;
* - [[column()]]: returns the value of the first column in the query result.
* - [[column()]]: returns the value of the first column in the query result.
* - [[exists()]]: returns a value indicating whether the query result has data or not.
* - [[exists()]]: returns a value indicating whether the query result has data or not.
*
*
* NOTE: elasticsearch limits the number of records returned to 10 records by default.
* If you expect to get more records you should specify limit explicitly.
*
* @author Carsten Brandt <mail@cebe.cc>
* @author Carsten Brandt <mail@cebe.cc>
* @since 2.0
* @since 2.0
*/
*/
...
...
extensions/elasticsearch/README.md
View file @
48712c71
...
@@ -48,6 +48,13 @@ Using the Query
...
@@ -48,6 +48,13 @@ Using the Query
TBD
TBD
> **NOTE:** elasticsearch limits the number of records returned by any query to 10 records by default.
> If you expect to get more records you should specify limit explicitly in relation definition.
*
This is also important for relations that use
[
[via()
]
] so that if via records are limited to 10
*
the relations records can also not be more than 10.
*
Using the ActiveRecord
Using the ActiveRecord
----------------------
----------------------
...
@@ -113,6 +120,12 @@ It supports the same interface and features except the following limitations and
...
@@ -113,6 +120,12 @@ It supports the same interface and features except the following limitations and
on how to compose
`query`
and
`filter`
parts.
on how to compose
`query`
and
`filter`
parts.
-
It is also possible to define relations from elasticsearch ActiveRecords to normal ActiveRecord classes and vice versa.
-
It is also possible to define relations from elasticsearch ActiveRecords to normal ActiveRecord classes and vice versa.
> **NOTE:** elasticsearch limits the number of records returned by any query to 10 records by default.
> If you expect to get more records you should specify limit explicitly in query **and also** relation definition.
> This is also important for relations that use via() so that if via records are limited to 10
> the relations records can also not be more than 10.
Usage example:
Usage example:
```
php
```
php
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment