mirror of
https://github.com/nasa/openmct.git
synced 2025-05-02 00:39:58 +00:00
[Search] Moved hard coding
Moved where the search type is prepended to the search term, to allow future changes to it.
This commit is contained in:
parent
7c627fae8f
commit
27c7410318
@ -158,11 +158,13 @@ define(
|
|||||||
// '*sine* OR *telemetry*'
|
// '*sine* OR *telemetry*'
|
||||||
searchTerm = '*' + searchTerm + '*';
|
searchTerm = '*' + searchTerm + '*';
|
||||||
}
|
}
|
||||||
|
// Assume that the search term is for the name by default
|
||||||
|
searchTerm = "name:" + searchTerm;
|
||||||
|
|
||||||
// Get the data...
|
// Get the data...
|
||||||
return $http({
|
return $http({
|
||||||
method: "GET",
|
method: "GET",
|
||||||
url: ROOT + "/_search/?q=name:" + searchTerm +
|
url: ROOT + "/_search/?q=" + searchTerm +
|
||||||
"&size=" + maxResults
|
"&size=" + maxResults
|
||||||
}).then(function (rawResults) {
|
}).then(function (rawResults) {
|
||||||
// ...then process the data
|
// ...then process the data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user