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

command line tool support for vector search #175

Merged
merged 5 commits into from
Nov 21, 2023

Conversation

Thejas-bhat
Copy link
Member

@Thejas-bhat Thejas-bhat commented Nov 3, 2023

  • also includes fixing the docvalues parsing and fields tool parsing given the new index sections format.

Copy link
Member

@abhinavdangeti abhinavdangeti left a comment

Choose a reason for hiding this comment

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

@Thejas-bhat it'd be ideal if you could re-use methods rather than re-implement them again for the command line tooling. It'd be double work for us to maintain this otherwise. Is there any code here that's common with access methods elsewhere?

cmd/zap/cmd/docvalue.go Outdated Show resolved Hide resolved
cmd/zap/cmd/fields.go Outdated Show resolved Hide resolved
Copy link
Member

@abhinavdangeti abhinavdangeti left a comment

Choose a reason for hiding this comment

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

@Thejas-bhat any thing else that needs look into in light of my earlier comment?

faiss.MetricLp: "lp distance",
faiss.MetricCanberra: "canberra distance",
faiss.MetricBrayCurtis: "bray curtis distance",
faiss.MetricJensenShannon: "jensen shannon distance",
Copy link
Member

Choose a reason for hiding this comment

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

We don't support any of these other than first 2, so no need to accommodate these.

Copy link
Member

Choose a reason for hiding this comment

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

This has been marked as resolved but not actually resolved.

Copy link
Member Author

Choose a reason for hiding this comment

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

sorry about that, i think i forgot to save the files before the push :p

const (
sectionInvertedTextIndex = iota
sectionFaissVectorIndex
)
Copy link
Member

Choose a reason for hiding this comment

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

We don't need to redeclare these here, use zap.sectionInvertedTextIndex and zap.sectionFaissVectorIndex

Copy link
Member Author

Choose a reason for hiding this comment

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

so i'd have to export those two vars in section.go. i've made the change, please let me know that's fine.

Copy link
Member

Choose a reason for hiding this comment

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

Ya export away.

@Thejas-bhat
Copy link
Member Author

@Thejas-bhat any thing else that needs look into in light of my earlier comment?

i've reused a bunch of functions, however the diff shows a lot of change mainly because i moved the content of the docvalue command to a separate function.

@@ -28,6 +28,7 @@ import (
const termNotEncoded = 0

// exploreCmd represents the explore command
// no big changes over here as well.
Copy link
Member

Choose a reason for hiding this comment

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

Lose this line.

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

cmd/zap/cmd/footer.go Outdated Show resolved Hide resolved
cmd/zap/cmd/vector.go Outdated Show resolved Hide resolved
faiss.MetricLp: "lp distance",
faiss.MetricCanberra: "canberra distance",
faiss.MetricBrayCurtis: "bray curtis distance",
faiss.MetricJensenShannon: "jensen shannon distance",
Copy link
Member

Choose a reason for hiding this comment

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

This has been marked as resolved but not actually resolved.

@abhinavdangeti abhinavdangeti merged commit dd26ea1 into blevesearch:master Nov 21, 2023
6 checks passed
moshaad7 pushed a commit that referenced this pull request Sep 12, 2024
* command line support for vector section - initial commit

* docvalue tool fixes

* bug fix: docvalue cmd returning nil result

* refactoring fields cmd tool

* code cleanup
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.

3 participants