Nested commontermsquery with bool Search

  • I'm trying to improve my search query to effectively work with stop words.
    Here is the nested query I'm trying to work with, but this results in not so proper search results.

I need help with

  1. Is this query valid , nesting common inside bool.

  2. If common has to be used seperately how to match 'must' with multiple fields

    • Need to match directly with some fields like language
    • Need to work with stop words for title field

{
"query" : {
"bool" : {
"must" : [
{
"bool" : {
"should" : [
{
"common" : {
"title" : {
"query" : "nandini",
"disable_coord" : true,
"high_freq_operator" : "OR",
"low_freq_operator" : "OR",
"cutoff_frequency" : 0.01,
"boost" : 1.0
}
}
},
{
"common" : {
"personsFullNames" : {
"query" : "nandini",
"disable_coord" : true,
"high_freq_operator" : "OR",
"low_freq_operator" : "OR",
"cutoff_frequency" : 0.01,
"boost" : 1.0
}
}
}
],
"disable_coord" : false,
"adjust_pure_negative" : true,
"boost" : 1.0
}
},
{
"terms" : {
"language" : [
"telugu"
],
"boost" : 1.0
}
}
],
"filter" : [
{
"range" : {
"expirationDate" : {
"from" : 1529935802013,
"to" : null,
"include_lower" : true,
"include_upper" : true,
"boost" : 1.0
}
}
}
],
"disable_coord" : false,
"adjust_pure_negative" : true,
"boost" : 1.0
}
}
}

Hi Team,

Please let me know if I'm missing more detail.

Thank you,
SatyaRaj

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.