From 604c407e91ab296d95130a5dd63a647ec3024799 Mon Sep 17 00:00:00 2001 From: kimchy Date: Sun, 14 Feb 2010 02:20:34 +0200 Subject: [PATCH] smart search analyzer should try both fullName and then indexName, and not just indexName. --- .../index/mapper/MapperService.java | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/MapperService.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/MapperService.java index c54a1165b86..b8d0e7851db 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/MapperService.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/MapperService.java @@ -255,6 +255,17 @@ public class MapperService extends AbstractIndexComponent implements IterableIt also (without the optional type prefix) try and find the {@link FieldMappers} for the specific + * name. It will first try to find it based on the full name (with the dots if its a compound name). If + * it is not found, will try and find it based on the indexName (which can be controlled in the mapping). + * + *

If nothing is found, returns null. + */ public SmartNameFieldMappers smartName(String smartName) { int dotIndex = smartName.indexOf('.'); if (dotIndex != -1) { @@ -336,7 +347,12 @@ public class MapperService extends AbstractIndexComponent implements Iterable