fix searches with spaces
This commit is contained in:
@@ -44,9 +44,7 @@ class SearchIndex {
|
||||
if (rv == null) {
|
||||
rv = forWord
|
||||
} else {
|
||||
System.out.println("before retention $rv")
|
||||
rv.retainAll(forWord)
|
||||
System.out.println("after retention")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -50,7 +50,8 @@ class MainFrameController {
|
||||
searchEvent = new SearchEvent(searchHash : Base64.decode(search), uuid : uuid)
|
||||
} else {
|
||||
// this can be improved a lot
|
||||
def terms = search.toLowerCase().trim().split(Constants.SPLIT_PATTERN)
|
||||
def replaced = search.toLowerCase().trim().replaceAll(Constants.SPLIT_PATTERN, " ")
|
||||
def terms = replaced.split(" ")
|
||||
searchEvent = new SearchEvent(searchTerms : terms, uuid : uuid)
|
||||
}
|
||||
core.eventBus.publish(new QueryEvent(searchEvent : searchEvent, firstHop : true,
|
||||
|
||||
Reference in New Issue
Block a user