Skip to content

Conversation

@javanna
Copy link
Member

@javanna javanna commented Aug 17, 2015

Some of our next queries to refactor rely on some state taken from the cluster state. That is why we need to mock cluster service and inject an index to it, the index that we simulate the execution of the queries against. The best would be to have multiple indices actually, but that would make our setup a lot more complicated, especially given that IndexQueryParseService is still per index. We might be able to improve that in the future though, for now this is as good as it gets.

@javanna javanna added >test Issues or PRs that are addressing/adding tests review labels Aug 17, 2015
@javanna javanna force-pushed the test/index_injection branch from d7abd28 to 6daf17a Compare August 17, 2015 14:30
@alexksikes
Copy link
Contributor

This looks good. I would also add a method to get the name of the index so we can use it in say Indices Query.

@javanna javanna force-pushed the test/index_injection branch from 6daf17a to da19cfb Compare August 17, 2015 16:36
@javanna
Copy link
Member Author

javanna commented Aug 17, 2015

I would also add a method to get the name of the index so we can use it in say Indices Query.

Makes sense, I had forgotten about that, I pushed an update.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an idea, should the index maybe have the same version as the one we are randomly picking in the settings? Maybe not, I think I introduced it there to test both strict and non-strict mapping checks, but maybe we don't need that here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure we can do that, I didn't remember we were picking a version randomly to be honest, will look into that ;)

@cbuescher
Copy link
Member

Also did a quick look, only one suggestion, otherwise LGTM

@javanna
Copy link
Member Author

javanna commented Aug 17, 2015

@cbuescher I pushed a new commit, hopefully sorted out index settings now. please have a look.

@cbuescher
Copy link
Member

LGTM

1 similar comment
@alexksikes
Copy link
Contributor

LGTM

…se#init

Some of our next queries to refactor rely on some state taken from the cluster state. That is why we need to mock cluster service and inject an index to it, the index that we simulate the execution of the queries against. The best would be to have multiple indices actually, but that would make our setup a lot more complicated, especially given that IndexQueryParseService is still per index. We might be able to improve that in the future though, for now this is as good as it gets.
@javanna javanna force-pushed the test/index_injection branch from a74e433 to 260a929 Compare August 18, 2015 07:15
@javanna javanna merged commit 260a929 into elastic:feature/query-refactoring Aug 18, 2015
@javanna javanna removed the review label Aug 18, 2015
@clintongormley clintongormley added :Search/Search Search-related issues that do not fall into other categories and removed :Query Refactoring labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Search/Search Search-related issues that do not fall into other categories >test Issues or PRs that are addressing/adding tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants