[
https://issues.apache.org/jira/browse/LUCENE-1570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12688486#action_12688486
]
Mark Miller commented on LUCENE-1570:
-------------------------------------
I've wanted this in the past. Its certainly possible, but I am not sure how
easy it would be to do with the current queryparser (been a long time since I
have been there). There appears to be a new parser on the horizon though, and
it sounds as if it will allow these types of additions much more elegantly (the
current queryparser does not use a syntax tree representation, and its kind of
hairy to build on).
If I remember right, the current QueryParser simply attaches semantic actions
to grammar production rules - difficult to read, edit, and maintain - has not
been super friendly for building upon.
Also if I remember right, I think this new parser will use abstract syntax
trees, which lets you split up syntax and semantics, and also keep things a bit
more modular - you can do things like have pluggable syntax reader that feeds
pluggable query output writer. At least for the basics - it sounds like these
guys have made something pretty cool, but I have not seen the code yet and have
only a brief memory of its description.
Point being, it can be done, I think its useful, but it might make sense to see
how much easier it can be done with this new parser.
> QueryParser.setAllowLeadingWildcard could provide finer granularity
> -------------------------------------------------------------------
>
> Key: LUCENE-1570
> URL: https://issues.apache.org/jira/browse/LUCENE-1570
> Project: Lucene - Java
> Issue Type: Improvement
> Components: QueryParser
> Affects Versions: 2.4.1
> Reporter: Jonathan Watt
>
> It's great that Lucene now allows support for leading wildcards to be turned
> on. However, leading wildcard searches are more expensive, so it would be
> useful to be able to turn it on only for certain search fields. I'm
> specifically thinking of wiki searches where it may be too expensive to allow
> leading wildcards in the 'content:' field, but it would still be very useful
> to be able to selectively turn on support for 'path:' and perhaps other
> fields such as 'title:'. Would this be possible?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]