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

[DRAFT] Fix ./gradlew assemble and auto Intellij project setup #321

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions gradle/knn.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ def highDimDataSets = [
]


// def luceneDir = (String) findProperty("external.lucene.repo") + '/lucene'
def luceneDir = "/l/trunk/lucene"
// def luceneVersion = (String) findProperty("lucene.version")
def luceneVersion = "11.0.0"
def luceneDir = (String) findProperty("external.lucene.repo") + '/lucene'
//def luceneDir = "/l/trunk/lucene"
def luceneVersion = (String) findProperty("lucene.version")
//def luceneVersion = "11.0.0"
def luceneFT = fileTree(dir: luceneDir, include: "**/*$luceneVersion-SNAPSHOT.jar")

task compileKnn (type: JavaCompile) {
Expand Down
5 changes: 4 additions & 1 deletion src/main/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ plugins {
}

sourceSets {
main.java.srcDirs = ['knn', 'perf']
main.java {
srcDir '.'
include 'perf', 'knn'
}
}

def luceneDir = (String) findProperty("external.lucene.repo") + '/lucene'
Expand Down
3 changes: 2 additions & 1 deletion src/main/knn/KnnIndexerMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public String toString() {
'}';
}

public static void main(String[] args) throws IOException {
public static void main(String[] args) throws Exception {
KnnIndexerMain inputs = new KnnIndexerMain();

try {
Expand Down Expand Up @@ -102,6 +102,7 @@ public static void main(String[] args) throws IOException {

new KnnIndexer(inputs.docVectorsPath, inputs.indexPath,
KnnGraphTester.getCodec(inputs.maxConn, inputs.beamWidth, exec, numMergeWorker, quantize, quantizeBits, quantizeCompress),
numMergeThread,
inputs.vectorEncoding,
inputs.dimension, inputs.similarityFunction, inputs.numDocs, inputs.docStartIndex, inputs.quiet,
inputs.parentJoin, inputs.parentJoinMetaFile).createIndex();
Expand Down