Skip to content

Conversation

@sirrenberg
Copy link
Collaborator

No description provided.

src/main.cpp Outdated
std::make_unique<scoring::BM25>(engine->getDocumentCount(), engine->getAvgDocumentLength());
} else if (scoring_choice == "tf-idf") {
score_func = std::make_unique<scoring::TfIdf>(engine->getDocumentCount());
if (algorithm_choice == "vector") {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that should be `vector-tfidf´, right?

src/test.cpp Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to keep this test file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,263 @@
#include "vector_engine.hpp"
#include "./index/hnsw/hnsw_alg.hpp"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use absolute path if possible

#include <sys/types.h>
#include <cstdint>
#include <string>
#include "../../fts_engine.hpp"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use absolute include path

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#include <vector>

#include "../../documents/document_iterator.hpp"
#include "../../fts_engine.hpp"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use absolute include path

src/test.cpp Outdated
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a test file in the src folder? This does belong in the test folder doesn't it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMakeLists.txt Outdated
src/algorithms/vector/vector_engine_tfidf.hpp
src/algorithms/vector/vector_engine.hpp
src/algorithms/vector/index/vector_lib.hpp
src/algorithms/vector/index/hnsw/hnsw_alg.cpp
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .cpp file should not be part of FTS_HEADERS

}

if (did % 10000 == 0) {
std::cout << did << "\n";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the benchmarking I think it'd make sense to remove all the prints from the build

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Only if the index was loaded from disk, instead of being built again, a text is printed now.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting fails for this file

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants