You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Dave Brosius (JIRA)" <ji...@apache.org> on 2008/04/18 05:27:21 UTC
[jira] Created: (JCR-1544) [PATCH] fix a NOT b queries
[PATCH] fix a NOT b queries
-----------------------------
Key: JCR-1544
URL: https://issues.apache.org/jira/browse/JCR-1544
Project: Jackrabbit
Issue Type: Bug
Components: jackrabbit-core
Affects Versions: core 1.4.2
Reporter: Dave Brosius
Priority: Minor
Fix For: core 1.4.3
Attachments: fix_not_queries.patch
the query a NOT b doesn't work. Problem was LuceneQueryBuilder was lower casing the NOT which causes the javacc code to fail.
In addition, code just did a blind replaceAll on the string "NOT" and "AND", which is wrong for things like 'BAND'.
Patch changes code to look for "\\band\\b" -> AND and "\\not\\" -> NOT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (JCR-1544) [PATCH] fix a NOT b queries
Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Brosius updated JCR-1544:
------------------------------
Description:
the query a NOT b doesn't work. Problem was LuceneQueryBuilder was lower casing the NOT which causes the javacc code to fail.
In addition, code just did a blind replaceAll on the string "NOT" and "AND", which is wrong for things like 'BAND'.
Patch changes code to look for "\\band\\b" -> AND and "\\bnot\\b" -> NOT
was:
the query a NOT b doesn't work. Problem was LuceneQueryBuilder was lower casing the NOT which causes the javacc code to fail.
In addition, code just did a blind replaceAll on the string "NOT" and "AND", which is wrong for things like 'BAND'.
Patch changes code to look for "\\band\\b" -> AND and "\\not\\" -> NOT
> [PATCH] fix a NOT b queries
> -----------------------------
>
> Key: JCR-1544
> URL: https://issues.apache.org/jira/browse/JCR-1544
> Project: Jackrabbit
> Issue Type: Bug
> Components: jackrabbit-core
> Affects Versions: core 1.4.2
> Reporter: Dave Brosius
> Priority: Minor
> Fix For: core 1.4.3
>
> Attachments: fix_not_queries.patch
>
>
> the query a NOT b doesn't work. Problem was LuceneQueryBuilder was lower casing the NOT which causes the javacc code to fail.
> In addition, code just did a blind replaceAll on the string "NOT" and "AND", which is wrong for things like 'BAND'.
> Patch changes code to look for "\\band\\b" -> AND and "\\bnot\\b" -> NOT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (JCR-1544) [PATCH] fix a NOT b queries
Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12591450#action_12591450 ]
Dave Brosius commented on JCR-1544:
-----------------------------------
Ok, fair enough. Is the query syntax of contains documented some where then? It seemed like it was exactly lucene's syntax except for 'not'. For instance a !b works as expected.
> [PATCH] fix a NOT b queries
> -----------------------------
>
> Key: JCR-1544
> URL: https://issues.apache.org/jira/browse/JCR-1544
> Project: Jackrabbit
> Issue Type: Improvement
> Components: jackrabbit-core
> Reporter: Dave Brosius
> Priority: Minor
> Attachments: fix_not_queries.patch
>
>
> the query a NOT b doesn't work. Problem was LuceneQueryBuilder was lower casing the NOT which causes the javacc code to fail.
> In addition, code just did a blind replaceAll on the string "NOT" and "AND", which is wrong for things like 'BAND'.
> Patch changes code to look for "\\band\\b" -> AND and "\\bnot\\b" -> NOT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (JCR-1544) [PATCH] fix a NOT b queries
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting updated JCR-1544:
-------------------------------
Issue Type: Improvement (was: Bug)
Classifying as an improvement. AFAIUI full text matching is case-insensitive, so BAND being turned to Band won't matter that much.
> [PATCH] fix a NOT b queries
> -----------------------------
>
> Key: JCR-1544
> URL: https://issues.apache.org/jira/browse/JCR-1544
> Project: Jackrabbit
> Issue Type: Improvement
> Components: jackrabbit-core
> Reporter: Dave Brosius
> Priority: Minor
> Attachments: fix_not_queries.patch
>
>
> the query a NOT b doesn't work. Problem was LuceneQueryBuilder was lower casing the NOT which causes the javacc code to fail.
> In addition, code just did a blind replaceAll on the string "NOT" and "AND", which is wrong for things like 'BAND'.
> Patch changes code to look for "\\band\\b" -> AND and "\\bnot\\b" -> NOT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (JCR-1544) [PATCH] fix a NOT b queries
Posted by "Dave Brosius (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Brosius updated JCR-1544:
------------------------------
Attachment: fix_not_queries.patch
> [PATCH] fix a NOT b queries
> -----------------------------
>
> Key: JCR-1544
> URL: https://issues.apache.org/jira/browse/JCR-1544
> Project: Jackrabbit
> Issue Type: Bug
> Components: jackrabbit-core
> Affects Versions: core 1.4.2
> Reporter: Dave Brosius
> Priority: Minor
> Fix For: core 1.4.3
>
> Attachments: fix_not_queries.patch
>
>
> the query a NOT b doesn't work. Problem was LuceneQueryBuilder was lower casing the NOT which causes the javacc code to fail.
> In addition, code just did a blind replaceAll on the string "NOT" and "AND", which is wrong for things like 'BAND'.
> Patch changes code to look for "\\band\\b" -> AND and "\\not\\" -> NOT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (JCR-1544) [PATCH] fix a NOT b queries
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting updated JCR-1544:
-------------------------------
Affects Version/s: (was: core 1.4.2)
Fix Version/s: (was: core 1.4.3)
I think the "a NOT b" query is converted to "a not b" on purpose _not_ to trigger the Lucene NOT behaviour. The full text query syntax in jcr:contains() is _not_ the Lucene query syntax.
Thus the lowercasing should probably be kept unless someone comes up with a more elegant solution. Adding the \b boundaries seems like a good idea though.
> [PATCH] fix a NOT b queries
> -----------------------------
>
> Key: JCR-1544
> URL: https://issues.apache.org/jira/browse/JCR-1544
> Project: Jackrabbit
> Issue Type: Bug
> Components: jackrabbit-core
> Reporter: Dave Brosius
> Priority: Minor
> Attachments: fix_not_queries.patch
>
>
> the query a NOT b doesn't work. Problem was LuceneQueryBuilder was lower casing the NOT which causes the javacc code to fail.
> In addition, code just did a blind replaceAll on the string "NOT" and "AND", which is wrong for things like 'BAND'.
> Patch changes code to look for "\\band\\b" -> AND and "\\bnot\\b" -> NOT
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.