o19s / elasticsearch-learning-to-rank

Plugin to integrate Learning to Rank (aka machine learning for better relevance) with Elasticsearch
http://opensourceconnections.com/blog/2017/02/14/elasticsearch-learning-to-rank/
Apache License 2.0
1.48k stars 370 forks source link

There is no release for elasticsearch 7.17.9 #458

Closed Ali-Zare71 closed 1 year ago

Ali-Zare71 commented 1 year ago

Can you build the project for elasticsearch version 7.17.9 that is an important version?

ajinkya commented 1 year ago

Having the same issue, trying to build from source, will update here if successful.

ajinkya commented 1 year ago

I managed to compile this using the following steps on a AWS EC2 instance with Ubuntu 20.04 using oracle jdk. openjdk-17 build failed with a bunch of errors.

Below are the steps that I executed to build this, the resulting zip file was installed successfully in ES 7.17.9.
Haven't checked if all the features are working fully yet, will do that over the next few days.

P.S.: Not a Java dev, so please improve/fix any step that might be wrong below, but these worked for me:

sudo apt-get update
sudo apt install oracle-java17-jdk oracle-java17-set-default

# Check if the correct Java version is installed
java -version

# Get the path to java bin folder from the below command
sudo update-alternatives --config java

# Set JAVA_HOME path
export JAVA_HOME=/usr/lib/jvm/java-17-oracle

# Check if its set 
echo $JAVA_HOME

# Clone repo
gh repo clone Shibe/elasticsearch-learning-to-rank
cd elasticsearch-learning-to-rank/

# Switch to the 7x branch
git checkout origin/es_7_17_7
git pull

# change elasticsearchVersion = 7.17.7 to 7.17.9
sudo nano gradle.properties

# Start the build process... after compeletion the zip should be in ./build/distributions/ltr-1.5.8-es7.17.9.zip
./gradlew clean check

# install the plugin (your path for elasticsearch-plugin command might be different)
# note the file:/// prefix... had forgotten that while copy pasting the path
sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install -v file:///home/ubuntu/elasticsearch-learning-to-rank/build/distributions/ltr-1.5.8-es7.17.9.zip

# Restart ES
sudo systemctl stop elasticsearch.service
sudo systemctl start elasticsearch.service
sudo systemctl status elasticsearch.service

Output Zip from my build in case you want to try it out directly: https://github.com/ajinkya/es-ltr-7.17.9

ltr-1.5.8-es7.17.9.zip

nathancday commented 1 year ago

Finally got around to cutting a formal release for it: https://github.com/o19s/elasticsearch-learning-to-rank/releases/tag/v1.5.8-es7.17.9 Please take it for a spin and report bugs....