Storing a field w/o indexing it


(g) #1

hello - is it possible to have a field that is ignored in the index,
but
returned as part of the doc?

eg.

"long_mime_encoded_string" : "xxxx...xx",

What steps or magical incantation enables this setup? Put Mapping API
looks
like the sort-of-maybe solution.

As well, performance considerations in doing this?

thanks in advance!


(ppearcy) #2

Hey,
You can do this a few ways. The way that we do it is to have
explicit mappings (dynamic=false) and store the _source json and
include it as part of that.

The other options are:

  • Have it in the mappings with index=no,store=no and store it via the
    _source json
  • Have it in the mappings with index=no,store=yes. Then you do not
    need to store the source json.

Best Regards,
Paul

On Aug 9, 5:38 pm, gleeco gle...@gmail.com wrote:

hello - is it possible to have a field that is ignored in the index,
but
returned as part of the doc?

eg.

"long_mime_encoded_string" : "xxxx...xx",

What steps or magical incantation enables this setup? Put Mapping API
looks
like the sort-of-maybe solution.

As well, performance considerations in doing this?

thanks in advance!


(system) #3