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

Limit the number of context mappings #32741

Closed
jimczi opened this issue Aug 9, 2018 · 16 comments · Fixed by #38675
Closed

Limit the number of context mappings #32741

jimczi opened this issue Aug 9, 2018 · 16 comments · Fixed by #38675
Labels
>enhancement good first issue low hanging fruit help wanted adoptme :Search/Search Search-related issues that do not fall into other categories

Comments

@jimczi
Copy link
Contributor

jimczi commented Aug 9, 2018

The context suggester doesn't limit the number of context mappings they can define. Besides the fact that a bug was found when more than 29 contexts are defined we should limit this functionality to a reasonable number.

@jimczi jimczi added >enhancement :Search/Search Search-related issues that do not fall into other categories labels Aug 9, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

@dsheasley
Copy link

As a first timer I would like to give this one a try. What do you think would be a reasonable number to limit it to? Maybe between 5 and 10?

@jimczi
Copy link
Contributor Author

jimczi commented Jan 9, 2019

Maybe between 5 and 10?

We can discuss the final value on the pr but that's a good start.

@djptek
Copy link
Contributor

djptek commented Jan 17, 2019

Hi @dsheasley are you still working on this?

@rjpruitt16
Copy link

I would like to work on this if @dsheasley has abandon it. I am having a hard time compiling the project in intellij though. When I run gradle in the command line, it build successfully. When I try setup configuration to run gradle in intellij, it fails. Does someone have steps for compiling and running the project in intellij, or is there a better setup.

@mayya-sharipova
Copy link
Contributor

@rjpruitt16 please go ahead with working on this issue. We haven't heard from @dsheasley for a month.
About setting up Intellij, have you followed the steps here?

@rjpruitt16
Copy link

Thank you for the help @mayya-sharipova. I am still having problems running the repo on intellij. I fork the repository, and ran ./gradlew idea, and the build fail. How do you work on elasticsearch? What is the path of least resistance?

TommyWind added a commit to TommyWind/elasticsearch that referenced this issue Feb 10, 2019
* Enforcing a maximum number of completion contexts as reqested in elastic#32741
* Closes elastic#32741
@TommyWind
Copy link
Contributor

Sorry I started working on this last night and already opened a PR in #38675 , hope it's ok :)

@rjpruitt16
Copy link

@TommyWind how are you working on the project? What is your workflow?

@TommyWind
Copy link
Contributor

@rjpruitt16

I'm not sure what exactly you're looking for here but a few tips that would've helped me get set up quickly :)

  • I had to use a new version of Idea, 2018.3.4 to make things work.
  • Run ./gradlew idea before loading the code in Idea the first time. If you've already opened the project in Idea before maybe just clean up the folder using git clean -dfx.
  • You need to have JAVA_HOME variables setup correctly to run the build. On OSX this works for me (you'll have to adjust for the paths of our JDK 11 and JDK 8 installations):
export JAVA8_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/
export JAVA11_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home/
export JAVA_HOME=$JAVA11_HOME

hope it helps :)

@mayya-sharipova
Copy link
Contributor

mayya-sharipova commented Feb 11, 2019

@TommyWind thanks for suggestions
@rjpruitt16 what does ./gradlew idea fail with? Have you set up proper java versions as @TommyWind suggested?

@rjpruitt16
Copy link

rjpruitt16 commented Feb 11, 2019

screen shot 2019-02-11 at 3 28 03 pm

org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':benchmarks'.
at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:79)
at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:72)
at org.gradle.configuration.project.LifecycleProjectEvaluator.access$600(LifecycleProjectEvaluator.java:53)

@alpar-t
Copy link
Contributor

alpar-t commented Feb 12, 2019

@rjpruitt16 make sure your java home paths are correct we run bin/jrunscript to check the jdk version.

@rjpruitt16
Copy link

@atorok If you look in the picture, my java home is set. I follow the path to make sure the folder was there and ran helloworld application successfully. I am not sure how else to trouble shoot my issue.

@TommyWind
Copy link
Contributor

@rjpruitt16 it looks like your jrunscript is not pointing at the Java11 version of that executable. The easiest way to force a fix for that is probably to simply prepend "${JAVA11_HOME}/bin" to your $PATH.

@mayya-sharipova
Copy link
Contributor

@rjpruitt16 Sometimes starting all over again helps. git clean -xdf, ./gradlew idea, invalidate cache in Intellij , import project in Intellij

jimczi pushed a commit that referenced this issue Feb 18, 2019
This change adds a limit to the number of completion contexts that a completion field can define.

Closes #32741
jimczi pushed a commit to jimczi/elasticsearch that referenced this issue Feb 18, 2019
This change adds a limit to the number of completion contexts that a completion field can define.

Closes elastic#32741
jimczi added a commit that referenced this issue Feb 19, 2019
This change adds a limit to the number of completion contexts that a completion field can define.

Closes #32741
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement good first issue low hanging fruit help wanted adoptme :Search/Search Search-related issues that do not fall into other categories
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants