Field name alias

Hi,

is there something I would call "field name alias"? Suppose I have two
indeces/types with two different document schemas. One where the title of
the document is found in the field "title" and another where the field is
called "headline". But at query time I only want to query the field-(alias)
"title" but get both matching types of documents.

document A:
{ "title": "hello" }

document B:
{ "headline": "hello" }

pseudo-query:
{
"term" : { "titleAlias" : "hello"}
}

Cheers

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Hey,

no real alias functionality, but you can rename fields on indexing using
the index_name property in your mapping.

Hope this helps

On Tue, May 7, 2013 at 5:16 PM, Valentin pletzer@gmail.com wrote:

Hi,

is there something I would call "field name alias"? Suppose I have two
indeces/types with two different document schemas. One where the title of
the document is found in the field "title" and another where the field is
called "headline". But at query time I only want to query the field-(alias)
"title" but get both matching types of documents.

document A:
{ "title": "hello" }

document B:
{ "headline": "hello" }

pseudo-query:
{
"term" : { "titleAlias" : "hello"}
}

Cheers

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks!

On Tuesday, May 7, 2013 11:43:08 PM UTC+2, Alexander Reelsen wrote:

Hey,

no real alias functionality, but you can rename fields on indexing using
the index_name property in your mapping.
Elasticsearch Platform — Find real-time answers at scale | Elastic

Hope this helps

On Tue, May 7, 2013 at 5:16 PM, Valentin <ple...@gmail.com <javascript:>>wrote:

Hi,

is there something I would call "field name alias"? Suppose I have two
indeces/types with two different document schemas. One where the title of
the document is found in the field "title" and another where the field is
called "headline". But at query time I only want to query the field-(alias)
"title" but get both matching types of documents.

document A:
{ "title": "hello" }

document B:
{ "headline": "hello" }

pseudo-query:
{
"term" : { "titleAlias" : "hello"}
}

Cheers

--
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 elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.

--
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.
For more options, visit https://groups.google.com/groups/opt_out.