Skip to content

Commit

Permalink
Rename boolean field. (#9688)
Browse files Browse the repository at this point in the history
  • Loading branch information
sima-zhu committed Mar 30, 2020
1 parent 7e3b7ea commit eeb1cae
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ private static SuggestRequest createSuggestRequest(String searchText, String sug

if (suggestOptions != null) {
suggestRequest.setFilter(suggestOptions.getFilter())
.setUseFuzzyMatching(suggestOptions.isUseFuzzyMatching())
.setUseFuzzyMatching(suggestOptions.useFuzzyMatching())
.setHighlightPostTag(suggestOptions.getHighlightPostTag())
.setHighlightPreTag(suggestOptions.getHighlightPreTag())
.setMinimumCoverage(suggestOptions.getMinimumCoverage())
Expand Down Expand Up @@ -700,7 +700,7 @@ private static AutocompleteRequest createAutoCompleteRequest(String searchText,

if (autocompleteOptions != null) {
autoCompleteRequest.setFilter(autocompleteOptions.getFilter())
.setUseFuzzyMatching(autocompleteOptions.isUseFuzzyMatching())
.setUseFuzzyMatching(autocompleteOptions.useFuzzyMatching())
.setHighlightPostTag(autocompleteOptions.getHighlightPostTag())
.setHighlightPreTag(autocompleteOptions.getHighlightPreTag())
.setMinimumCoverage(autocompleteOptions.getMinimumCoverage())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ public Mono<SimpleResponse<SuggestDocumentsResult>> suggestGetWithRestResponseAs
}
Boolean useFuzzyMatching = null;
if (suggestOptions != null) {
useFuzzyMatching = suggestOptions.isUseFuzzyMatching();
useFuzzyMatching = suggestOptions.useFuzzyMatching();
}
String highlightPostTag = null;
if (suggestOptions != null) {
Expand Down Expand Up @@ -571,7 +571,7 @@ public Mono<SimpleResponse<AutocompleteResult>> autocompleteGetWithRestResponseA
}
Boolean useFuzzyMatching = null;
if (autocompleteOptions != null) {
useFuzzyMatching = autocompleteOptions.isUseFuzzyMatching();
useFuzzyMatching = autocompleteOptions.useFuzzyMatching();
}
String highlightPostTag = null;
if (autocompleteOptions != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public AutocompleteOptions setFilter(String filter) {
*
* @return the useFuzzyMatching value.
*/
public Boolean isUseFuzzyMatching() {
public Boolean useFuzzyMatching() {
return this.useFuzzyMatching;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public AutocompleteRequest setFilter(String filter) {
*
* @return the useFuzzyMatching value.
*/
public Boolean isUseFuzzyMatching() {
public Boolean useFuzzyMatching() {
return this.useFuzzyMatching;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public MagnitudeScoringParameters setBoostingRangeEnd(double boostingRangeEnd) {
*
* @return the shouldBoostBeyondRangeByConstant value.
*/
public Boolean isShouldBoostBeyondRangeByConstant() {
public Boolean shouldBoostBeyondRangeByConstant() {
return this.shouldBoostBeyondRangeByConstant;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public OcrSkill setDefaultLanguageCode(OcrSkillLanguage defaultLanguageCode) {
*
* @return the shouldDetectOrientation value.
*/
public Boolean isShouldDetectOrientation() {
public Boolean shouldDetectOrientation() {
return this.shouldDetectOrientation;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public SuggestOptions setFilter(String filter) {
*
* @return the useFuzzyMatching value.
*/
public Boolean isUseFuzzyMatching() {
public Boolean useFuzzyMatching() {
return this.useFuzzyMatching;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public SuggestRequest setFilter(String filter) {
*
* @return the useFuzzyMatching value.
*/
public Boolean isUseFuzzyMatching() {
public Boolean useFuzzyMatching() {
return this.useFuzzyMatching;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public final class WordDelimiterTokenFilter extends TokenFilter {
*
* @return the generateWordParts value.
*/
public Boolean isGenerateWordParts() {
public Boolean generateWordParts() {
return this.generateWordParts;
}

Expand All @@ -124,7 +124,7 @@ public WordDelimiterTokenFilter setGenerateWordParts(Boolean generateWordParts)
*
* @return the generateNumberParts value.
*/
public Boolean isGenerateNumberParts() {
public Boolean generateNumberParts() {
return this.generateNumberParts;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void ensureSelectLeavesOtherPropertiesUnchanged() {
assertEquals(suggestOptions.getOrderBy(), ensuredSuggestOptions.getOrderBy());
assertEquals(suggestOptions.getSearchFields(), ensuredSuggestOptions.getSearchFields());
assertEquals(suggestOptions.getTop(), ensuredSuggestOptions.getTop());
assertEquals(suggestOptions.isUseFuzzyMatching(), ensuredSuggestOptions.isUseFuzzyMatching());
assertEquals(suggestOptions.useFuzzyMatching(), ensuredSuggestOptions.useFuzzyMatching());

}

Expand Down
32 changes: 32 additions & 0 deletions sdk/search/azure-search-documents/swagger/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,4 +366,36 @@ directive:
return $
.replace(/(\@Fluent)/g, "$1\n\@JsonSerialize(using = CustomPatternAnalyzerSerializer\.class)\n\@JsonDeserialize(using = CustomPatternAnalyzerDeserializer\.class)")
.replace(/(import com\.azure\.core\.annotation\.Fluent\;)/g, "$1\nimport com.azure.search.documents.implementation.util.CustomPatternAnalyzerDeserializer;\nimport com.azure.search.documents.implementation.util.CustomPatternAnalyzerSerializer;\nimport com.fasterxml.jackson.databind.annotation.JsonDeserialize;\nimport com.fasterxml.jackson.databind.annotation.JsonSerialize;")
# Changed the boolean field name
- from:
- MagnitudeScoringParameters.java
where: $
transform: >-
return $
.replace(/public Boolean isShouldBoostBeyondRangeByConstant\(\) \{/g, "public Boolean shouldBoostBeyondRangeByConstant() {")
- from:
- SuggestOptions.java
- AutocompleteOptions.java
- AutocompleteRequest.java
- SuggestRequest.java
where: $
transform: >-
return $
.replace(/public Boolean isUseFuzzyMatching\(\) \{/g, "public Boolean useFuzzyMatching() {")
- from:
- WordDelimiterTokenFilter.java
where: $
transform: >-
return $
.replace(/public Boolean isGenerate(.*)\(\) \{/g, "public Boolean generate$1() {")
- from:
- OcrSkill.java
where: $
transform: >-
return $
.replace(/public Boolean isShouldDetectOrientation\(\) \{/g, "public Boolean shouldDetectOrientation() {")
```

0 comments on commit eeb1cae

Please sign in to comment.