[ https://issues.apache.org/jira/browse/SOLR-758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12801314#action_12801314 ]
David Smiley commented on SOLR-758: ----------------------------------- If the use-case is unrestricted Lucene syntax w/ dismax then Enhanced Dismax is the way to go. What I'm shooting for in this issue is a more extensible query parser. E-Dismax is cool but it doesn't look particularly extensible. For example, in an app I support, I use this patch to do several things: 1. check if appears to be using fancy Lucene syntax and if so then treat as such.. but with dismax of course on non-fielded clauses via SOLR-756 2. If one clause then rewrite query to: clause *clause*^0.5 -- i.e. search for clause and also include partial matches. For a small index I have this is fine but I can use n-gram some day if I need to. 3. If multiple clauses then rewrite query to: clauseA clauseB clauseC clauseC*^0.5 (clauseC is last clause). What I'm hoping for is for Solr to offer better query parsing infrastructure so that I can implement my parsing needs by re-using/plugging into as much as already exists as possible. Committing SOLR-756 is one step there... but then there's some useful capabilty in DismaxQParser like boost queries, boost functions, q.alt. min-should-match is relatively re-usable since it stands alone. > Enhance DisMaxQParserPlugin to support full-Solr syntax and to support > alternate escaping strategies. > ----------------------------------------------------------------------------------------------------- > > Key: SOLR-758 > URL: https://issues.apache.org/jira/browse/SOLR-758 > Project: Solr > Issue Type: Improvement > Components: search > Affects Versions: 1.3 > Reporter: David Smiley > Fix For: 1.5 > > Attachments: AdvancedQParserPlugin.java, AdvancedQParserPlugin.java, > DisMaxQParserPlugin.java, DisMaxQParserPlugin.java, UserQParser.java, > UserQParser.java, UserQParser.java-umlauts.patch > > > The DisMaxQParserPlugin has a variety of nice features; chief among them is > that is uses the DisjunctionMaxQueryParser. However it imposes limitations > on the syntax. > I've enhanced the DisMax QParser plugin to use a pluggable query string > re-writer (via subclass extension) instead of hard-coding the logic currently > embedded within it (i.e. the escape nearly everything logic). Additionally, > I've made this QParser have a notion of a "simple" syntax (the default) or > non-simple in which case some of the logic in this QParser doesn't occur > because it's irrelevant (phrase boosting and min-should-max in particular). > As part of my work I significantly moved the code around to make it clearer > and more extensible. I also chose to rename it to suggest it's role as a > parser for user queries. > Attachment to follow... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.