diff --git a/experiment/src/org/labkey/experiment/api/ExpMaterialImpl.java b/experiment/src/org/labkey/experiment/api/ExpMaterialImpl.java index 1cce0b63cc8..dcb0a1e9bb8 100644 --- a/experiment/src/org/labkey/experiment/api/ExpMaterialImpl.java +++ b/experiment/src/org/labkey/experiment/api/ExpMaterialImpl.java @@ -426,9 +426,11 @@ public WebdavResource createIndexDocument(@Nullable ExpMaterialTableImpl tableIn Map props = new HashMap<>(); Set identifiersHi = new HashSet<>(); + Set keyworksHi = new HashSet<>(); // Name is identifier with the highest weight identifiersHi.add(getName()); + keyworksHi.add(getName()); // support "Boosting syntax (^4)" on name // Add aliases in parentheses in the title StringBuilder title = new StringBuilder("Sample - " + getName()); @@ -459,7 +461,7 @@ public WebdavResource createIndexDocument(@Nullable ExpMaterialTableImpl tableIn tableInfo = (ExpMaterialTableImpl) QueryService.get().getUserSchema(User.getSearchUser(), container, SCHEMA_SAMPLES).getTable(getSampleType().getName()); if (tableInfo != null) - getCustomIndexValues(props, tableInfo, identifiersHi, jsonData); + getCustomIndexValues(props, tableInfo, identifiersHi, keyworksHi, jsonData); } props.put(SearchService.PROPERTY.jsonData.toString(), jsonData); @@ -519,6 +521,7 @@ private void getCustomIndexValues( Map props, @NotNull ExpMaterialTableImpl table, Set identifiersHi, + Set keywordsHi, JSONObject jsonData ) { @@ -526,7 +529,7 @@ private void getCustomIndexValues( for (ExpMaterialTable.Column column : ExpMaterialTable.Column.values()) skipColumns.add(column.name()); - processIndexValues(props, table, skipColumns, identifiersHi, new HashSet<>(), new HashSet<>(), new HashSet<>(), new HashSet<>(), new HashSet<>(), jsonData); + processIndexValues(props, table, skipColumns, identifiersHi, new HashSet<>(), new HashSet<>(), keywordsHi, new HashSet<>(), new HashSet<>(), jsonData); } static final List> updateLastIndexedList = new ArrayList<>();