Giter Club home page Giter Club logo

Comments (12)

geoionescu avatar geoionescu commented on September 13, 2024 1

Hello David,
Hello Guillaume,

thank you for your efforts!

So far so good: I'm able to compile (using mvn clean package) the plugin and load it into elasticsearch 5.1.1 using https://gerrit.wikimedia.org/r/#/c/322891/2

The next step is doing some testing and report issues, if any.

Thanks again!
George.

PS: I hope I haven't caused too much trouble: I know it can be pretty hard to keep up with different library versions, but all I wanted to achieve is being able to use your (awesome) plugin with the latest (official) version of ES.

Since this setup is working for me so far, I consider this issue closed.

from search-highlighter.

nomoa avatar nomoa commented on September 13, 2024

There are some efforts being done to migrate the plugin to elastic5, unfortunately we do not use github for our review process and the code is not visible here yet.
The code I'm working on is visible here: https://gerrit.wikimedia.org/r/#/c/322891/ and compiles against elastic 5.0.1. I'll ask my colleagues if it's OK to push this code to a 5x branch here so you could fetch it and test it.

from search-highlighter.

geoionescu avatar geoionescu commented on September 13, 2024

Hello David,

there's no need (at least for me) to create a 5x branch: I'll try the one from gerrit.

Thanks a bunch!
George.

from search-highlighter.

nomoa avatar nomoa commented on September 13, 2024

@geoionescu Thanks for trying this build, please let us know if you encounter any issues!

from search-highlighter.

geoionescu avatar geoionescu commented on September 13, 2024

Hello David,

unfortunately, I wasn't able to make it work :(
Here's what I did:

Cloned the repository and patched to Change 322891:

git clone https://gerrit.wikimedia.org/r/search/highlighter
git fetch https://gerrit.wikimedia.org/r/search/highlighter refs/changes/91/322891/1
git checkout FETCH_HEAD

Modified pom.xml to reflect my setup:
<elasticsearch.version>5.1.1</elasticsearch.version> <lucene.version>6.3.0</lucene.version>

Opened a command prompt and issued
mvn clean package

The first error I encountered was related to the (now missing) getInitialState() method of Lucene's RunAutomaton class from \experimental-highlighter-lucene\src\main\java\org\wikimedia\highlighter\experimental\lucene\automaton\OffsetReturningRunAutomaton.java

I've replaced int p = getInitialState(); with int p=0; (line 31 in the above file)

See https://lucene.apache.org/core/6_3_0/core/org/apache/lucene/util/automaton/RunAutomaton.html

Rerun
mvn clean package
to hit the next error:

`
ERROR 0.00s | QueryFlattenerTest (suite) <<<

Throwable #1: java.lang.NoClassDefFoundError: com/carrotsearch/randomizedtesting/generators/RandomNumbers
at __randomizedtesting.SeedInfo.seed([17A81FBC22C252EA]:0)
at org.apache.lucene.util.TestUtil.nextInt(TestUtil.java:433)
at org.apache.lucene.index.RandomCodec.(RandomCodec.java:183)
at org.apache.lucene.util.TestRuleSetupAndRestoreClassEnv.before(TestRuleSetupAndRestoreClassEnv.java:196)`

I've decided to skip the tests and issued
mvn clean package -Dmaven.test.skip=true

just to be hit by the next error:

[ERROR] Failed to execute goal on project experimental-highlighter-elasticsearch-plugin: Could not resolve dependencies for project org.wikimedia.search.highlighter:experimental-highlighter-elasticsearch-plugin:jar:5.0.0-SNAPSHOT: Failure to find org.wikimedia.search.highlighter:experimental-highlighter-lucene:jar:tests:5.0.0-SNAPSHOT in https://oss.sonatype.org/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-nexus-snapshots has elapsed or updates are forced -> [Help 1]

Any ideas?

Thank you,
George.

from search-highlighter.

gehel avatar gehel commented on September 13, 2024

I've decided to skip the tests and issued
mvn clean package -Dmaven.test.skip=true

just to be hit by the next error:

[ERROR] Failed to execute goal on project experimental-highlighter-elasticsearch-plugin: Could not resolve dependencies for project org.wikimedia.search.highlighter:experimental-highlighter-elasticsearch-plugin:jar:5.0.0-SNAPSHOT: Failure to find org.wikimedia.search.highlighter:experimental-highlighter-lucene:jar:tests:5.0.0-SNAPSHOT in https://oss.sonatype.org/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of sonatype-nexus-snapshots has elapsed or updates are forced -> [Help 1]

There is a known issue with Maven reactor projects and test-jar dependencies. mvn clean install -Dmaven.test.skip=true (install instead of package). We should refactor the project structure to work around this issue.

from search-highlighter.

geoionescu avatar geoionescu commented on September 13, 2024

Hello Guillaume,

thanks for your reply.

I've tried to issue mvn clean install -Dmaven.test.skip=true as you suggested, just to hit the same error:

[ERROR] Failed to execute goal on project experimental-highlighter-elasticsearch-plugin: Could not resolve dependencies for project org.wikimedia.search.highlighter:experimental-highlighter-elasticsearch-plugin:jar:5.0.0-SNAPSHOT: Could not find artifact org.wikimedia.search.highlighter:experimental-highlighter-lucene:jar:tests:5.0.0-SNAPSHOT in sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :experimental-highlighter-elasticsearch-plugin

PS1: I'm running on Windows, if that matters for anything
PS2: I'm using maven v3.3.9, if that matters for anything
PS3: The command mvn clean package run on the master branch (e.g. using elasticsearch-2.4.1) is ok

Conclusion: I'm currently unable to build the plugin for elasticsearch-5.1.1/lucene-6.3.0 on my system, using the suggested patch from https://gerrit.wikimedia.org/r/#/c/322891/, although I can successfully create a working plugin with older elasticsearch-2.4.1 using master.

Any other suggestions?

Thank you,
George.

from search-highlighter.

gehel avatar gehel commented on September 13, 2024

Strange... Did you update the version numbers in all sub project as well?

from search-highlighter.

geoionescu avatar geoionescu commented on September 13, 2024

Hello Guillaume,

I've changed <elasticsearch.version> and <lucene.version> to reflect my setup in \pom.xml:
<elasticsearch.version>5.1.1</elasticsearch.version> <lucene.version>6.3.0</lucene.version>

Is there anything more I should change?
What do you mean by

Did you update the version numbers in all sub project as well

Thanks,
George.

from search-highlighter.

gehel avatar gehel commented on September 13, 2024

I need to dig into this a bit more... I'll try to find some time this evening

from search-highlighter.

geoionescu avatar geoionescu commented on September 13, 2024

Hello Guillaume,

thank you!
Will appreciate any pointers.

George.

from search-highlighter.

nomoa avatar nomoa commented on September 13, 2024

@geoionescu could you try a second PatchSet? see: https://gerrit.wikimedia.org/r/#/c/322891/2
I've upgraded the dependencies to match your needs.
The problem you encountered was due to a version mismatch between lucene and carrotsearch randomized-testing (I think). It's a bit of a pain to keep all these deps in line.

Thanks!

from search-highlighter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.