Able to filter a field from document

I am wondering if it is possible to filter a field from a document
using aliases. For example if I have an index with documents such as

{
"user" : "test",
"secret_field": "value",
"post_date" : "2014-06-05T09:12:12",
"message" : "trying out Elasticsearch"
}

Now if I want to create an alias for this index which has all the
documents with fields as above except the secret_field. I can use the
term filter in the alias creation but that works at document level and
filters the documents based on specified terms. So I am wondering is
there any other method to filter only field but not the whole document
from index.

Regards,
Gurvinder

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/54323E86.8000001%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

I'm not sure I understood what you are looking for.
May be exclude is what you want?

See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-source-field.html#include-exclude

Le 6 oct. 2014 à 09:02, Gurvinder Singh gurvindersinghdahiya@gmail.com a écrit :

I am wondering if it is possible to filter a field from a document
using aliases. For example if I have an index with documents such as

{
"user" : "test",
"secret_field": "value",
"post_date" : "2014-06-05T09:12:12",
"message" : "trying out Elasticsearch"
}

Now if I want to create an alias for this index which has all the
documents with fields as above except the secret_field. I can use the
term filter in the alias creation but that works at document level and
filters the documents based on specified terms. So I am wondering is
there any other method to filter only field but not the whole document
from index.

Regards,
Gurvinder

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/54323E86.8000001%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/3C7E7F56-792C-4425-A4C0-A55A3C78D380%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

On 10/06/2014 09:14 AM, David Pilato wrote:

I'm not sure I understood what you are looking for.
May be exclude is what you want?

See: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-source-field.html#include-exclude
This might have worked if Elasticsearch can apply mapping seperately to
aliases. As it seems in version 1.3.2, the mapping is only applied to
the index and alias inherent that from index. So I can not use source
exclusion, as I want to have secret field in original index and hidden
in the alias.

  • Gurvinder

Le 6 oct. 2014 à 09:02, Gurvinder Singh <gurvindersinghdahiya@gmail.com
mailto:gurvindersinghdahiya@gmail.com> a écrit :

I am wondering if it is possible to filter a field from a document
using aliases. For example if I have an index with documents such as

{
"user" : "test",
"secret_field": "value",
"post_date" : "2014-06-05T09:12:12",
"message" : "trying out Elasticsearch"
}

Now if I want to create an alias for this index which has all the
documents with fields as above except the secret_field. I can use the
term filter in the alias creation but that works at document level and
filters the documents based on specified terms. So I am wondering is
there any other method to filter only field but not the whole document
from index.

Regards,
Gurvinder

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearch+unsubscribe@googlegroups.com
mailto:elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/54323E86.8000001%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google
Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to elasticsearch+unsubscribe@googlegroups.com
mailto:elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/3C7E7F56-792C-4425-A4C0-A55A3C78D380%40pilato.fr
https://groups.google.com/d/msgid/elasticsearch/3C7E7F56-792C-4425-A4C0-A55A3C78D380%40pilato.fr?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/5433878C.1090400%40gmail.com.
For more options, visit https://groups.google.com/d/optout.