You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
When using the LuceneCheck with the following query f:"Foo Bar" I expect the check to return no error because this is (as far as I can tell) allowed in the lucene query language. I use the following code below to test this.
from .parserimportparserfrom .checkimportLuceneCheckfrom .treeimportSearchField, Phrasequery= (SearchField("f", Phrase('"Foo Bar"')))
check=LuceneCheck()
print(check.errors(query))
But against my expectations I get the following error.
['Unknown item type Phrase : "Foo Bar"']
After checking the check.py file, it appears to me that no check_phrase function is present in the LuceneCheck class which leads to the phrase object not being accepted. I'm not really sure if this is intended behavior or how to fix it but following code snippet might solve the problem
defcheck_phrase(self, item, parents):
ifnotitem.value.endswith('"') ornotitem.value.startswith('"'):
yield"Phrase value must start and end with double quote"
Any recommendations or ideas about how to fix it? Or am I doing something wrong?
The text was updated successfully, but these errors were encountered:
Hi,
When using the LuceneCheck with the following query
f:"Foo Bar"
I expect the check to return no error because this is (as far as I can tell) allowed in the lucene query language. I use the following code below to test this.But against my expectations I get the following error.
['Unknown item type Phrase : "Foo Bar"']
After checking the check.py file, it appears to me that no check_phrase function is present in the LuceneCheck class which leads to the phrase object not being accepted. I'm not really sure if this is intended behavior or how to fix it but following code snippet might solve the problem
Any recommendations or ideas about how to fix it? Or am I doing something wrong?
The text was updated successfully, but these errors were encountered: