Skip to content

Conversation

alexksikes
Copy link
Contributor

Relates to #10217

This PR is against the query-refactoring branch.


private ScriptService.ScriptType templateType;
Copy link

Choose a reason for hiding this comment

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

+1 on removing these as essentially they are encapsulated in the Template above.

@MaineC
Copy link

MaineC commented Sep 1, 2015

Left some minor comments. Looks pretty good to me already.

@alexksikes
Copy link
Contributor Author

@MaineC thanks for the review. I have addressed the comments.

@@ -35,14 +42,8 @@

/** Template to fill. */
private Template template;
Copy link
Member

Choose a reason for hiding this comment

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

template could be made final I think

@javanna
Copy link
Member

javanna commented Sep 2, 2015

left a few comments, looks good though!

@alexksikes
Copy link
Contributor Author

@javanna @MaineC Thanks for the review. I addressed the comments.

@alexksikes alexksikes force-pushed the feature/query-refactoring-template branch from db005cf to 9461fb1 Compare September 8, 2015 20:37
if (!templateBase.equals(EmptyQueryBuilder.PROTOTYPE)) {
assertEquals(templateBase.toQuery(createShardContext()).getClass().getName(), query.getClass().getName());
}
}
Copy link
Member

Choose a reason for hiding this comment

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

I checked out the branch, testToQuery fails consistently. You have to override setFinalBoost in TemplateQueryBuilder and make it a no-op like we did in WrapperQueryBuilder. Also this conditional in doAssertLuceneQuery shouldn't be needed anymore. Replace with a simple equality check between query and the result ot templateBase#toQuery. The problems you previously encountered around boost should be solved now.

@javanna
Copy link
Member

javanna commented Sep 9, 2015

I did a final round of review, change looks good, there is a test problem though. LGTM once tests are fixed.

Relates to elastic#10217

This PR is against the query-refactoring branch.

Closes elastic#13253
@alexksikes alexksikes force-pushed the feature/query-refactoring-template branch from 9461fb1 to c2ccb21 Compare September 9, 2015 12:21
@alexksikes alexksikes merged commit c2ccb21 into elastic:feature/query-refactoring Sep 9, 2015
@alexksikes alexksikes deleted the feature/query-refactoring-template branch September 9, 2015 12:29
@alexksikes alexksikes removed the review label Sep 14, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants