Hi @Christian_Dahlqvist,
We're firing 2 queries using _msearch
This is our 1st query, index = 500 records:
> GET index5/_search
> {
> "query":{
> "bool":{
> "filter":[
> {"term":{"key":{"value":"searchterm","boost":1.0}}}
> ],
> "adjust_pure_negative":true,
> "boost":1.0
> }
> }
> }
This is our 2nd query, index = 5 mil records:
> GET index1,index2,index3/_search
> {
> "from": 0,
> "size": 10,
> "query": {
> "bool": {
> "must": [
> {
> "multi_match": {
> "query": "searchterm",
> "fields": [
> "field1^1.0",
> "field2^1.0",
> "field3^1.0",
> "field4^1.0",
> "field5^1.0",
> "field6^1.0",
> "field7^1.0",
> "field8^1.0",
> "field9^1.0",
> "field10^1.0",
> "field11^1.0",
> "field12^1.0",
> "field13^1.0",
> "field14^1.0",
> "field15^1.0",
> "field16^1.0",
> "field17^2.0",
> "field18^1.0",
> "field19^1.0",
> "field20^1.0",
> "field21^1.0",
> "field22^1.0",
> "field23^1.0",
> "field24^1.0",
> "field25^1.0",
> "field26^1.0",
> "field27^1.0",
> "field28^1.0",
> "field29^1.0",
> "field30^1.0",
> "field31^1.0",
> "field32^1.0",
> "field33^1.0",
> "field34^1.0",
> "field35^1.0",
> "field36^1.0"
> ],
> "type": "cross_fields",
> "operator": "AND",
> "slop": 0,
> "prefix_length": 0,
> "max_expansions": 50,
> "zero_terms_query": "NONE",
> "auto_generate_synonyms_phrase_query": true,
> "fuzzy_transpositions": true,
> "boost": 1.0
> }
> }
> ],
> "filter": [
> {
> "term": {
> "field40": {
> "value": "value1",
> "boost": 1.0
> }
> }
> }
> ],
> "should": [
> {
> "term": {
> "field41": {
> "value": "true",
> "boost": 2.0
> }
> }
> },
> {
> "term": {
> "fiel42": {
> "value": "true",
> "boost": 2.0
> }
> }
> },
> {
> "term": {
> "field43": {
> "value": "true",
> "boost": 2.0
> }
> }
> },
> {
> "term": {
> "field44": {
> "value": "true",
> "boost": 3.0
> }
> }
> }
> ],
> "adjust_pure_negative": true,
> "boost": 1.0
> }
> },
> "indices_boost": [
> {
> "index1": 3.0
> }
> ],
> "highlight": {
> "pre_tags": [
> "\u003cb\u003e"
> ],
> "post_tags": [
> "\u003c/b\u003e"
> ],
> "fragment_size": 0,
> "fields": {
> "field1": {},
> "field2": {},
> "field3": {},
> "field4": {},
> "field5": {},
> "field6": {},
> "field7": {},
> "field8": {},
> "field9": {},
> "field10": {},
> "field11": {},
> "field12": {},
> "field13": {},
> "field14": {},
> "field15": {},
> "field16": {},
> "field17": {},
> "field18": {},
> "field19": {},
> "field20": {},
> "field21": {},
> "field22": {},
> "field23": {},
> "field24": {},
> "field25": {},
> "field26": {},
> "field27": {},
> "field28": {},
> "field29": {},
> "field30": {},
> "field31": {},
> "field32": {},
> "field33": {},
> "field34": {},
> "field35": {}
> }
> }
> }
90% of our queries are like the above one.
We need responsetimes with an average of less than 10ms (which is the same as the current search solution which we are replacing).
Marten