简体   繁体   中英

Perform Elasticsearch on Mongodb query Result Set using PHP

I'm new bie to Elasticsearch. is it possible to perform Elasticsearch on a mongodb result set?

Scenario: Suppose i've a mongodb query which returned a result set of 20k, from this 20k i want to extract some results using Elasticsearch. BTW i'm using Elasticsearch-PHP.

Please help me on this.

Thanks.

I do not think so in the way you specified. Elasticsearch does processing when it indexes documents to allow for future searching. Meaning if you know you're going to be sorting on a field using a filter later on, you will index that particular field without doing any analysis on it.

Since these pre-processed documents are what elasticsearch does its searches over, not raw text (or JSON in your case), I'm pretty sure you're going to have to index your documents in elasticsearch before you can use elasticsearch queries to search them.

Elasticsearch is storage as much as it is a query language.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM