Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search with dataprovider #27

Closed
sintret opened this issue Aug 27, 2014 · 1 comment
Closed

Search with dataprovider #27

sintret opened this issue Aug 27, 2014 · 1 comment

Comments

@sintret
Copy link

sintret commented Aug 27, 2014

Hi, could you help me and teach me using dataProvider?
how exactly parameter $search.
i have script below:

$search = array();
$dataProvider = new \YiiElasticSearch\DataProvider(Channel::model(), array(
'search' => $search
));

in the view :

widget('zii.widgets.grid.CGridView', array( 'dataProvider' => $dataProvider, 'columns' => array( 'id', 'title' ), )); ?>

but only error show like this :
exception 'CException' with message
'IndexMissingException[[exploreattractionsfindtraveltours] missing]' in
D:\xampp\htdocs\tourexplora\protected\vendors\YiiElasticSearch\Connection.php:177
Stack trace:
#0

D:\xampp\htdocs\tourexplora\protected\vendors\YiiElasticSearch\Connection.php(144):
YiiElasticSearch\Connection->perform(Object(Guzzle\Http\Message\EntityEnclosingRequest))
#1

D:\xampp\htdocs\tourexplora\protected\vendors\YiiElasticSearch\DataProvider.php(127):
YiiElasticSearch\Connection->search(Object(YiiElasticSearch\Search))
#2 D:\xampp\htdocs\tourexplora\yii\framework114\web\CDataProvider.php(168):

YiiElasticSearch\DataProvider->fetchData()
#3

D:\xampp\htdocs\tourexplora\yii\framework114\zii\widgets\CBaseListView.php(111):
CDataProvider->getData()
#4

D:\xampp\htdocs\tourexplora\yii\framework114\zii\widgets\grid\CGridView.php(339):
CBaseListView->init()
#5

D:\xampp\htdocs\tourexplora\yii\framework114\web\CBaseController.php(147):
CGridView->init()
#6

D:\xampp\htdocs\tourexplora\yii\framework114\web\CBaseController.php(172):
CBaseController->createWidget('zii.widgets.gri...', Array)
#7 D:\xampp\htdocs\tourexplora\protected\views\test\elastic2.php(12):

CBaseController->widget('zii.widgets.gri...', Array)
#8

D:\xampp\htdocs\tourexplora\yii\framework114\web\CBaseController.php(126):
require('D:\xampp\htdocs...')
#9

D:\xampp\htdocs\tourexplora\yii\framework114\web\CBaseController.php(95):
CBaseController->renderInternal('D:\xampp\htdocs...', Array, true)
#10 D:\xampp\htdocs\tourexplora\yii\framework114\web\CController.php(869):

CBaseController->renderFile('D:\xampp\htdocs...', Array, true)
#11 D:\xampp\htdocs\tourexplora\yii\framework114\web\CController.php(782):

CController->renderPartial('elastic2', Array, true)
#12

D:\xampp\htdocs\tourexplora\protected\controllers\TestController.php(995):
CController->render('elastic2', Array)
#13

D:\xampp\htdocs\tourexplora\yii\framework114\web\actions\CInlineAction.php(49):
TestController->actionElastic2()
#14 D:\xampp\htdocs\tourexplora\yii\framework114\web\CController.php(308):

CInlineAction->runWithParams(Array)
#15 D:\xampp\htdocs\tourexplora\yii\framework114\web\CController.php(286):

CController->runAction(Object(CInlineAction))
#16 D:\xampp\htdocs\tourexplora\yii\framework114\web\CController.php(265):

CController->runActionWithFilters(Object(CInlineAction), Array)
#17

D:\xampp\htdocs\tourexplora\yii\framework114\web\CWebApplication.php(282):
CController->run('elastic2')
#18

D:\xampp\htdocs\tourexplora\yii\framework114\web\CWebApplication.php(141):
CWebApplication->runController('test/elastic2')
#19

D:\xampp\htdocs\tourexplora\yii\framework114\base\CApplication.php(180):
CWebApplication->processRequest()
#20 D:\xampp\htdocs\tourexplora\index.php(11): CApplication->run()
#21 {main}

REQUEST_URI=/tourexplora/test/elastic2

@phpnode
Copy link
Member

phpnode commented Aug 27, 2014

IndexMissingException[[exploreattractionsfindtraveltours] missing] means that you have a missing index in elasticsearch

@phpnode phpnode closed this as completed Aug 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants