OpenSearch icon indicating copy to clipboard operation
OpenSearch copied to clipboard

Set analyzer to regex query string search

Open yyyogev opened this issue 3 years ago • 29 comments

Description

Set default analyzer to query string search with regex

Issues Resolved

Resolves https://github.com/opensearch-project/OpenSearch/issues/3578

Check List

  • [x] New functionality includes testing.
    • [x] All tests pass
  • [ ] New functionality has been documented.
    • [ ] New functionality has javadoc added
  • [x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

yyyogev avatar Jul 21 '22 10:07 yyyogev

Gradle Check (Jenkins) Run Completed with:

  • RESULT: SUCCESS :white_check_mark:
  • URL: https://build.ci.opensearch.org/job/gradle-check/866/
  • CommitID: d2e6e08b1099e4bd6c5a586eb3334ef83d9e8372

github-actions[bot] avatar Jul 21 '22 10:07 github-actions[bot]

Refer to the issue associated with this PR, we discussed it all there

yyyogev avatar Jul 24 '22 07:07 yyyogev

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/940/
  • CommitID: 036029a3702f8e4bd5ab446d28f41d841afbf99e

github-actions[bot] avatar Jul 24 '22 08:07 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/941/
  • CommitID: 64e609866df835ec7e8794015e2b04945bf77624

github-actions[bot] avatar Jul 24 '22 09:07 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/942/
  • CommitID: f5351faf71e7ac1ec14883da3a86fdea729508f7

github-actions[bot] avatar Jul 24 '22 09:07 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/943/
  • CommitID: 04fb97ff2968312fd4a38027c0e70ef375f77dbe

github-actions[bot] avatar Jul 24 '22 09:07 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/944/
  • CommitID: b3a4cec3131b438149582f7b3d8d56b19689f546

github-actions[bot] avatar Jul 24 '22 10:07 github-actions[bot]

See below.

I am not familiar with this part of the code. Why does this work?

@dblock currently, when using regexp query, we only set the analyzer if it's forced (explicitly specify an analyzer in the search request). the reason is because of the wildcard queries ES introduced, but since wildcard queries are not being supported in OS, it's redundant now and only harm the regexp queries while searching for uppercase letters.

The change I made removes the condition to check if the force analyzer is specified and set the analyzer regardless - either the forced or by the currentFieldType

yyyogev avatar Jul 25 '22 13:07 yyyogev

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/953/
  • CommitID: 105f68d8ddc4b0ea9bf214678ebdbf5e19439684

github-actions[bot] avatar Jul 25 '22 13:07 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1008/
  • CommitID: f28e335233e622c974f4b4f70ae2d5e40d5181f2

github-actions[bot] avatar Jul 26 '22 19:07 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1013/
  • CommitID: f28e335233e622c974f4b4f70ae2d5e40d5181f2

github-actions[bot] avatar Jul 26 '22 22:07 github-actions[bot]

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1036/
  • CommitID: 930cbd8997d9660e882e674420729ca0cc53b1c9

github-actions[bot] avatar Jul 27 '22 10:07 github-actions[bot]

@reta @dblock I'm not sure why the gradle check is failing now.. can you take a look?

yyyogev avatar Jul 27 '22 10:07 yyyogev

@reta @dblock I'm not sure why the gradle check is failing now.. can you take a look?

@yyyogev seems to be issue(s) with build pipeline:

/var/jenkins/workspace/gradle-check@tmp/durable-ea4df87d/script.sh: 41: docker-compose: not found

@peterzhuamazon any hints?

reta avatar Jul 27 '22 11:07 reta

@reta @dblock I'm not sure why the gradle check is failing now.. can you take a look?

@yyyogev seems to be issue(s) with build pipeline:

/var/jenkins/workspace/gradle-check@tmp/durable-ea4df87d/script.sh: 41: docker-compose: not found

@peterzhuamazon any hints?

Hi sorry for the late reply guys. We had a new deployment in Jenkins and missed some lines.

And we have a fix now to be reviewed.

Please be patient on this as it requires a new deployment.

Sorry and thanks. Peter

peterzhuamazon avatar Jul 27 '22 13:07 peterzhuamazon

@reta @dblock I'm not sure why the gradle check is failing now.. can you take a look?

@yyyogev seems to be issue(s) with build pipeline:

/var/jenkins/workspace/gradle-check@tmp/durable-ea4df87d/script.sh: 41: docker-compose: not found

@peterzhuamazon any hints?

Hi sorry for the late reply guys. We had a new deployment in Jenkins and missed some lines.

And we have a fix now to be reviewed.

Please be patient on this as it requires a new deployment.

Sorry and thanks. Peter

fixed now.

peterzhuamazon avatar Jul 27 '22 20:07 peterzhuamazon

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1050/
  • CommitID: 930cbd8997d9660e882e674420729ca0cc53b1c9

github-actions[bot] avatar Jul 27 '22 20:07 github-actions[bot]

@yyyogev could you please fix spotless complaints? :-) thank you.

reta avatar Jul 29 '22 17:07 reta

I'm pretty sure I have already.. I'll merge from master again

yyyogev avatar Jul 31 '22 08:07 yyyogev

Gradle Check (Jenkins) Run Completed with:

  • RESULT: FAILURE :x:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1144/
  • CommitID: 5d402871b139a9015cbbe7d0fee46dfcbffacb2a

github-actions[bot] avatar Jul 31 '22 09:07 github-actions[bot]

@reta jenkins pipline still fails with the Ownership is not configured for this Run error message

yyyogev avatar Jul 31 '22 09:07 yyyogev

@peterzhuamazon can you please validate the pipeline is working as expected?

AmiStrn avatar Jul 31 '22 16:07 AmiStrn

@reta jenkins pipline still fails with the Ownership is not configured for this Run error message

I see

> A build operation failed.
      Java heap space
   > Java heap spac

... restarting

reta avatar Aug 01 '22 01:08 reta

Gradle Check (Jenkins) Run Completed with:

  • RESULT: SUCCESS :white_check_mark:
  • URL: https://build.ci.opensearch.org/job/gradle-check/1149/
  • CommitID: 5d402871b139a9015cbbe7d0fee46dfcbffacb2a

github-actions[bot] avatar Aug 01 '22 01:08 github-actions[bot]

Codecov Report

Merging #3967 (5d40287) into main (740f75d) will increase coverage by 0.08%. The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main    #3967      +/-   ##
============================================
+ Coverage     70.50%   70.59%   +0.08%     
- Complexity    56848    56906      +58     
============================================
  Files          4583     4583              
  Lines        273931   273932       +1     
  Branches      40158    40156       -2     
============================================
+ Hits         193146   193388     +242     
+ Misses        64561    64304     -257     
- Partials      16224    16240      +16     
Impacted Files Coverage Δ
...pensearch/index/search/QueryStringQueryParser.java 70.47% <100.00%> (+0.87%) :arrow_up:
...cluster/coordination/PendingClusterStateStats.java 20.00% <0.00%> (-48.00%) :arrow_down:
...adcast/BroadcastShardOperationFailedException.java 55.55% <0.00%> (-44.45%) :arrow_down:
.../admin/cluster/reroute/ClusterRerouteResponse.java 60.00% <0.00%> (-40.00%) :arrow_down:
...luster/routing/allocation/RoutingExplanations.java 62.06% <0.00%> (-37.94%) :arrow_down:
...arch/search/aggregations/pipeline/LinearModel.java 23.07% <0.00%> (-34.62%) :arrow_down:
...r/src/main/java/org/opensearch/http/HttpUtils.java 33.33% <0.00%> (-33.34%) :arrow_down:
...min/cluster/snapshots/get/GetSnapshotsRequest.java 52.63% <0.00%> (-31.58%) :arrow_down:
...cluster/routing/allocation/RerouteExplanation.java 70.00% <0.00%> (-30.00%) :arrow_down:
...opensearch/index/reindex/BulkByScrollResponse.java 48.38% <0.00%> (-28.23%) :arrow_down:
... and 464 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

codecov-commenter avatar Aug 01 '22 01:08 codecov-commenter

@yyyogev Looks like this passed the tests 🎸 @reta @dblock can you review the changes made?

AmiStrn avatar Aug 01 '22 06:08 AmiStrn

@dblock - just pinging as this is 2 days since the first approval. can you please check this as well?

AmiStrn avatar Aug 03 '22 11:08 AmiStrn

@reta is there anyone else who can review this one?

AmiStrn avatar Aug 08 '22 04:08 AmiStrn

@reta is there anyone else who can review this one?

@nknize @andrross could you please take a look? the change seems to be reasonable

reta avatar Aug 08 '22 13:08 reta

Weekly ping :/

AmiStrn avatar Aug 14 '22 17:08 AmiStrn