ES, MongoDB and performance

Hi,

I have near 1 billion documents in MongoDB instance and they're nearly similar so I'm storing them in a single collection. I'm using mongo-connector to import this collection to ES. Each document has a name field (string) and value field (int, float, bool, array).

I need to do a text search and a range query. I'm using 'match' on name field for text search and 'must' for range query on value (int, float) among documents having a particular name field using 'match' on name and 'range' on value.

Is there a better way to do this performance wise?

I'd use filter instead of must for all the exact values or ranges...

Can I change document structure to improve search performance? For eg, instead of documents with structure as {name: abc, value: xyz}, grouping documents with same name like {same_name: abc, collection: [ {name: def, value: 1}, {name: edf, value: 2}] }. Is there any increase?

Basically, I'm trying to increase search speed for semi-structured data. Also match supports querying partial words right?

It would be easier to understand if you provide a document, the mapping, a typical query and the took value of a search response.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.