-
Notifications
You must be signed in to change notification settings - Fork 13
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
visitor: add texkey search #127
Conversation
MJedr
commented
Apr 23, 2020
- INSPIR-3412
@@ -842,7 +842,7 @@ def visit_value(self, node, fieldnames=None): | |||
given_field_query = generate_match_query(fieldnames, node.value, with_operator_and=True) | |||
texkey_query = '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need this now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that given_field_query = generate_match_query(fieldnames, node.value, with_operator_and=True)
is necessary here
@@ -842,7 +842,7 @@ def visit_value(self, node, fieldnames=None): | |||
given_field_query = generate_match_query(fieldnames, node.value, with_operator_and=True) | |||
texkey_query = '' | |||
if self.TEXKEY_REGEX.match(colon_value): | |||
texkey_query = self._generate_term_query('texkeys.raw', colon_value, boost=2.0) | |||
return generate_match_query('texkeys.raw', colon_value, with_operator_and=False) | |||
_all_field_query = generate_match_query('_all', colon_value, with_operator_and=True) | |||
query = wrap_queries_in_bool_clauses_if_more_than_one( | |||
[given_field_query, texkey_query, _all_field_query], use_must_clause=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here neither
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here the only thing which I can delete is texkey_query
from line 848
* INSPIR-3412