我一直在使用ElasticSearch和Elastica(http://elastica.io/)整合我们的搜索实现。目前我无法弄清楚如何执行count搜索,正如ElasticSearch的CountAPI中所说的那样。谁能帮我解决这个问题?一些示例代码会很棒,因为我还不是100%了解所有Elastica对象的关联方式。提前致谢。 最佳答案 您可以使用搜索类(http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-sea
我的问题很简单。我想在Elastica的一个查询中组合两个过滤器,一个filter_bool和一个filter_range。代码是publicfunctiongetAdvancedTweetsEs($keyword,$location,$datepicker,$datepicker1,$offset){$elasticaClient=newElastica_Client();//Loadindex$elasticaIndex=$elasticaClient->getIndex('mongoindex3');//DefineaQuery.Wewantastringquery.$elast
我开始用Symfony2搞乱ElasticSearchBundle,并对实体搜索功能有疑问。如果你有这样的配置:foq_elastica:clients:default:{host:localhost,port:9200}indexes:website:client:defaulttypes:user:mappings:username:{boost:5}firstName:{boost:3}persistence:driver:orm#orm,mongodb,propelareavailablemodel:Application\UserBundle\Entity\Userprovi
我是编程新手,如果我的问题很简单,我深表歉意。首先,我已经使用MongoDBriver安装并配置了MongoDB和ES,但我找不到如何通过Elastica进行操作。我的例子是curl-XPUT'http://localhost:9200/_river/mongodb/_meta'-d'{"type":"mongodb","mongodb":{"db":"testTweets","collection":"msgs"},"index":{"name":"mongoindex","type":"my_type"}}'还有一个查询是curl-XGET'http://localhost:920