Boosting slows down query


(invaderZYM) #1

Hello there, this is a very novice question but I'm trying to understand how
boosting certain elements in a document works.

I started with this query,

{"from" : 0,"size" : 6,"fields" : ["_id"],"sort" : {"_score":
"desc","vendor.name.stored": "asc","item_name.stored": "asc"},"query" :
{"filtered" : {"query" : {"query_string" : {"fields" : ["_all"],"query" :
"Calprotectin", "default_operator" : "AND" }},"filter" : {"and" : [{"query"
: {"query_string" : {"fields" : ["targeted_countries"],"query" : "All US"}}}
]}}}}

then i needed to boost certain elements in the document more than the others
so I did this

{"from" : 0,"size" : 60,"fields" : ["_id"],"sort" : {"_score":
"desc","vendor.name.stored": "asc","item_name.stored": "asc"},"query" :
{"filtered" : {"query" : {"query_string" : {"fields" :
["item_name^4","vendor^4","id_plus_name","category_name^3","targeted_countries","vendor_search_name^4","Additional
Product Information^0.5","Ask A Scientist^0.5","Buy Now
URL^0.5","Concentration^0.5","Product
Line^0.5","Quantity^0.5","URL^0.5","Activity^1","Form^1","Immunogen^1","Isotype^1","Keywords^1","Matrix^1","Molecular
Weight^1","Pore Size^1","Purity^1","References^1","Regulatory
Status^1","Specifications/Features^1","Speed^1","Target/Molecule
Descriptor^1","Time^1","Description^2","Domain/Region/Terminus^2","Method^2","NCBI
Gene Aliases^2","Primary / Secondary^2","Source/Expression
System^2","Target/Molecule
Synonym^2","Applications^3","Category^3","Conjugate/Tag/Label^3","Detection^3","Gene
Name^3","Host^3","Modification Type^3","Modifications^3","Molecule
Name^3","Reactivity^3","Species^3","Target^3","Type^3","Accession
Number^4","Brand/Trademark^4","Catalog
Number^4","Clone^4","entrezGeneID^4","Gene Symbol^4","Original Item
Name^4","Sequence^4","SwissProtID^4","option.Antibody
Products^4","option.Antibody Ranges &
Modifications^1","option.Applications^4","option.Conjugate^3","option.Gene
ID^4","option.Host Species^3","option.Isotype^3","option.Primary /
Secondary^2","option.Reactivity^4","option.Search^1","option.Target
Name^1","option.Type^4"],"query" : "Calprotectin", "default_operator" :
"AND" }},"filter" : {"and" : [{"query" : {"query_string" : {"fields" :
["targeted_countries"],"query" : "All US"}}} ]}}}}

the query slowed down considerably, am I doing this correctly? Is there a
way to speed it up? Any help is much appreciated


(system) #2