-
Notifications
You must be signed in to change notification settings - Fork 729
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
Term suggest API #460
Term suggest API #460
Conversation
@@ -110,12 +110,16 @@ public function setParams(array $params) | |||
*/ | |||
public function addParam($key, $value) | |||
{ | |||
if (!isset($this->_params[$key])) { | |||
$this->_params[$key] = array(); | |||
if($key != NULL) { |
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.
Please use null instead of NULL
@lonamiaec Finally I get back to you. I think it goes in the right direction. So far I have not used suggest myself but if I ready the elasticsearch docs this is the way to go. It seems like this is going to grow. Some additional tests would be nice. |
@ruflin I've added an small test for testing the structure created to query elastic search, and fixed small things you said before |
As this is a completely new implementation I would suggest that we add some more tests, especially also test the calls to elasticsearch (not only the structure). Like this we are also aware in case the implementation changes. |
@ruflin here are some more tests. Also change the resultSet to give only suggest search results, not shards info |
Ok, now i think everything is ok. Some fixes and tests runing |
Looks good. The only thing now missing is the update to the changes.txt file (make sure to merge the newest one from master). |
Ok, done |
* Suggest query or not | ||
* | ||
* @var int suggest | ||
*/ |
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.
Docblock is broken here.
@damienalexandre Unfortunately I already merged this pull request. @lonamiaec Can you open a second one with these fixes? |
Of course @ruflin I'll do it today! Thanks @damienalexandre |
Yes sorry to review after the merge, I was busy busy, this is nice work @lonamiaec - we may close #378 now, what do you think? |
Agree. The suggest feature will be extended in the future step by step. |
Agree too, i'll work on the rest of the suggest api functionalities |
I've started to make possible tu use term suggest API (http://www.elasticsearch.org/guide/reference/api/search/term-suggest/).
I've make some code which uses this to query elastic search and everything gone right on this scenarios:
I have executed the original tests and gave me the same results before and after my modifications, so i would like to start discussing if my implementation its good enough or not, and what parts I must change ( or all )
As I've said, It's still pending to add global suggest term option and tests for this, but this is the easiest part.