lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrien Grand (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-5336) Add a simple QueryParser to parse human-entered queries.
Date Tue, 12 Nov 2013 13:42:18 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-5336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13820091#comment-13820091
] 

Adrien Grand commented on LUCENE-5336:
--------------------------------------

Javadocs and code seem to disagree on the default operator: javadocs say {{The default operator
is AND if no other operator is specified.}} while the code has {{private BooleanClause.Occur
defaultOperator = BooleanClause.Occur.SHOULD;}}?

Otherwise I agree with Mike that this new query parser is awesome. I will certainly use it!

> Add a simple QueryParser to parse human-entered queries.
> --------------------------------------------------------
>
>                 Key: LUCENE-5336
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5336
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Jack Conradson
>         Attachments: LUCENE-5336.patch, LUCENE-5336.patch
>
>
> I would like to add a new simple QueryParser to Lucene that is designed to parse human-entered
queries.  This parser will operate on an entire entered query using a specified single field
or a set of weighted fields (using term boost).
> All features/operations in this parser can be enabled or disabled depending on what is
necessary for the user.  A default operator may be specified as either 'MUST' representing
'and' or 'SHOULD' representing 'or.'  The features/operations that this parser will include
are the following:
> * AND specified as '+'
> * OR specified as '|'
> * NOT specified as '-'
> * PHRASE surrounded by double quotes
> * PREFIX specified as '*'
> * PRECEDENCE surrounded by '(' and ')'
> * WHITESPACE specified as ' ' '\n' '\r' and '\t' will cause the default operator to be
used
> * ESCAPE specified as '\' will allow operators to be used in terms
> The key differences between this parser and other existing parsers will be the following:
> * No exceptions will be thrown, and errors in syntax will be ignored.  The parser will
do a best-effort interpretation of any query entered.
> * It uses minimal syntax to express queries.  All available operators are single characters
or pairs of single characters.
> * The parser is hand-written and in a single Java file making it easy to modify.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message