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

Class 'common\modules\news\models\News' not found #2

Open
amirajlo opened this issue Jun 28, 2017 · 2 comments
Open

Class 'common\modules\news\models\News' not found #2

amirajlo opened this issue Jun 28, 2017 · 2 comments

Comments

@amirajlo
Copy link

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".

@sadovyiov
Copy link
Owner

This is for example: 'common\modules\news\models\News'
You must use your Class for search.
Check Product class in models directory

@amirajlo
Copy link
Author

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

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