Open amirajlo opened 7 years ago
This is for example: 'common\modules\news\models\News' You must use your Class for search. Check Product class in models directory
tanks aleks my product model work other page my product class ` namespace app\models; class Product extends \yii\db\ActiveRecord { }
` notice: whene use elasticsearch it gives same error and i dont know
hi aleks i want use your extension i want indexing whene user click in search buttom i use below code in web.php in config folder
'search' => [ 'class' => 'sadovojav\search\components\SearchLucene', 'indexDirectory' => '@console/runtime/search', 'models' => [ [ 'dataProviderOptions' => [ 'query' => common\modules\news\models\News::find() ->localized('en') ->active() ], 'attributes' => [ 'lang' => 'en', // Custom fild to search 'name' => [ 'name' => SearchLucene::FIELD_TEXT ], 'text_intro' => [ 'text_intro' => SearchLucene::FIELD_UN_STORED ], 'text_full' => [ 'text_full' => SearchLucene::FIELD_UN_STORED ], ], ] ] ],
whene run app display error " Class 'common\modules\news\models\News' not found" even whene use "Class 'app\models\Product' not found".