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

Cannot use all the fields we've in build in a ES query #608

Open
calixteman opened this issue Oct 21, 2019 · 1 comment
Open

Cannot use all the fields we've in build in a ES query #608

calixteman opened this issue Oct 21, 2019 · 1 comment

Comments

@calixteman
Copy link

For example:

curl -s -X POST https://buildhub.moz.tools/api/search -d '{"size": 5, "query": {"term": {"build.target": "x86_64-pc-mingw32"}}}'

doesn't return anything.

@bhearsum
Copy link
Contributor

I had a brief look at this and was hoping this would be as simple as:

diff --git a/buildhub/main/search.py b/buildhub/main/search.py
index a4fb60d..add77d6 100644
--- a/buildhub/main/search.py
+++ b/buildhub/main/search.py
@@ -23,16 +23,17 @@ logger = logging.getLogger("buildhub")
 )
 def es_retry(callable, *args, **kwargs):
     return callable(*args, **kwargs)
 
 
 class _Build(InnerDoc):
     id = Keyword()
     date = Date()
+    target = Keyword()
 
 
 class _Source(InnerDoc):
     product = Keyword()
     repository = Keyword()
     tree = Keyword()
     revision = Keyword()

...but that doesn't appear to be the case. Even after injesting new events with this code, I still can't query by build.target.

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

No branches or pull requests

2 participants