[jira] [Commented] (LUCENE-5410) Add fuzziness support to SimpleQueryParser
[ https://issues.apache.org/jira/browse/LUCENE-5410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13888748#comment-13888748 ] Michael McCandless commented on LUCENE-5410: +1 Add fuzziness support to SimpleQueryParser -- Key: LUCENE-5410 URL: https://issues.apache.org/jira/browse/LUCENE-5410 Project: Lucene - Core Issue Type: Improvement Components: core/queryparser Affects Versions: 4.7 Reporter: Lee Hinman Assignee: Robert Muir Priority: Minor Attachments: LUCENE-5410.patch, LUCENE-5410.patch, LUCENE-5410.patch, LUCENE-5410.patch Original Estimate: 168h Remaining Estimate: 168h It would be nice to add fuzzy query support to the {{SimpleQueryParser}} so that: {{foo~2}} generates a {{FuzzyQuery}} with an max edit distance of 2 and: {{foo bar~2}} generates a {{PhraseQuery}} with a slop of 2. -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-5410) Add fuzziness support to SimpleQueryParser
[ https://issues.apache.org/jira/browse/LUCENE-5410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=1307#comment-1307 ] ASF subversion and git services commented on LUCENE-5410: - Commit 1563558 from [~rcmuir] in branch 'dev/trunk' [ https://svn.apache.org/r1563558 ] LUCENE-5410: add fuzzy and near to SimpleQueryParser Add fuzziness support to SimpleQueryParser -- Key: LUCENE-5410 URL: https://issues.apache.org/jira/browse/LUCENE-5410 Project: Lucene - Core Issue Type: Improvement Components: core/queryparser Affects Versions: 4.7 Reporter: Lee Hinman Assignee: Robert Muir Priority: Minor Attachments: LUCENE-5410.patch, LUCENE-5410.patch, LUCENE-5410.patch, LUCENE-5410.patch Original Estimate: 168h Remaining Estimate: 168h It would be nice to add fuzzy query support to the {{SimpleQueryParser}} so that: {{foo~2}} generates a {{FuzzyQuery}} with an max edit distance of 2 and: {{foo bar~2}} generates a {{PhraseQuery}} with a slop of 2. -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-5410) Add fuzziness support to SimpleQueryParser
[ https://issues.apache.org/jira/browse/LUCENE-5410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=1313#comment-1313 ] ASF subversion and git services commented on LUCENE-5410: - Commit 1563562 from [~rcmuir] in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1563562 ] LUCENE-5410: add fuzzy and near to SimpleQueryParser Add fuzziness support to SimpleQueryParser -- Key: LUCENE-5410 URL: https://issues.apache.org/jira/browse/LUCENE-5410 Project: Lucene - Core Issue Type: Improvement Components: core/queryparser Affects Versions: 4.7 Reporter: Lee Hinman Assignee: Robert Muir Priority: Minor Fix For: 5.0, 4.7 Attachments: LUCENE-5410.patch, LUCENE-5410.patch, LUCENE-5410.patch, LUCENE-5410.patch Original Estimate: 168h Remaining Estimate: 168h It would be nice to add fuzzy query support to the {{SimpleQueryParser}} so that: {{foo~2}} generates a {{FuzzyQuery}} with an max edit distance of 2 and: {{foo bar~2}} generates a {{PhraseQuery}} with a slop of 2. -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-5410) Add fuzziness support to SimpleQueryParser
[ https://issues.apache.org/jira/browse/LUCENE-5410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13887895#comment-13887895 ] Robert Muir commented on LUCENE-5410: - This patch looks great! I'll do a detailed review now, but I really like the latest iteration. Thanks Lee! Add fuzziness support to SimpleQueryParser -- Key: LUCENE-5410 URL: https://issues.apache.org/jira/browse/LUCENE-5410 Project: Lucene - Core Issue Type: Improvement Components: core/queryparser Affects Versions: 4.7 Reporter: Lee Hinman Assignee: Robert Muir Priority: Minor Attachments: LUCENE-5410.patch, LUCENE-5410.patch, LUCENE-5410.patch Original Estimate: 168h Remaining Estimate: 168h It would be nice to add fuzzy query support to the {{SimpleQueryParser}} so that: {{foo~2}} generates a {{FuzzyQuery}} with an max edit distance of 2 and: {{foo bar~2}} generates a {{PhraseQuery}} with a slop of 2. -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-5410) Add fuzziness support to SimpleQueryParser
[ https://issues.apache.org/jira/browse/LUCENE-5410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13879868#comment-13879868 ] Upayavira commented on LUCENE-5410: --- If the point of this query parser is to support the sort of thing that users type into search boxes, are they likely to enter fuzzy or phrase slop searches? This seems unlikely to me, and seems to take a SimpleQueryParser away from being simple. I'd suggest that if that functionality is to be added, it should be added somewhere where it is under programmatic control, not user control, such as how the edismax query parser accepts additional request parameters. Thus ps=2 would set a phrase slop. fs=2 could set a value of 2 for fuzzy search also. This would seem more in keeping with the goal of a clean, simple query parser. Add fuzziness support to SimpleQueryParser -- Key: LUCENE-5410 URL: https://issues.apache.org/jira/browse/LUCENE-5410 Project: Lucene - Core Issue Type: Improvement Components: core/queryparser Affects Versions: 4.7 Reporter: Lee Hinman Priority: Minor Attachments: LUCENE-5410.patch Original Estimate: 168h Remaining Estimate: 168h It would be nice to add fuzzy query support to the {{SimpleQueryParser}} so that: {{foo~2}} generates a {{FuzzyQuery}} with an max edit distance of 2 and: {{foo bar~2}} generates a {{PhraseQuery}} with a slop of 2. -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-5410) Add fuzziness support to SimpleQueryParser
[ https://issues.apache.org/jira/browse/LUCENE-5410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13879952#comment-13879952 ] Robert Muir commented on LUCENE-5410: - Upayavira: I see your point, however one of the key advantages of this parser is the ability to selectively enable or disable any operator. The same arguments could be made for prefix queries or even the NOT operator (-), so it was added with that in mind (as well as to provide a way to do multiword synonyms: disable WHITESPACE). As far as setting a parameter to make every term fuzzy, I don't think thats a good idea. In such a case I really think you should do n-gram indexing :) Add fuzziness support to SimpleQueryParser -- Key: LUCENE-5410 URL: https://issues.apache.org/jira/browse/LUCENE-5410 Project: Lucene - Core Issue Type: Improvement Components: core/queryparser Affects Versions: 4.7 Reporter: Lee Hinman Priority: Minor Attachments: LUCENE-5410.patch Original Estimate: 168h Remaining Estimate: 168h It would be nice to add fuzzy query support to the {{SimpleQueryParser}} so that: {{foo~2}} generates a {{FuzzyQuery}} with an max edit distance of 2 and: {{foo bar~2}} generates a {{PhraseQuery}} with a slop of 2. -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-5410) Add fuzziness support to SimpleQueryParser
[ https://issues.apache.org/jira/browse/LUCENE-5410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13880350#comment-13880350 ] Lee Hinman commented on LUCENE-5410: Upayavira: That does bring up a good point, how should the extra fuzzy characters be treated if fuzziness is turned off? Currently the patch treats the token {{foo~2}} as a TermQuery for foo~2 if {{FUZZINESS_OPERATOR}} is disabled. Should it be changed to silently swallow the ~2 even if fuzziness is disabled? Add fuzziness support to SimpleQueryParser -- Key: LUCENE-5410 URL: https://issues.apache.org/jira/browse/LUCENE-5410 Project: Lucene - Core Issue Type: Improvement Components: core/queryparser Affects Versions: 4.7 Reporter: Lee Hinman Priority: Minor Attachments: LUCENE-5410.patch Original Estimate: 168h Remaining Estimate: 168h It would be nice to add fuzzy query support to the {{SimpleQueryParser}} so that: {{foo~2}} generates a {{FuzzyQuery}} with an max edit distance of 2 and: {{foo bar~2}} generates a {{PhraseQuery}} with a slop of 2. -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-5410) Add fuzziness support to SimpleQueryParser
[ https://issues.apache.org/jira/browse/LUCENE-5410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13880360#comment-13880360 ] Upayavira commented on LUCENE-5410: --- If fuzziness is disabled, then that should mean that the ~2 syntax has no meaning whatever, and should be treated as a regular token. Otherwise, you're turning the feature off, but not the syntax, and that will catch people out, and make the component more complex than necessary. Add fuzziness support to SimpleQueryParser -- Key: LUCENE-5410 URL: https://issues.apache.org/jira/browse/LUCENE-5410 Project: Lucene - Core Issue Type: Improvement Components: core/queryparser Affects Versions: 4.7 Reporter: Lee Hinman Priority: Minor Attachments: LUCENE-5410.patch Original Estimate: 168h Remaining Estimate: 168h It would be nice to add fuzzy query support to the {{SimpleQueryParser}} so that: {{foo~2}} generates a {{FuzzyQuery}} with an max edit distance of 2 and: {{foo bar~2}} generates a {{PhraseQuery}} with a slop of 2. -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-5410) Add fuzziness support to SimpleQueryParser
[ https://issues.apache.org/jira/browse/LUCENE-5410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13880364#comment-13880364 ] Lee Hinman commented on LUCENE-5410: Gotcha. Next version of the patch will swallow {{~XXX}} if fuzziness is disabled, and won't touch QueryBuilder.java, as per Roberts comments. Add fuzziness support to SimpleQueryParser -- Key: LUCENE-5410 URL: https://issues.apache.org/jira/browse/LUCENE-5410 Project: Lucene - Core Issue Type: Improvement Components: core/queryparser Affects Versions: 4.7 Reporter: Lee Hinman Priority: Minor Attachments: LUCENE-5410.patch Original Estimate: 168h Remaining Estimate: 168h It would be nice to add fuzzy query support to the {{SimpleQueryParser}} so that: {{foo~2}} generates a {{FuzzyQuery}} with an max edit distance of 2 and: {{foo bar~2}} generates a {{PhraseQuery}} with a slop of 2. -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-5410) Add fuzziness support to SimpleQueryParser
[ https://issues.apache.org/jira/browse/LUCENE-5410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13880374#comment-13880374 ] Robert Muir commented on LUCENE-5410: - Wait, why swallow it? When disabling an operator, it means its treated as it does not exist (no special meaning). E.g. for PREFIX today, if you disable that operator, it means it will literally make a term of foo* I think this is also agrees with Upayavira's thoughts, but maybe I'm missing something. Add fuzziness support to SimpleQueryParser -- Key: LUCENE-5410 URL: https://issues.apache.org/jira/browse/LUCENE-5410 Project: Lucene - Core Issue Type: Improvement Components: core/queryparser Affects Versions: 4.7 Reporter: Lee Hinman Priority: Minor Attachments: LUCENE-5410.patch Original Estimate: 168h Remaining Estimate: 168h It would be nice to add fuzzy query support to the {{SimpleQueryParser}} so that: {{foo~2}} generates a {{FuzzyQuery}} with an max edit distance of 2 and: {{foo bar~2}} generates a {{PhraseQuery}} with a slop of 2. -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-5410) Add fuzziness support to SimpleQueryParser
[ https://issues.apache.org/jira/browse/LUCENE-5410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13880384#comment-13880384 ] Lee Hinman commented on LUCENE-5410: Okay, I misunderstood then, I was thinking the ~2 syntax has no meaning whatever meant *no* meaning (ie, ignore it entirely). I will keep the current behavior of {{foo~2}} being a TermQuery for foo~2 and {{{foo bar~2}}} being a BooleanQuery of the PhraseQuery foo bar and a TermQuery for ~2. Add fuzziness support to SimpleQueryParser -- Key: LUCENE-5410 URL: https://issues.apache.org/jira/browse/LUCENE-5410 Project: Lucene - Core Issue Type: Improvement Components: core/queryparser Affects Versions: 4.7 Reporter: Lee Hinman Priority: Minor Attachments: LUCENE-5410.patch Original Estimate: 168h Remaining Estimate: 168h It would be nice to add fuzzy query support to the {{SimpleQueryParser}} so that: {{foo~2}} generates a {{FuzzyQuery}} with an max edit distance of 2 and: {{foo bar~2}} generates a {{PhraseQuery}} with a slop of 2. -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-5410) Add fuzziness support to SimpleQueryParser
[ https://issues.apache.org/jira/browse/LUCENE-5410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13880507#comment-13880507 ] Jack Conradson commented on LUCENE-5410: I think this patch is a good start. Personally, there's two changes I'd like to see. * The first was discussed briefly before, but I'm strongly in favor of having phrase slop be a different operator from fuzzy terms. I can see users wanting phrase slop without wanting fuzzy terms. * The second is I'd strongly prefer to see a separate method for the parsing logic related to slop/fuzzy where it would account for checking if there's a '~' and the integer afterwards. I think it will help clean up the consumeTerm and consumePhrase methods significantly. Once a term/phrase has been found, if fuzzy/slop is on, the method can be called to check for it. Add fuzziness support to SimpleQueryParser -- Key: LUCENE-5410 URL: https://issues.apache.org/jira/browse/LUCENE-5410 Project: Lucene - Core Issue Type: Improvement Components: core/queryparser Affects Versions: 4.7 Reporter: Lee Hinman Priority: Minor Attachments: LUCENE-5410.patch, LUCENE-5410.patch Original Estimate: 168h Remaining Estimate: 168h It would be nice to add fuzzy query support to the {{SimpleQueryParser}} so that: {{foo~2}} generates a {{FuzzyQuery}} with an max edit distance of 2 and: {{foo bar~2}} generates a {{PhraseQuery}} with a slop of 2. -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-5410) Add fuzziness support to SimpleQueryParser
[ https://issues.apache.org/jira/browse/LUCENE-5410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13880511#comment-13880511 ] Lee Hinman commented on LUCENE-5410: Okay, the first is very simple (I'll add a {{SLOP_OPERATOR}} flag and make {{FUZZINESS_OPERATOR}} only work for fuzzy terms. As for the second, I think this is doable, but I think it will still require a bit of special logic in consumeTerm and consumePhrase based on the differences in how they consume/increment state.data and state.index. I'll work on another revision doing this. Add fuzziness support to SimpleQueryParser -- Key: LUCENE-5410 URL: https://issues.apache.org/jira/browse/LUCENE-5410 Project: Lucene - Core Issue Type: Improvement Components: core/queryparser Affects Versions: 4.7 Reporter: Lee Hinman Priority: Minor Attachments: LUCENE-5410.patch, LUCENE-5410.patch Original Estimate: 168h Remaining Estimate: 168h It would be nice to add fuzzy query support to the {{SimpleQueryParser}} so that: {{foo~2}} generates a {{FuzzyQuery}} with an max edit distance of 2 and: {{foo bar~2}} generates a {{PhraseQuery}} with a slop of 2. -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-5410) Add fuzziness support to SimpleQueryParser
[ https://issues.apache.org/jira/browse/LUCENE-5410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13879319#comment-13879319 ] Robert Muir commented on LUCENE-5410: - Hi Lee, in general this seems like a good approach. Can we avoid the changes to QueryBuilder? The purpose of QueryBuilder is to interact with the analysis chain, and thats not typically how fuzzy queries are handled (for the same reason QueryBuilder has no prefix logic, so I think the case should be handled in a similar fashion). This way we can avoid adding methods like createFuzzyBooleanQuery, newTermOrFuzzyQuery and so on. As far as the parser itself, I don't like having both newPhraseQuery(String) and newPhraseQuery(String, int). Can we just nuke the first one and have the latter instead? Exact phrase queries can just past 0 here. Can we add the tilde operator to the list in testRandomQueries2 ? Add fuzziness support to SimpleQueryParser -- Key: LUCENE-5410 URL: https://issues.apache.org/jira/browse/LUCENE-5410 Project: Lucene - Core Issue Type: Improvement Components: core/queryparser Affects Versions: 4.7 Reporter: Lee Hinman Priority: Minor Attachments: LUCENE-5410.patch Original Estimate: 168h Remaining Estimate: 168h It would be nice to add fuzzy query support to the {{SimpleQueryParser}} so that: {{foo~2}} generates a {{FuzzyQuery}} with an max edit distance of 2 and: {{foo bar~2}} generates a {{PhraseQuery}} with a slop of 2. -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org
[jira] [Commented] (LUCENE-5410) Add fuzziness support to SimpleQueryParser
[ https://issues.apache.org/jira/browse/LUCENE-5410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13878015#comment-13878015 ] Lee Hinman commented on LUCENE-5410: I would like to work on this also, if that's alright. Add fuzziness support to SimpleQueryParser -- Key: LUCENE-5410 URL: https://issues.apache.org/jira/browse/LUCENE-5410 Project: Lucene - Core Issue Type: Improvement Components: core/queryparser Affects Versions: 4.7 Reporter: Lee Hinman Priority: Minor Original Estimate: 168h Remaining Estimate: 168h It would be nice to add fuzzy query support to the {{SimpleQueryParser}} so that: {{foo~2}} generates a {{FuzzyQuery}} with an max edit distance of 2 and: {{foo bar~2}} generates a {{PhraseQuery}} with a slop of 2. -- This message was sent by Atlassian JIRA (v6.1.5#6160) - To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org