Skip to content

Commit

Permalink
from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-hodgson committed Dec 10, 2024
1 parent 3856500 commit dd32d0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ private SearchQuery checkForJson(String queryString) {
SearchQuery query = getBaseSearchQuery();

query.setQueryTerm(
Arrays.asList(queryString.replace("%20", " ").split(" "))
Arrays.asList(queryString.replace("%20", " ").split("\\s+"))
);

// if query parses into SearchQuery, use that, otherwise use it as a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.Widget;
import com.google.inject.Inject;
import java.util.Arrays;
import java.util.Collections;
import org.gwtbootstrap3.client.ui.Alert;
import org.gwtbootstrap3.client.ui.AnchorListItem;
Expand Down Expand Up @@ -307,8 +308,9 @@ private String getCurrentProjectSearchJSON() {
projectsOnly.setKey("node_type");
projectsOnly.setValue("project");
query.getBooleanQuery().add(projectsOnly);

query.setQueryTerm(
Collections.singletonList(projectSearchTextBox.getValue())
Arrays.asList(projectSearchTextBox.getValue().split("\\s+"))
);
query.writeToJSONObject(adapter);
searchJSON = adapter.toJSONString();
Expand Down

0 comments on commit dd32d0f

Please sign in to comment.