Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Elasticsearch question

Vote:
 

Anyone got any idea how i could search in a specific field with elasticsearch? For example only get hits when the search query matches the title:

$.ajax({
url: xxxxxxxxxxxxxxxx,
dataType: "jsonp",
data: {
type: "TestSite_Web_Models_Pages_StandardPage",
q: query + "*",
size: 10,
df: [Title$$string.lowercase"]
},
success: function (response) {
var item = response.hits.hits;
if (item.length > 0) {
console.log(item);
for (var i = 0; i < item.length; i++) {
alert(item[i]._source.StaticLinkURL$$string);
}
}

},
});

#113622
Nov 25, 2014 18:21
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.