上QQ阅读APP看书,第一时间看更新
How it works...
The alias is a convenient way to use the same name for your search field without the need to change the data structure of your fields. An alias field doesn't need to change a document's structure, thus allowing more flexibility for your data models.
The alias is resolved during search indices expansion of the query and has no performance penalties due to its usage.
If you try to index a document with a value in an alias field, an exception will be thrown.
The path of the alias field must contain the full resolution of the target field, which must be a concrete field, and must be known when the alias is defined.
In the case of an alias in a nested object, it must be in the same nested scope as the target.