ruflin/Elastica — pull request #151 by ro-ka (2012-04-25 10:11:19+00:00)
Title: Added more-like-this API.

I added the mlt API in Elastica_Type. Arguments get set as http get params and not as post vars because elasticsearch expects this.

Also wrote an test, but I got an problem there: When executing the moreLikeThis function after the addDocuments function, an SearchPhaseExecutionException is thrown. When the moreLikeThis function is executed on an existing index everything works fine.

Anyone got an idea?

The complete exception:
```
Elastica_Exception_Response: SearchPhaseExecutionException[Failed to execute phase [query_fetch], total failure; shardFailures {[rHmft9YETESBDI6czyAlmg][test_mlt][0]: SearchParseException[[test_mlt][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"index":{"_index":"test_mlt","_type":"mlt","_id":1}} {"name":"bruce wayne batman"} {"index":{"_index":"test_mlt","_type":"mlt","_id":2}} {"name":"bruce wayne"} {"index":{"_index":"test_mlt","_type":"mlt","_id":3}} {"name":"batman"} {"index":{"_index":"test_mlt","_type":"mlt","_id":4}} {"name":"superman"} {"index":{"_index":"test_mlt","_type":"mlt","_id":5}} {"name":"spiderman"} ]]]; nested: SearchParseException[[test_mlt][0]: from[-1],size[-1]: Parse Failure [No parser for element [index]]]; }] in /home/robert/Entwicklung/github/Elastica/lib/Elastica/Transport/Http.php on line 103
```