I'm playing around with a poor man's classifier using a boolean query that 
checks various term or phrase clauses. It currently has a 
minimum_should_match of 3 which I think means documents will only be 
returned if 3+ of my 10 clauses have matches.  Is there a way to also limit 
it to documents that have a minimum match frequency? Like return documents 
that have 50+ matches across the 10 clauses within the document. 

{
  "query": {
    "bool": {

      "should": [
                  { "match": { "nugget_classify": "geographic" }},
                  { "match": { "nugget_classify": "spatial" }},
                  { "match": { "nugget_classify": "esri " }},
                  { "match": { "nugget_classify": "ArcGIS " }},
                  { "match": { "nugget_classify": "ArcGISOnline " }},
                  { "match": { "nugget_classify": "PostGIS " }},
                  { "match": { "nugget_classify": "leaflet" }},
                  { "match_phrase": { "nugget": "geographic information" }},
                  { "match_phrase": { "nugget": "web map" }},
                  { "match_phrase": { "nugget": "web mapping" }}

            ],
            "minimum_should_match" : "3"
    }
  },
  "highlight" : {
      "pre_tags" : ["**"],
      "post_tags" : ["**"],
      "fields" : {
          "nugget" : {"fragment_size" : 50, "number_of_fragments" : 3}

          }
    },
    "fields" : ["name"]
}

-- 
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/d48b0d99-3637-4a90-b874-e4c1ee1182d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to