Hi Binh,
The same problem again. I have the following queries :
1)
{
"from" : 0,
"size" : 100,
"explain" : true,
"query" : {
"filtered" : {
"query" : {
"multi_match": {
"query": "happy",
"fields": [ "DISPLAY_NAME^6", "PERFORMER" ]
}
},
"filter" : {
"query" : {
"bool" : {
"must" : {
"term" : {
"CHANNEL_ID" : "1"
}
}
}
}
}
}
}
}
However the result display in reverse order for #2 and #3. I have added the
boost in the DISPLAY_NAME but still yield the same behaviour :
1)
* "_score": 10.960511,*
"_source": {
"DISPLAY_NAME": "Happy",
"PRICE": 5,
"CHANNEL_ID": 1,
"CAT_PARENT": 981,
"MEDIA_ID": 390933,
"GENRE": "Happy",
"MEDIA_PKEY": "838644",
"COMPOSER": null,
"PLAYER": null,
"CATMEDIA_NAME": "*Happy*",
"FTID": null,
"VIEW_ID": 43,
"POSITION": 51399,
"ITEMCODE": null,
"CAT_ID": 982,
"PRIORITY": 80,
"CKEY": 757447,
"CATMEDIA_RANK": 3,
"BILLINGTYPE_ID": 1,
"CAT_NAME": "POP",
"KEYWORDS": null,
"LONG_DESCRIPTION": null,
"SHORT_DESCRIPTION": null,
"TYPE_ID": 74,
"ARTIST_GENDER": null,
* "PERFORMER": "Mario Pacchioli",*
"MAPPINGS": "1_43_982_POP_981_51399_5",
"SHORTCODE": null,
"CATMEDIA_CDATE": "2014-01-12T15:12:27.000Z",
"LANG_ID": 1
},
"_explanation": {
"value": 10.960511,
"description": "max of:",
"details": [
{
"value": 10.960511,
"description": "weight(DISPLAY_NAME:happy^6.0
in 23025) [PerFieldSimilarity], result of:",
"details": [
{
"value": 10.960511,
"description": "fieldWeight in 23025,
product of:",
"details": [
{
"value": 1,
"description": "tf(freq=1.0),
with freq of:",
"details": [
{
"value": 1,
"description":
"termFreq=1.0"
}
]
},
{
"value": 10.960511,
"description": "idf(docFreq=58,
maxDocs=1249243)"
},
{
"value": 1,
"description":
"fieldNorm(doc=23025)"
}
]
}
]
}
]
}
}
2)
"_id": "10194",
* "_score": 10.699952,*
"_source": {
"DISPLAY_NAME": "Be *Happy*",
"PRICE": 1.5,
"CHANNEL_ID": 1,
"CAT_PARENT": 557,
"MEDIA_ID": 10194,
"GENRE": "Be Happy",
"MEDIA_PKEY": "534570",
"COMPOSER": null,
"PLAYER": null,
"CATMEDIA_NAME": "Be Happy",
"FTID": null,
"VIEW_ID": 241,
"POSITION": 6733,
"ITEMCODE": "33271",
"CAT_ID": 558,
"PRIORITY": 100,
"CKEY": 528380,
"CATMEDIA_RANK": 3,
"BILLINGTYPE_ID": 1,
"CAT_NAME": "POP",
"KEYWORDS": null,
"LONG_DESCRIPTION": null,
"SHORT_DESCRIPTION": null,
"TYPE_ID": 76,
"ARTIST_GENDER": null,
* "PERFORMER": "Mary J. Blige",*
"MAPPINGS": "1_241_558_POP_557_6733_1.5",
"SHORTCODE": "0012139471",
"CATMEDIA_CDATE": "2014-01-26T20:04:46.000Z",
"LANG_ID": 1
},
"_explanation": {
"value": 10.699952,
"description": "max of:",
"details": [
{
"value": 10.699952,
"description": "weight(DISPLAY_NAME:happy^6.0
in 9092) [PerFieldSimilarity], result of:",
"details": [
{
"value": 10.699952,
"description": "fieldWeight in 9092,
product of:",
"details": [
{
"value": 1,
"description": "tf(freq=1.0),
with freq of:",
"details": [
{
"value": 1,
"description":
"termFreq=1.0"
}
]
},
{
"value": 10.699952,
"description": "idf(docFreq=80,
maxDocs=1321663)"
},
{
"value": 1,
"description":
"fieldNorm(doc=9092)"
}
]
}
]
}
]
}
},
3)
* "_score": 10.699952,*
"_source": {
"DISPLAY_NAME": "*Happy*",
"PRICE": 1.5,
"CHANNEL_ID": 1,
"CAT_PARENT": 557,
"MEDIA_ID": 8615,
"GENRE": "Happy",
"MEDIA_PKEY": "533022",
"COMPOSER": null,
"PLAYER": null,
"CATMEDIA_NAME": "Happy",
"FTID": null,
"VIEW_ID": 241,
"POSITION": 5685,
"ITEMCODE": "11927",
"CAT_ID": 558,
"PRIORITY": 100,
"CKEY": 526838,
"CATMEDIA_RANK": 3,
"BILLINGTYPE_ID": 1,
"CAT_NAME": "POP",
"KEYWORDS": null,
"LONG_DESCRIPTION": null,
"SHORT_DESCRIPTION": null,
"TYPE_ID": 76,
"ARTIST_GENDER": null,
* "PERFORMER": "Ashanti",*
"MAPPINGS": "1_241_558_POP_557_5685_1.5",
"SHORTCODE": "0012139036",
"CATMEDIA_CDATE": "2014-01-26T20:03:44.000Z",
"LANG_ID": 1
},
"_explanation": {
"value": 10.699952,
"description": "max of:",
"details": [
{
"value": 10.699952,
"description": "weight(DISPLAY_NAME:happy^6.0
in 11167) [PerFieldSimilarity], result of:",
"details": [
{
"value": 10.699952,
"description": "fieldWeight in 11167,
product of:",
"details": [
{
"value": 1,
"description": "tf(freq=1.0),
with freq of:",
"details": [
{
"value": 1,
"description":
"termFreq=1.0"
}
]
},
{
"value": 10.699952,
"description": "idf(docFreq=80,
maxDocs=1321663)"
},
{
"value": 1,
"description":
"fieldNorm(doc=11167)"
}
]
}
]
}
]
}
},
May i know how could the #2 and #3 yield the same scoring values even it
have different text value for both. Also how i could reverse the #2 and #3
as what i want the result returned is based on relevancy thus i assume that
it should
return in this order.
1)Happy
2)Happy
3)Be Happy
Thanks.
On Wed, Apr 2, 2014 at 6:28 PM, chee hoo lum <[email protected]> wrote:
> Hi Binh,
>
> Great. Thanks for that.
>
>
> On Wed, Apr 2, 2014 at 12:05 AM, Binh Ly <[email protected]> wrote:
>
>> If you specify explain=true in your query, it will tell you in detail how
>> the score is computed:
>>
>> {
>> "explain": true,
>> "query": {}
>> }
>>
>> Some useful info:
>>
>>
>> http://lucene.apache.org/core/4_0_0/core/org/apache/lucene/search/similarities/TFIDFSimilarity.html
>>
>> http://jontai.me/blog/2012/10/lucene-scoring-and-elasticsearch-_all-field/
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "elasticsearch" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/elasticsearch/RXuuSlkDSyA/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/elasticsearch/523ccc24-90a5-4b1a-aca1-bd1018e041aa%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/523ccc24-90a5-4b1a-aca1-bd1018e041aa%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Regards,
>
> Chee Hoo
>
--
Regards,
Chee Hoo
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGS0%2Bg_Dd5miHxXAuQg0_mnRNCKp4hnzuUpRbsJFq3xPMfYZ%2Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.