Skip to content

Nested query in nboost #91

@kapish5467

Description

@kapish5467

I am trying to run a nboost search query on nested data which is -
"description":{"type":"nested","properties":{"BRIEF_SUMMARY":{"type":"nested","properties":{"plain":{"type":"text","analyzer":"my_analyzer"}}}

I want to look for contents in "plain" field and I am running following python script for it-
response = requests.get(
url='http://localhost:8000/patents/_search',
json={
'nboost': {
'uhost': 'localhost',
'uport': 9200,
'query_path': 'body.query.nested.match.description.BRIEF_SUMMARY.plain',
'topk_path': 'body.size',
'default_topk': 10,
'topn': 200,
'choices_path': 'body.hits.hits',
'cvalues_path': '_source.description.BRIEF_SUMMARY.plain'
},
'size': 200,
'query':
{'nested':
{'path': 'description',
'query':
{'nested':
{'path':'description.BRIEF_SUMMARY',
'query':
{'match': { 'description.BRIEF_SUMMARY.plain':}}}}}}
}

)

But I end up with following error-
{'doc': 'Mapping key not found.', 'msg': "('match',)", 'type': 'KeyError'}

Is this kind of query handled by nboost ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions