castorini / anserini

Anserini is a Lucene toolkit for reproducible information retrieval research
http://anserini.io/
Apache License 2.0
1.03k stars 458 forks source link

Error: Could not find or load main class io.anserini.search.SearchMsmarco #2092

Closed m-hoseyny closed 1 year ago

m-hoseyny commented 1 year ago

Hello,

I built Anserini from scratch to re-produce the docTTTTT result; however, in the retrieve step (using SearchMsmarco command), I got an error which is:

Error: Could not find or load main class io.anserini.search.SearchMsmarco
Caused by: java.lang.ClassNotFoundException: io.anserini.search.SearchMsmarco

I follow these steps: https://github.com/castorini/docTTTTTquery#reproducing-ms-marco-passage-ranking-results-with-anserini

System Configuration:

Java
openjdk 11.0.15 2022-04-19
OpenJDK Runtime Environment (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1)
OpenJDK 64-Bit Server VM (build 11.0.15+10-Ubuntu-0ubuntu0.20.04.1, mixed mode, sharing)

Maven:
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 11.0.15, vendor: Private Build, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_CA, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-109-generic", arch: "amd64", family: "unix"

It would be great if you could help me to solve this problem.

Thanks

m-hoseyny commented 1 year ago

I found the solution.

Due to this issue #1458, the SearchMsmarco has been deprecated. So, the command should be changed to:

sh anserini/target/appassembler/bin/SearchCollection \
  -index lucene-index-msmarco-passage-expanded \
  -topics queries.dev.small.tsv \
  -topicreader TsvInt \
  -output run.msmarco-passage-expanded.dev.small.txt \
  -format msmarco \
  -hits 1000 -threads 8 -bm25

Sorry for the duplicated issue. However, it would be great if you put some examples for migrating from SearchMsmarco to SearchCollection