[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:
shale 2015-07-14 10:45:51 -07:00
parent 5892594668
commit 503811f69c

View File

@ -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,