Elasticsearch document boosting

Hi,

I'm trying to do document boosting for search relevancy but i dont see
that the "_boost" value is getting applied to the lucene ranking function.
Please see in explain that _boost is not applied.

Query executed:
http://localhost:9200/email_test/_search?&source={"query":{"query_string":{"query":"ebay","default_operator":"AND","fields":[["emails.emailBody","srId","chatTextArray.text"]]}},"facets":{"channel":{"terms":{"field":"channel"}},"siteId":{"terms":{"field":"siteId"}},"closeDt":{"terms":{"field":"closeDt"}}}}&pretty=true&explain=true

Here is the query results:

"hits" : {
"total" : 11,
"max_score" : 0.1929718,
"hits" : [ {
"shard" : 3,
"node" : "BfpyRFcNRIe92is-LvHXTw",
"index" : "email_test",
"type" : "json",
"id" : "1972810644",
"score" : 0.1929718, "source" : {"gbhLocale":"","srNote":"","transferCount":3,"closeDt":1361989085000,"severityCode":"LOW","gbhUserLoc":"","_boost":1,"claimBuyerId":"","catL1":"General Support","reopened":false,"link_ocs_session_id":"","catL3":"eBay Password","catL2":"eBay Account Information","openDt":1312506785000,"userId":76327670,"link_sr_det_dw":"441814382","contactDuration":49478700,"gbhSiteId":-999,"originalGroup":"MANAGED_ACCOUNT","priorityCode":"MEDIUM","claimItemId":"","reporterType":"Unspecified","claimId":"","link_S_evt_act":["1-25J3ZHZ","1-25J3ZI1","1-25JIEAX"],"accountNote":"","gbhLang":"","agentId":89412,"emails":[{"activityAtmosDocId":"","emailToLine":"","activityReasonCd":"","emailSndrName":"","emailCcLine":"","activityOrder":0,"emailSndrAddress":"","emailBody":"","activityTypeName":"Workflow - API","emailBccLine":"","emailRecipName":"","emailRecipAddress":"","activityName":"Reset Password","activityCreationDt":1348119018000,"emailMime":""},{"activityAtmosDocId":"","emailToLine":"","activityReasonCd":"","emailSndrName":"","emailCcLine":"","activityOrder":1,"emailSndrAddress":"","emailBody":"","activityTypeName":"Email - Outbound","emailBccLine":"","emailRecipName":"","emailRecipAddress":"","activityName":"Automated - How To Reset Password with Provided URL","activityCreationDt":1348119024000,"emailMime":""},{"activityAtmosDocId":"","emailToLine":"xxx@aol.com","activityReasonCd":"","emailSndrName":"Default SMTP Profile","emailCcLine":"","activityOrder":2,"emailSndrAddress":"","emailBody":"
______________________________________ \n eBay sent this message to James Garvey (sammgarv). Your registered name is included to show this message came from eBay. \n Learn more about how to tell if an email is really from eBay: \n http://pages.ebay.com/help/account/recognizing-spoof.html \n _____________________________________________ \n \n Hello sammgarv (xxx@aol.com), \n You mentioned you'd forgotten your password. We can help you fix that. Please copy and paste this web address into your browser exactly as you see it: \n https://signin.ebay.com/ebaymotors/ws/eBayISAPI.dll?ChangeSecretPassword&pass=%245%24XbEs9l0U%24Ug1g8KO8MhKTAT2tNu8kd. You may be asked to sign in. If you didn't forget your password, you can ignore this email.Thanks, \n \n eBay \n _____________________________________________\n Learn more about how to protect yourself from spoof (fake) emails: http://pages.ebay.com/education/spooftutorial This administrative email was sent to xxx@aol.com from eBay. As outlined in our User Agreement, eBay will periodically send you required emails about site changes, site enhancements, and your transactions. Read our Privacy Policy and User Agreement for more details:\n http://pages.ebay.com/help/policies/privacy-policy.html\n http://pages.ebay.com/help/policies/user-agreement.html\n \n Copyright © 2012 eBay Inc. All Rights Reserved. Designated trademarks and brands are the property of their respective owners. eBay and the eBay logo are trademarks of eBay Inc. eBay Inc. is located at 2145 Hamilton Avenue, San Jose, CA 95125.\n _____________________________________________\n ","activityTypeName":"Email - Outbound","emailBccLine":"","emailRecipName":"","emailRecipAddress":"","activityName":"Forgot your password? Here's how to change it - SR# 1-1302291055","activityCreationDt":1348119044000,"emailMime":""}],"siteId":0,"subStatus":"CANCELLED","agentGroup":"Unspecified","link_S_srv_req":"1-LJCM7J","requestSummary":"General Support","link_sr_fact_dw":"26678843\u0007\u0001United States\u0001Closed\u0001X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fDQogZUJheSBzZW50IHRoaXMgbWVzc2FnZSB0byBKYW1lcyBHYXJ2ZXkgKHNhbW1nYXJ2KS4gWW91ciByZWdpc3RlcmVkIG5hbWUgaXMga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_x_ebay_action_item_id":"","srId":"1-1302291055"},
"_explanation" : {
"value" : 0.1929718,
"description" : "max of:",
"details" : [ {
"value" : 0.1929718,
"description" : "weight(emails.emailBody:ebay in 0) [PerFieldSimilarity], result of:",
"details" : [ {
"value" : 0.1929718,
"description" : "score(doc=0,freq=11.0 = termFreq=11.0\n), product of:",
"details" : [ {
"value" : 0.5498228,
"description" : "queryWeight, product of:",
"details" : [ {
"value" : 1.6931472,
"description" : "idf(docFreq=3, maxDocs=8)"
}, {
"value" : 0.3247342,
"description" : "queryNorm"
} ]
}, {
"value" : 0.3509709,
"description" : "fieldWeight in 0, product of:",
"details" : [ {
"value" : 3.3166249,
"description" : "tf(freq=11.0), with freq of:",
"details" : [ {
"value" : 11.0,
"description" : "termFreq=11.0"
} ]
}, {
"value" : 1.6931472,
"description" : "idf(docFreq=3, maxDocs=8)"
}, {
"value" : 0.0625,
"description" : "fieldNorm(doc=0)"
} ]
} ]
} ]
} ]
}
}

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Boosts in Elaticsearch/Lucene are relative, with the value of one being
baseline. So your boost of one is effectively the same as not boosting at
all. Change it to a boost > 1 and you should see some changes.

Do note that document-level boosting (per-doc and per-field) is compressed
into the field normalization value, which also includes the length
normalization. In the explain output, you should see a change in the fieldNorm value. It is generally recommended to use query-time boosting,
since it is easier to interpret and more flexible.

-Zach

On Monday, September 16, 2013 3:50:39 PM UTC-4, Vinoth Amar wrote:

Hi,

I'm trying to do document boosting for search relevancy but i dont see
that the "_boost" value is getting applied to the lucene ranking function.
Please see in explain that _boost is not applied.

Query executed:
http://localhost:9200/email_test/_search?&source={
"query":{"query_string":{"query":"ebay","default_operator":"AND","fields":[["emails.emailBody","srId","chatTextArray.text"]]}},"facets":{"channel":{"terms":{"field":"channel"}},"siteId":{"terms":{"field":"siteId"}},"closeDt":{"terms":{"field":"closeDt"}}}}&pretty=true&explain=true

Here is the query results:

"hits" : {
"total" : 11,
"max_score" : 0.1929718,
"hits" : [ {
"shard" : 3,
"node" : "BfpyRFcNRIe92is-LvHXTw",
"index" : "email_test",
"type" : "json",
"id" : "1972810644",
"score" : 0.1929718, "source" : {"gbhLocale":"","srNote":"","transferCount":3,"closeDt":1361989085000,"severityCode":"LOW","gbhUserLoc":"","_boost":1,"claimBuyerId":"","catL1":"General Support","reopened":false,"link_ocs_session_id":"","catL3":"eBay Password","catL2":"eBay Account Information","openDt":1312506785000,"userId":76327670,"link_sr_det_dw":"441814382","contactDuration":49478700,"gbhSiteId":-999,"originalGroup":"MANAGED_ACCOUNT","priorityCode":"MEDIUM","claimItemId":"","reporterType":"Unspecified","claimId":"","link_S_evt_act":["1-25J3ZHZ","1-25J3ZI1","1-25JIEAX"],"accountNote":"","gbhLang":"","agentId":89412,"emails":[{"activityAtmosDocId":"","emailToLine":"","activityReasonCd":"","emailSndrName":"","emailCcLine":"","activityOrder":0,"emailSndrAddress":"","emailBody":"","activityTypeName":"Workflow - API","emailBccLine":"","emailRecipName":"","emailRecipAddress":"","activityName":"Reset Password","activityCreationDt":1348119018000,"emailMime":""},{"activityAtmosDocId":"","emailToLine":"","activityReasonCd":"","emailSndrName":"","emailCcLine":"","activityOrder":1,"emailSndrAddress":"","emailBody":"","activityTypeName":"Email - Outbound","emailBccLine":"","emailRecipName":"","emailRecipAddress":"","activityName":"Automated - How To Reset Password with Provided URL","activityCreationDt":1348119024000,"emailMime":""},{"activityAtmosDocId":"","emailToLine":"x...@aol.com <javascript:>","activityReasonCd":"","emailSndrName":"Default SMTP Profile","emailCcLine":"","activityOrder":2,"emailSndrAddress":"","emailBody":"
______________________________________ \n eBay sent this message to James Garvey (sammgarv). Your registered name is included to show this message came from eBay. \n Learn more about how to tell if an email is really from eBay: \n Recognizing phishing phone calls and emails | eBay \n _____________________________________________ \n \n Hello sammgarv (x...@aol.com <javascript:>), \n You mentioned you'd forgotten your password. We can help you fix that. Please copy and paste this web address into your browser exactly as you see it: \n https://signin.ebay.com/ebaymotors/ws/eBayISAPI.dll?ChangeSecretPassword&pass=%245%24XbEs9l0U%24Ug1g8KO8MhKTAT2tNu8kd. You may be asked to sign in. If you didn't forget your password, you can ignore this email.Thanks, \n \n eBay \n _____________________________________________\n Learn more about how to protect yourself from spoof (fake) emails: Home | Seller Center This administrative email was sent to x...@aol.com <javascript:> from eBay. As outlined in our User Agreement, eBay will periodically send you required emails about site changes, site enhancements, and your transactions. Read our Privacy Policy and User Agreement for more details:\n http://pages.ebay.com/help/policies/privacy-policy.html\n http://pages.ebay.com/help/policies/user-agreement.html\n \n Copyright © 2012 eBay Inc. All Rights Reserved. Designated trademarks and brands are the property of their respective owners. eBay and the eBay logo are trademarks of eBay Inc. eBay Inc. is located at 2145 Hamilton Avenue, San Jose, CA 95125.\n _____________________________________________\n ","activityTypeName":"Email - Outbound","emailBccLine":"","emailRecipName":"","emailRecipAddress":"","activityName":"Forgot your password? Here's how to change it - SR# 1-1302291055","activityCreationDt":1348119044000,"emailMime":""}],"siteId":0,"subStatus":"CANCELLED","agentGroup":"Unspecified","link_S_srv_req":"1-LJCM7J","requestSummary":"General Support","link_sr_fact_dw":"26678843\u0007\u0001United States\u0001Closed\u0001X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fDQogZUJheSBzZW50IHRoaXMgbWVzc2FnZSB0byBKYW1lcyBHYXJ2ZXkgKHNhbW1nYXJ2KS4gWW91ciByZWdpc3RlcmVkIG5hbWUgaXMgaW5jbHVkZWQgdG8gc2hvdyB0aGlzIG1lc3NhZ2UgY2FtZSBmcm9tIGVCYXkuIA0KIExlYXJuIG1vcmUgYWJvdXQgaG93IHRvIHRlbGwgaWYgYW4gZW1haWwgaXMgcmVhbGx5IGZyb20gZUJheTogDQogaHR0cDovL3BhZ2VzLmViYXkuY29tL2hlbHAvYWNjb3VudC9yZWNvZ25pemluZy1zcG9vZi5odG1sDQogX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fDQoNCiBIZWxsbyBzYW1tZ2FydiAoc3RudXJzZTIwMTBAYW9sLmNvbSksDQoNCllvdSBtZW50aW9uZWQgeW91J2QgZm9yZ290dGVuIHlvdXIgcGFzc3dvcmQuIFdlIGNhbiBoZWxwIHlvdSBmaXggdGhhdC4gUGxlYXNlIGNvcHkgYW5kIHBhc3RlIHRoaXMgd2ViIGFkZHJlc3MgaW50byB5b3VyIGJyb3dzZXIgZXhhY3RseSBhcyB5b3Ugc2VlIGl0OiAgDQogaHR0cHM6Ly9zaWduaW4uZWJheS5jb20vZWJheW1vdG9ycy93cy9lQmF5SVNBUEkuZGxsP0NoYW5nZVNlY3JldFBhc3N3b3JkIA0KIENvcHlyaWdodCDCqSAyMDEyIGVCYXkgSW5jLiBBbGwgUmlnaHRzIFJlc2VydmVkLiBEZXNpZ25hdGVkIHRyYWRlbWFya3MgYW5kIGJyYW5kcyBhcmUgdGhlIHByb3BlcnR5IG9mIHRoZWlyIHJlc3BlY3RpdmUgb3duZXJzLiBlQmF5IGFuZCB0aGUgZUJheSBsb2dvIGFyZSB0cmFkZW1hcmtzIG9mIGVCYXkgSW5jLiBlQmF5IEluYy4gaXMgbG9jYXRlZCBhdCAyMTQ1IEhhbWlsdG9uIEF2ZW51ZSwgU2FuIEpvc2UsIENBIDk1MTI1Lg0KIF9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXw0KICANCg0K","claimSellerId":"","claimAmount":0,"channel":"EMAIL","link_x_ebay_action_item_id":"","srId":"1-1302291055"},
"_explanation" : {
"value" : 0.1929718,
"description" : "max of:",
"details" : [ {
"value" : 0.1929718,
"description" : "weight(emails.emailBody:ebay in 0) [PerFieldSimilarity], result of:",
"details" : [ {
"value" : 0.1929718,
"description" : "score(doc=0,freq=11.0 = termFreq=11.0\n), product of:",
"details" : [ {
"value" : 0.5498228,
"description" : "queryWeight, product of:",
"details" : [ {
"value" : 1.6931472,
"description" : "idf(docFreq=3, maxDocs=8)"
}, {
"value" : 0.3247342,
"description" : "queryNorm"
} ]
}, {
"value" : 0.3509709,
"description" : "fieldWeight in 0, product of:",
"details" : [ {
"value" : 3.3166249,
"description" : "tf(freq=11.0), with freq of:",
"details" : [ {
"value" : 11.0,
"description" : "termFreq=11.0"
} ]
}, {
"value" : 1.6931472,
"description" : "idf(docFreq=3, maxDocs=8)"
}, {
"value" : 0.0625,
"description" : "fieldNorm(doc=0)"
} ]
} ]
} ]
} ]
}
}

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.