Support and Documentation


You can select which fields appear in the search results with the Fields list in the results section of the search panel. Brightspot populates the Select Fields widget with default fields.


Using the SearchResultField interface, you can add custom fields to the widget. For example, say that you want the author name to appear for articles listed in the search results. You can implement SearchResultField to return the Author field for Article objects retrieved in a query, similar to the following example.

public class AuthorField implements SearchResultField {

   public String getDisplayName() {
      return "Author";

   public boolean isSupported(ObjectType type) {
      return true;

   public String createDataCellText(Object item) {
      Article article = State.getInstance(item).getOriginalObject() instanceof Article
             ? ((Article) State.getInstance(item).getOriginalObject()) : null;

      if (article != null) {
         if (article.getAuthor() != null)
            return article.getAuthor().getName();
         else return ("No attribution");
      return null;

In the previous snippet—

  • Lines 3–6 implement the getDisplayName method, specifying how the field appears in the search results.

  • Lines 8–11 implement the isSupported method. If it returns false, the Author field will not appear in the Select Fields widget.

  • Lines 13–24 implement the createDataCellText method. The method filters for Article objects and returns null if the search result is not an Article. For objects where the Author field is set, the author name is returned; otherwise "No attribution" is returned.

With the new implementation, the Author field is now available in the Select Fields widget.


With a query on articles, the Author field is included in the search results.