Hi,
I trying to form a query_string query to query two fields as below :
1)Query DISPLAY_NAME field and PERFORMER field whether contain "we are
one" :
{
"explain" : true,
"from" : 0,
"size" : 10,
"query" : {
"query_string" : {
"fields" : [ "DISPLAY_NAME^6.0", "PERFORMER" ],
"query" : "\"we are one\"",
"use_dis_max" : true
}
}
}
Result returned one documents :
2)Query DISPLAY_NAME field whether contain "we are one" :
{
"explain" : true,
"from" : 0,
"size" : 10,
"query" : {
"query_string" : {
"fields" : [ "DISPLAY_NAME^6.0" ],
"query" : "\"we are one\"",
"use_dis_max" : true
}
}
}
Result returned 5 documents :
3) The mapping :
*4)The index settings : *
I wanted to know why it will returned different result because in the index
5 documents contain * "we are one"* in the *DISPLAY_NAME *field however
the first query 1) returned one document only.
How i could solve this problem ? Also noticed from the explain section
seems like the boosting is not applied.
What i wanted to achieve here is when i search *"we are one" *it should
return all the documents that *DISPLAY_NAME *or *PERFORMER *contains the
search text and sorted BY DISPLAY_NAME then only PERFORMER.
eg :
-
DISPLAY_NAME : we are one
PERFORMER : we are one -
DISPLAY_NAME : we are one
PERFORMER : Jaclyn -
DISPLAY_NAME : we are one of the best
PERFORMER : Victor -
DISPLAY_NAME : James
PERFORMER : we are one -
DISPLAY_NAME : David
PERFORMER : we are one in the world
Thanks.
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2acdbee6-52e5-49ad-8491-efd9ed9617ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.