i'm new to programming, so i apologize, if my question is very simple.
First of all, I have installed and configured MongoDB and ES with MongoDB river, but i can't find how to do it via Elastica. My example is
curl -XPUT 'http://localhost:9200/_river/mongodb/_meta' -d '{
"type": "mongodb",
"mongodb": {
"db": "testTweets",
"collection": "msgs"
},
"index": {
"name": "mongoindex",
"type": "my_type"
}
}'
and also a query is
curl -XGET 'http://localhost:9200/mongoindex/_search?q=something&pretty=true'
How can i write them using PHP and Elastica?
I took as example
$elasticaType = $elasticaIndex->getType('tweet');
and i can't find how to match the curl command with the right php code.
I hope to be crystal clear! If you need any other to detail to give my a help, i will be very happy to add it.
Thank you in advance!
EDIT***
A nice way to compose ElasticSearch analysis or mapping is the following chrome extension https://chrome.google.com/webstore/detail/sense/doinijnbnggojdlcjifpdckfokbbfpbo . It's very helpful for me.