mirror of
https://github.com/nasa/openmct.git
synced 2025-01-20 03:36:44 +00:00
[Search] Search behaves as expected
Seaching any substring of a domain object title now will give the domian object as a search result. Still not case sensitive. Empty string will return all results. Special characters do not search correctly. Still has result number cap.
This commit is contained in:
parent
5892594668
commit
503811f69c
@ -89,19 +89,14 @@ define(function () {
|
||||
searchTerm = document.getElementById("searchinput").value;
|
||||
}
|
||||
|
||||
// Process search term
|
||||
// Put wildcards on front and end to allow substring behavior
|
||||
searchTerm = '*' + searchTerm + '*';
|
||||
|
||||
// Get the data...
|
||||
return $http({
|
||||
method: "GET",
|
||||
url: ROOT + "/_search/?q=name:'" + searchTerm + "'"
|
||||
/*,
|
||||
data: {
|
||||
query: {
|
||||
term : {
|
||||
_source: { name : "test123" }
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
url: ROOT + "/_search/?q=name:" + searchTerm
|
||||
}).then(function (rawResults) {
|
||||
// ...then process the data
|
||||
var results = rawResults.data.hits.hits,
|
||||
|
Loading…
Reference in New Issue
Block a user