Documents that only contain integers

Hi all,

I have a search problem where my documents only contain integers (typically
a few thousand per doc)..and I need to do an exact search for an input set
of integers.

I was thinking of just adding them as normal files (strings- space
delimted), and then searching them.

Is there a more efficient way of searching, given the peculiar nature of the
problem? Maybe, using one or the more complex types that elastic search
supports ?

Thanks for your input.

Cheers,

Vijay

Can I get some suggestions on this ?

Thanks,

Vijay

On Aug 17, 1:38 am, Vijay Chandrasekhar vijay....@gmail.com wrote:

Hi all,

I have a search problem where my documents only contain integers (typically
a few thousand per doc)..and I need to do an exact search for an input set
of integers.

I was thinking of just adding them as normal files (strings- space
delimted), and then searching them.

Is there a more efficient way of searching, given the peculiar nature of the
problem? Maybe, using one or the more complex types that Elasticsearch
supports ?

Thanks for your input.

Cheers,

Vijay

I think indexing you documents with a single field carrying an array of
integers (at the json level) should be appropriate. At query time you would
then use a 'terms query' (
http://www.elasticsearch.org/guide/reference/query-dsl/terms-query.html) to
match one (or more) integers against the field.