Skip to content

Commit

Permalink
added Ingredient Name Preferred facet
Browse files Browse the repository at this point in the history
  • Loading branch information
Newatia authored and Newatia committed Nov 1, 2022
1 parent a8c74e6 commit b467adb
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public Class<Application> getIndexedEntityClass() {
public void createIndexableValues(Application application, Consumer<IndexableValue> consumer) {
try {
String result = "HAS_NO_INGREDIENT";
// Facet: Ingredient Name (Note: This includes all the Ingredient Names)
for (ApplicationProduct p : application.applicationProductList) {
for (ApplicationIngredient ing : p.applicationIngredientList) {
if (ing != null) {
Expand All @@ -45,10 +46,15 @@ public void createIndexableValues(Application application, Consumer<IndexableVal
consumer.accept(IndexableValue.simpleFacetStringValue("Ingredient Name", nameObj.name).suggestable().setSortable());
}
});

System.out.println("**** DISPLAY NAME ****: " + s.getName());
if (s.getName() != null) {
System.out.println("@@@@@@ INSIDE DISPLAY @@@@");
consumer.accept(IndexableValue.simpleFacetStringValue("Ingredient Name (Preferred)", s.getName()).suggestable().setSortable());
}
}
}
}

}
}

Expand Down

0 comments on commit b467adb

Please sign in to comment.