Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search lambda: add "freeform" action #2087

Merged
merged 1 commit into from
Mar 9, 2021
Merged

Search lambda: add "freeform" action #2087

merged 1 commit into from
Mar 9, 2021

Conversation

nl0
Copy link
Member

@nl0 nl0 commented Mar 3, 2021

Description

Add "freeform" search action which passes the "body" param to elastic as is.

TODO

@nl0 nl0 requested review from sir-sigurd, fiskus and akarve March 3, 2021 16:56
@nl0
Copy link
Member Author

nl0 commented Mar 3, 2021

@sir-sigurd are these changes enough or am i missing smth?

lambdas/search/index.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Mar 3, 2021

Codecov Report

Merging #2087 (cba5762) into master (542514e) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2087      +/-   ##
==========================================
+ Coverage   46.11%   46.17%   +0.05%     
==========================================
  Files         410      410              
  Lines       19619    19636      +17     
  Branches     2284     2284              
==========================================
+ Hits         9048     9067      +19     
+ Misses       9581     9579       -2     
  Partials      990      990              
Flag Coverage Δ
api-python 89.36% <ø> (ø)
catalog 15.86% <ø> (ø)
lambda 92.72% <100.00%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lambdas/search/index.py 88.65% <100.00%> (+2.63%) ⬆️
lambdas/search/tests/test_search.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 542514e...cba5762. Read the comment docs.

@fiskus
Copy link
Member

fiskus commented Mar 3, 2021

Can you provide body example, please?

/search?index=_all&filter_path=hits&action=freeform&body={"query"%3A{"match"%3A{"message"%3A"instruments"}}} has 0 hits

@nl0
Copy link
Member Author

nl0 commented Mar 3, 2021

Can you provide body example, please?

/search?index=_all&filter_path=hits&action=freeform&body={"query"%3A{"match"%3A{"message"%3A"instruments"}}} has 0 hits

try {"query": { "match_all": {} } }

@fiskus fiskus mentioned this pull request Mar 3, 2021
4 tasks
@sir-sigurd sir-sigurd self-requested a review March 4, 2021 13:14
@nl0 nl0 force-pushed the search-lambda-freestyle branch 4 times, most recently from 9c5d846 to 4f84313 Compare March 9, 2021 13:50
@nl0 nl0 requested a review from sir-sigurd March 9, 2021 13:53
lambdas/search/tests/test_search.py Outdated Show resolved Hide resolved
lambdas/search/tests/test_search.py Outdated Show resolved Hide resolved
lambdas/search/tests/test_search.py Outdated Show resolved Hide resolved
@nl0 nl0 force-pushed the search-lambda-freestyle branch from 4f84313 to cba5762 Compare March 9, 2021 16:11
@nl0 nl0 merged commit 448e68e into master Mar 9, 2021
@nl0 nl0 deleted the search-lambda-freestyle branch March 9, 2021 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants