Open mhsankar opened 5 years ago
q=query('name:(hadi ali)')
Thanks
i explain this query with site server in your page.
i saw fields
are empty.
how can set fields
in q=query()
?
SELECT * FROM myindex WHERE q=query('hadi ali', fields='name,name2^10')
how to write nested query for example "select * from myindex where q=query("hadi ali', fields="nested(field.id),nested(field.name"))
Explain of SELECT * FROM myindex WHERE q=query('hadi ali', fields='name,name2^10') Returns fields as [] which is not expected. i am using es 6.4.2. Does it work in later version?
Note: default_field works
branch master:
{
"from": 0,
"size": 1000,
"query": {
"bool": {
"filter": [
{
"bool": {
"must": [
{
"query_string": {
"query": "hadi ali",
"fields": [
"name^1.0",
"name2^10.0"
],
"type": "best_fields",
"default_operator": "or",
"max_determinized_states": 10000,
"enable_position_increments": true,
"fuzziness": "AUTO",
"fuzzy_prefix_length": 0,
"fuzzy_max_expansions": 50,
"phrase_slop": 0,
"escape": false,
"auto_generate_synonyms_phrase_query": true,
"fuzzy_transpositions": true,
"boost": 1
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
}
}
Hi I have a problem when i search for example
q=query('name:hadi')
it work very good. but when i searchq=query('name: hadi ali')
it search in all fieldhadi
orali
if so i want to searchhadi
orali
inname
field. how can solve it?