-
Notifications
You must be signed in to change notification settings - Fork 11
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
#6 Search Module #20
#6 Search Module #20
Conversation
I create a basic implementation for Search module. I will try to create a user index and user search method. Right now, user search method create a |
Looks good to me. Can you rebase on master to resolve conflicts? I think search layer can accept/return DTO's while indexing & searching data in future. It would be nice improvement. |
*/ | ||
namespace Search\Exception; | ||
|
||
class MissingDataException extends \InvalidArgumentException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MissingArgumentException
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to create concerete exceptions for some situations. For example, I used that exception on AbstractIndexService#24. Maybe we can use same exception on AbstractSearchService#56 or AbstractSearchService#87.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand. In this case id
is a requirement, part of the data for a valid elastica document, validating incoming data before trying to create documents sounds good. However when searching, its a parameter (argument) which may exists or not. I think separating exceptions to three distinct classes would more appropriate :MissingArgumentException
, InvalidDocumentException
and InvalidArgumentException
- Configuration file created - AbstractSearchService added to Search module - AbstractIndexService and AbstractQueryService added to Search module - Example UserIndexService and UserQueryService added - ElasticsearchClient Service and Factory added
added some comments
#6 Creating search module