You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2014/09/16 16:46:27 UTC
[2/2] git commit: refs/heads/0.4 - Fix QueryParser regression with
underscores in field names
Fix QueryParser regression with underscores in field names
During the StringIterator rewrite, I broke parsing of field names with
underscores. Fixes LUCY-269.
TODO: Add a test case.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/c4687f39
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/c4687f39
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/c4687f39
Branch: refs/heads/0.4
Commit: c4687f393ded5ebb70dca334ab8a404fea59a63c
Parents: 10f7a66
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Tue Sep 16 16:37:40 2014 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Tue Sep 16 16:45:59 2014 +0200
----------------------------------------------------------------------
core/Lucy/Search/QueryParser/QueryLexer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/c4687f39/core/Lucy/Search/QueryParser/QueryLexer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/QueryParser/QueryLexer.c b/core/Lucy/Search/QueryParser/QueryLexer.c
index f070fb9..6c7c866 100644
--- a/core/Lucy/Search/QueryParser/QueryLexer.c
+++ b/core/Lucy/Search/QueryParser/QueryLexer.c
@@ -210,7 +210,7 @@ S_consume_field(StringIterator *iter) {
DECREF(temp);
return NULL;
}
- if (!(isalnum(code_point) || code_point != '_')) {
+ if (!(isalnum(code_point) || code_point == '_')) {
DECREF(temp);
return NULL;
}