Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions experiment/src/org/labkey/experiment/api/ExpMaterialImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,11 @@ public WebdavResource createIndexDocument(@Nullable ExpMaterialTableImpl tableIn

Map<String, Object> props = new HashMap<>();
Set<String> identifiersHi = new HashSet<>();
Set<String> 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());
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -519,14 +521,15 @@ private void getCustomIndexValues(
Map<String, Object> props,
@NotNull ExpMaterialTableImpl table,
Set<String> identifiersHi,
Set<String> keywordsHi,
JSONObject jsonData
)
{
CaseInsensitiveHashSet skipColumns = new CaseInsensitiveHashSet();
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<Pair<Integer,Long>> updateLastIndexedList = new ArrayList<>();
Expand Down