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

Exec: matchphrase_impl alt. #9

Open
markpapadakis opened this issue Aug 1, 2017 · 0 comments
Open

Exec: matchphrase_impl alt. #9

markpapadakis opened this issue Aug 1, 2017 · 0 comments
Assignees

Comments

@markpapadakis
Copy link
Member

In compile()'s third pass (or elsewhere where appropriate), we need to consider matchphrase_impl exec nodes and if the phrase size is say [3, 16], replace it with an alternative which first checks if all decoders seek() return true, and then materialises hits for all of them, as opposed to what we do now, where we seek() and materialize() in the same loop. This way, if we have a long phrase, and say the last phrase's word doesn't match the document, we wouldn't materialise all previous phrase words.

Most phrases are 2-3 terms long though, so for now this is not something worth pursuing, although it should be trivial to implement.

We would just need to remember to account for that in codeblocks where we check for matchphrase_impl.

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

No branches or pull requests

1 participant