Comments (12)
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.
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.
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.
@geoionescu Thanks for trying this build, please let us know if you encounter any issues!
from search-highlighter.
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.
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.
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.
Strange... Did you update the version numbers in all sub project as well?
from search-highlighter.
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.
I need to dig into this a bit more... I'll try to find some time this evening
from search-highlighter.
Hello Guillaume,
thank you!
Will appreciate any pointers.
George.
from search-highlighter.
@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)
- elasticsearch 2.0 support HOT 9
- Notice: Lucene UnifiedHighlighter HOT 1
- Highlighting Not Honoring Slop HOT 12
- Weird highlighting behaviour HOT 1
- Builds for ES5 HOT 2
- html encoder
- plugin install for ES 5.1.2 HOT 2
- match_phrase not highlighting when stopwords removed HOT 3
- regression: hunspell filter does not highlight correctly in 5.x HOT 2
- string_index_out_of_bounds_exception HOT 2
- 5.3 HOT 1
- 1.7 branch, and Java 1.8 HOT 3
- parse error: Invalid \uXXXX\uXXXX surrogate pair escape HOT 2
- Does the plugin work with version 6.x HOT 1
- Support for ElasticSearch 5.6.2 HOT 3
- Elasticsearch Keyword not getting highlighted HOT 8
- How to install from source? HOT 3
- Upgrade to Elasticsearch 7.16.2
- Can I use this highlighter to highlight intervals query result?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from search-highlighter.