|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 - 3 - 4 - 5 - 6 | Next > |
|
|
[jira] Created: (LUCENE-1486) Wildcards, ORs etc inside Phrase queriesWildcards, ORs etc inside Phrase queries
---------------------------------------- Key: LUCENE-1486 URL: https://issues.apache.org/jira/browse/LUCENE-1486 Project: Lucene - Java Issue Type: Improvement Components: QueryParser Affects Versions: 2.4 Reporter: Mark Harwood Priority: Minor Fix For: 2.4.1 An extension to the default QueryParser that overrides the parsing of PhraseQueries to allow more complex syntax e.g. wildcards in phrase queries. The implementation feels a little hacky - this is arguably better handled in QueryParser itself. This works as a proof of concept for much of the query parser syntax. Examples from the Junit test include: checkMatches("\"j* smyth~\"", "1,2"); //wildcards and fuzzies are OK in phrases checkMatches("\"(jo* -john) smith\"", "2"); // boolean logic works checkMatches("\"jo* smith\"~2", "1,2,3"); // position logic works. checkBadQuery("\"jo* id:1 smith\""); //mixing fields in a phrase is bad checkBadQuery("\"jo* \"smith\" \""); //phrases inside phrases is bad checkBadQuery("\"jo* [sma TO smZ]\" \""); //range queries inside phrases not supported Code plus Junit test to follow... -- 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: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
|
|
[jira] Updated: (LUCENE-1486) Wildcards, ORs etc inside Phrase queries[ https://issues.apache.org/jira/browse/LUCENE-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Harwood updated LUCENE-1486: --------------------------------- Attachment: ComplexPhraseQueryParser.java QueryParser extension > Wildcards, ORs etc inside Phrase queries > ---------------------------------------- > > Key: LUCENE-1486 > URL: https://issues.apache.org/jira/browse/LUCENE-1486 > Project: Lucene - Java > Issue Type: Improvement > Components: QueryParser > Affects Versions: 2.4 > Reporter: Mark Harwood > Priority: Minor > Fix For: 2.4.1 > > Attachments: ComplexPhraseQueryParser.java, TestComplexPhraseQuery.java > > > An extension to the default QueryParser that overrides the parsing of PhraseQueries to allow more complex syntax e.g. wildcards in phrase queries. > The implementation feels a little hacky - this is arguably better handled in QueryParser itself. This works as a proof of concept for much of the query parser syntax. Examples from the Junit test include: > checkMatches("\"j* smyth~\"", "1,2"); //wildcards and fuzzies are OK in phrases > checkMatches("\"(jo* -john) smith\"", "2"); // boolean logic works > checkMatches("\"jo* smith\"~2", "1,2,3"); // position logic works. > > checkBadQuery("\"jo* id:1 smith\""); //mixing fields in a phrase is bad > checkBadQuery("\"jo* \"smith\" \""); //phrases inside phrases is bad > checkBadQuery("\"jo* [sma TO smZ]\" \""); //range queries inside phrases not supported > Code plus Junit test to follow... -- 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: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
|
|
[jira] Updated: (LUCENE-1486) Wildcards, ORs etc inside Phrase queries[ https://issues.apache.org/jira/browse/LUCENE-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Harwood updated LUCENE-1486: --------------------------------- Attachment: TestComplexPhraseQuery.java Junit test > Wildcards, ORs etc inside Phrase queries > ---------------------------------------- > > Key: LUCENE-1486 > URL: https://issues.apache.org/jira/browse/LUCENE-1486 > Project: Lucene - Java > Issue Type: Improvement > Components: QueryParser > Affects Versions: 2.4 > Reporter: Mark Harwood > Priority: Minor > Fix For: 2.4.1 > > Attachments: ComplexPhraseQueryParser.java, TestComplexPhraseQuery.java > > > An extension to the default QueryParser that overrides the parsing of PhraseQueries to allow more complex syntax e.g. wildcards in phrase queries. > The implementation feels a little hacky - this is arguably better handled in QueryParser itself. This works as a proof of concept for much of the query parser syntax. Examples from the Junit test include: > checkMatches("\"j* smyth~\"", "1,2"); //wildcards and fuzzies are OK in phrases > checkMatches("\"(jo* -john) smith\"", "2"); // boolean logic works > checkMatches("\"jo* smith\"~2", "1,2,3"); // position logic works. > > checkBadQuery("\"jo* id:1 smith\""); //mixing fields in a phrase is bad > checkBadQuery("\"jo* \"smith\" \""); //phrases inside phrases is bad > checkBadQuery("\"jo* [sma TO smZ]\" \""); //range queries inside phrases not supported > Code plus Junit test to follow... -- 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: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
|
|
Re: [jira] Created: (LUCENE-1486) Wildcards, ORs etc inside Phrase queriesIf wildcards and fuzzyies are supported, why not range ?
We have a custom "range in phrase" parser, and it works really well, but we would like to use standard Lucene is possible. On Dec 10, 2008, at 12:18 PM, Mark Harwood (JIRA) wrote: > Wildcards, ORs etc inside Phrase queries > ---------------------------------------- > > Key: LUCENE-1486 > URL: https://issues.apache.org/jira/browse/ > LUCENE-1486 > Project: Lucene - Java > Issue Type: Improvement > Components: QueryParser > Affects Versions: 2.4 > Reporter: Mark Harwood > Priority: Minor > Fix For: 2.4.1 > > > An extension to the default QueryParser that overrides the parsing > of PhraseQueries to allow more complex syntax e.g. wildcards in > phrase queries. > > The implementation feels a little hacky - this is arguably better > handled in QueryParser itself. This works as a proof of concept > for much of the query parser syntax. Examples from the Junit test > include: > > checkMatches("\"j* smyth~\"", "1,2"); //wildcards and fuzzies > are OK in phrases > checkMatches("\"(jo* -john) smith\"", "2"); // boolean logic works > checkMatches("\"jo* smith\"~2", "1,2,3"); // position logic works. > > checkBadQuery("\"jo* id:1 smith\""); //mixing fields in a phrase > is bad > checkBadQuery("\"jo* \"smith\" \""); //phrases inside phrases is bad > checkBadQuery("\"jo* [sma TO smZ]\" \""); //range queries inside > phrases not supported > > Code plus Junit test to follow... > > > > -- > 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: java-dev-unsubscribe@... > For additional commands, e-mail: java-dev-help@... > --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
|
|
Re: [jira] Created: (LUCENE-1486) Wildcards, ORs etc inside Phrase queries >>If wildcards and fuzzyies are supported, why not range ?
Because Ranges don't rewrite to a BooleanQuery full of TermQueries so I can easily inspect them. Unlike fuzzy/wildcard/boolean I suspect they are not that generally useful as part of phrase query expressions. Feel free to tinker with the code if it is important to you though :) --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
|
|
[jira] Updated: (LUCENE-1486) Wildcards, ORs etc inside Phrase queries[ https://issues.apache.org/jira/browse/LUCENE-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Harwood updated LUCENE-1486: --------------------------------- Attachment: (was: ComplexPhraseQueryParser.java) > Wildcards, ORs etc inside Phrase queries > ---------------------------------------- > > Key: LUCENE-1486 > URL: https://issues.apache.org/jira/browse/LUCENE-1486 > Project: Lucene - Java > Issue Type: Improvement > Components: QueryParser > Affects Versions: 2.4 > Reporter: Mark Harwood > Priority: Minor > Fix For: 2.4.1 > > Attachments: ComplexPhraseQueryParser.java, TestComplexPhraseQuery.java > > > An extension to the default QueryParser that overrides the parsing of PhraseQueries to allow more complex syntax e.g. wildcards in phrase queries. > The implementation feels a little hacky - this is arguably better handled in QueryParser itself. This works as a proof of concept for much of the query parser syntax. Examples from the Junit test include: > checkMatches("\"j* smyth~\"", "1,2"); //wildcards and fuzzies are OK in phrases > checkMatches("\"(jo* -john) smith\"", "2"); // boolean logic works > checkMatches("\"jo* smith\"~2", "1,2,3"); // position logic works. > > checkBadQuery("\"jo* id:1 smith\""); //mixing fields in a phrase is bad > checkBadQuery("\"jo* \"smith\" \""); //phrases inside phrases is bad > checkBadQuery("\"jo* [sma TO smZ]\" \""); //range queries inside phrases not supported > Code plus Junit test to follow... -- 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: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
|
|
[jira] Updated: (LUCENE-1486) Wildcards, ORs etc inside Phrase queries[ https://issues.apache.org/jira/browse/LUCENE-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Harwood updated LUCENE-1486: --------------------------------- Attachment: ComplexPhraseQueryParser.java Fixed bug with plain phrase query, added support for range queries > Wildcards, ORs etc inside Phrase queries > ---------------------------------------- > > Key: LUCENE-1486 > URL: https://issues.apache.org/jira/browse/LUCENE-1486 > Project: Lucene - Java > Issue Type: Improvement > Components: QueryParser > Affects Versions: 2.4 > Reporter: Mark Harwood > Priority: Minor > Fix For: 2.4.1 > > Attachments: ComplexPhraseQueryParser.java, TestComplexPhraseQuery.java > > > An extension to the default QueryParser that overrides the parsing of PhraseQueries to allow more complex syntax e.g. wildcards in phrase queries. > The implementation feels a little hacky - this is arguably better handled in QueryParser itself. This works as a proof of concept for much of the query parser syntax. Examples from the Junit test include: > checkMatches("\"j* smyth~\"", "1,2"); //wildcards and fuzzies are OK in phrases > checkMatches("\"(jo* -john) smith\"", "2"); // boolean logic works > checkMatches("\"jo* smith\"~2", "1,2,3"); // position logic works. > > checkBadQuery("\"jo* id:1 smith\""); //mixing fields in a phrase is bad > checkBadQuery("\"jo* \"smith\" \""); //phrases inside phrases is bad > checkBadQuery("\"jo* [sma TO smZ]\" \""); //range queries inside phrases not supported > Code plus Junit test to follow... -- 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: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
|
|
[jira] Updated: (LUCENE-1486) Wildcards, ORs etc inside Phrase queries[ https://issues.apache.org/jira/browse/LUCENE-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Harwood updated LUCENE-1486: --------------------------------- Attachment: (was: TestComplexPhraseQuery.java) > Wildcards, ORs etc inside Phrase queries > ---------------------------------------- > > Key: LUCENE-1486 > URL: https://issues.apache.org/jira/browse/LUCENE-1486 > Project: Lucene - Java > Issue Type: Improvement > Components: QueryParser > Affects Versions: 2.4 > Reporter: Mark Harwood > Priority: Minor > Fix For: 2.4.1 > > Attachments: ComplexPhraseQueryParser.java, TestComplexPhraseQuery.java > > > An extension to the default QueryParser that overrides the parsing of PhraseQueries to allow more complex syntax e.g. wildcards in phrase queries. > The implementation feels a little hacky - this is arguably better handled in QueryParser itself. This works as a proof of concept for much of the query parser syntax. Examples from the Junit test include: > checkMatches("\"j* smyth~\"", "1,2"); //wildcards and fuzzies are OK in phrases > checkMatches("\"(jo* -john) smith\"", "2"); // boolean logic works > checkMatches("\"jo* smith\"~2", "1,2,3"); // position logic works. > > checkBadQuery("\"jo* id:1 smith\""); //mixing fields in a phrase is bad > checkBadQuery("\"jo* \"smith\" \""); //phrases inside phrases is bad > checkBadQuery("\"jo* [sma TO smZ]\" \""); //range queries inside phrases not supported > Code plus Junit test to follow... -- 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: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
|
|
[jira] Updated: (LUCENE-1486) Wildcards, ORs etc inside Phrase queries[ https://issues.apache.org/jira/browse/LUCENE-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Harwood updated LUCENE-1486: --------------------------------- Attachment: TestComplexPhraseQuery.java Added tests for range queries and plain PhraseQueries > Wildcards, ORs etc inside Phrase queries > ---------------------------------------- > > Key: LUCENE-1486 > URL: https://issues.apache.org/jira/browse/LUCENE-1486 > Project: Lucene - Java > Issue Type: Improvement > Components: QueryParser > Affects Versions: 2.4 > Reporter: Mark Harwood > Priority: Minor > Fix For: 2.4.1 > > Attachments: ComplexPhraseQueryParser.java, TestComplexPhraseQuery.java > > > An extension to the default QueryParser that overrides the parsing of PhraseQueries to allow more complex syntax e.g. wildcards in phrase queries. > The implementation feels a little hacky - this is arguably better handled in QueryParser itself. This works as a proof of concept for much of the query parser syntax. Examples from the Junit test include: > checkMatches("\"j* smyth~\"", "1,2"); //wildcards and fuzzies are OK in phrases > checkMatches("\"(jo* -john) smith\"", "2"); // boolean logic works > checkMatches("\"jo* smith\"~2", "1,2,3"); // position logic works. > > checkBadQuery("\"jo* id:1 smith\""); //mixing fields in a phrase is bad > checkBadQuery("\"jo* \"smith\" \""); //phrases inside phrases is bad > checkBadQuery("\"jo* [sma TO smZ]\" \""); //range queries inside phrases not supported > Code plus Junit test to follow... -- 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: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
|
|
Re: [jira] Created: (LUCENE-1486) Wildcards, ORs etc inside Phrase queriesWill https://issues.apache.org/jira/browse/LUCENE-1486 let people
include NOT inside phrases? My customers would like to have queries like "copyright !mycompany"~2, that find any copyright clause except their own. Currently searches like this hit on copyright only if mycompany doesn't appear anywhere in the document; it ignores the phrase/proximity requirement. Thanks, David -- David Kaelbling Senior Software Engineer Black Duck Software, Inc. dkaelbling@... T +1.781.810.2041 F +1.781.891.5145 http://www.blackducksoftware.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
|
|
Re: [jira] Created: (LUCENE-1486) Wildcards, ORs etc inside Phrase queriesOn Thu, Dec 11, 2008 at 11:24 AM, David Kaelbling
<dkaelbling@...> wrote: > Will https://issues.apache.org/jira/browse/LUCENE-1486 let people > include NOT inside phrases? My customers would like to have queries > like "copyright !mycompany"~2, that find any copyright clause except > their own. MultiPhraseQuery doesn't have that capability, but you could easily handle this specific query with copyright -"copyright mycompany"~2 -Yonik Currently searches like this hit on copyright only if > mycompany doesn't appear anywhere in the document; it ignores the > phrase/proximity requirement. > > Thanks, > David > > -- > David Kaelbling > Senior Software Engineer > Black Duck Software, Inc. > > dkaelbling@... > T +1.781.810.2041 > F +1.781.891.5145 > > http://www.blackducksoftware.com > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscribe@... > For additional commands, e-mail: java-dev-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
|
|
Re: [jira] Created: (LUCENE-1486) Wildcards, ORs etc inside Phrase queriesI'm not sure I see an easy translation of "copyright !mycompany" into SpanQueries which is how all the other queries are being converted.
SpanNotQuery isn't applicable here because that only tests spans don't overlap. Yonik's approach looks good. ----- Original Message ---- From: Yonik Seeley <yonik@...> To: java-dev@... Cc: David Kaelbling <dkaelbling@...> Sent: Thursday, 11 December, 2008 16:33:39 Subject: Re: [jira] Created: (LUCENE-1486) Wildcards, ORs etc inside Phrase queries On Thu, Dec 11, 2008 at 11:24 AM, David Kaelbling <dkaelbling@...> wrote: > Will https://issues.apache.org/jira/browse/LUCENE-1486 let people > include NOT inside phrases? My customers would like to have queries > like "copyright !mycompany"~2, that find any copyright clause except > their own. MultiPhraseQuery doesn't have that capability, but you could easily handle this specific query with copyright -"copyright mycompany"~2 -Yonik Currently searches like this hit on copyright only if > mycompany doesn't appear anywhere in the document; it ignores the > phrase/proximity requirement. > > Thanks, > David > > -- > David Kaelbling > Senior Software Engineer > Black Duck Software, Inc. > > dkaelbling@... > T +1.781.810.2041 > F +1.781.891.5145 > > http://www.blackducksoftware.com > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscribe@... > For additional commands, e-mail: java-dev-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
|
|
Re: [jira] Created: (LUCENE-1486) Wildcards, ORs etc inside Phrase queriesOn Thu, Dec 11, 2008 at 11:33 AM, Yonik Seeley <yonik@...> wrote:
> On Thu, Dec 11, 2008 at 11:24 AM, David Kaelbling > <dkaelbling@...> wrote: >> Will https://issues.apache.org/jira/browse/LUCENE-1486 let people >> include NOT inside phrases? My customers would like to have queries >> like "copyright !mycompany"~2, that find any copyright clause except >> their own. > > MultiPhraseQuery doesn't have that capability, but you could easily > handle this specific query with > copyright -"copyright mycompany"~2 oops, sorry, that's actually not equivalent. I assume you want a document with "copyright mycomany zzz zzz zzzcopyright anotherco" to match. -Yonik --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
|
|
Re: [jira] Created: (LUCENE-1486) Wildcards, ORs etc inside Phrase queriesThanks! But not quite -- that query doesn't hit on a document that
contains: copyright 2008 mycompany blah blah blah blah copyright 2008 yourcompany - David On Thu, 2008-12-11 at 11:33 -0500, Yonik Seeley wrote: > On Thu, Dec 11, 2008 at 11:24 AM, David Kaelbling > <dkaelbling@...> wrote: > > Will https://issues.apache.org/jira/browse/LUCENE-1486 let people > > include NOT inside phrases? My customers would like to have queries > > like "copyright !mycompany"~2, that find any copyright clause except > > their own. > > MultiPhraseQuery doesn't have that capability, but you could easily > handle this specific query with > copyright -"copyright mycompany"~2 > > -Yonik -- David Kaelbling Senior Software Engineer Black Duck Software, Inc. dkaelbling@... T +1.781.810.2041 F +1.781.891.5145 http://www.blackducksoftware.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
|
|
RE: [jira] Created: (LUCENE-1486) Wildcards, ORs etc inside PhrasequeriesHi David,
SpanRegexQuery may help - see my response on a similar thread below: <http://www.nabble.com/Query-to-ignore-certain-phrases-td18935560.html#a18946729> Steve On 12/11/2008 at 11:59 AM, David Kaelbling wrote: > Thanks! But not quite -- that query doesn't hit on a document that > contains: > copyright 2008 mycompany > blah blah blah blah > copyright 2008 yourcompany > > - David > > On Thu, 2008-12-11 at 11:33 -0500, Yonik Seeley wrote: > > On Thu, Dec 11, 2008 at 11:24 AM, David Kaelbling > > <dkaelbling@...> wrote: > > > Will https://issues.apache.org/jira/browse/LUCENE-1486 let people > > > include NOT inside phrases? My customers would like to have queries > > > like "copyright !mycompany"~2, that find any copyright clause except > > > their own. > > > > MultiPhraseQuery doesn't have that capability, but you could easily > > handle this specific query with > > copyright -"copyright mycompany"~2 > > > > -Yonik > > -- > David Kaelbling > Senior Software Engineer > Black Duck Software, Inc. > > dkaelbling@... > T +1.781.810.2041 > F +1.781.891.5145 > > http://www.blackducksoftware.com --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
|
|
[jira] Updated: (LUCENE-1486) Wildcards, ORs etc inside Phrase queries[ https://issues.apache.org/jira/browse/LUCENE-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael McCandless updated LUCENE-1486: --------------------------------------- Fix Version/s: 2.9 (Added 2.9 fix version in addition to 2.4.1). > Wildcards, ORs etc inside Phrase queries > ---------------------------------------- > > Key: LUCENE-1486 > URL: https://issues.apache.org/jira/browse/LUCENE-1486 > Project: Lucene - Java > Issue Type: Improvement > Components: QueryParser > Affects Versions: 2.4 > Reporter: Mark Harwood > Priority: Minor > Fix For: 2.4.1, 2.9 > > Attachments: ComplexPhraseQueryParser.java, TestComplexPhraseQuery.java > > > An extension to the default QueryParser that overrides the parsing of PhraseQueries to allow more complex syntax e.g. wildcards in phrase queries. > The implementation feels a little hacky - this is arguably better handled in QueryParser itself. This works as a proof of concept for much of the query parser syntax. Examples from the Junit test include: > checkMatches("\"j* smyth~\"", "1,2"); //wildcards and fuzzies are OK in phrases > checkMatches("\"(jo* -john) smith\"", "2"); // boolean logic works > checkMatches("\"jo* smith\"~2", "1,2,3"); // position logic works. > > checkBadQuery("\"jo* id:1 smith\""); //mixing fields in a phrase is bad > checkBadQuery("\"jo* \"smith\" \""); //phrases inside phrases is bad > checkBadQuery("\"jo* [sma TO smZ]\" \""); //range queries inside phrases not supported > Code plus Junit test to follow... -- 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: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
|
|
[jira] Updated: (LUCENE-1486) Wildcards, ORs etc inside Phrase queries[ https://issues.apache.org/jira/browse/LUCENE-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Harwood updated LUCENE-1486: --------------------------------- Attachment: TestComplexPhraseQuery.java More tests for Nots > Wildcards, ORs etc inside Phrase queries > ---------------------------------------- > > Key: LUCENE-1486 > URL: https://issues.apache.org/jira/browse/LUCENE-1486 > Project: Lucene - Java > Issue Type: Improvement > Components: QueryParser > Affects Versions: 2.4 > Reporter: Mark Harwood > Priority: Minor > Fix For: 2.4.1, 2.9 > > Attachments: ComplexPhraseQueryParser.java, TestComplexPhraseQuery.java > > > An extension to the default QueryParser that overrides the parsing of PhraseQueries to allow more complex syntax e.g. wildcards in phrase queries. > The implementation feels a little hacky - this is arguably better handled in QueryParser itself. This works as a proof of concept for much of the query parser syntax. Examples from the Junit test include: > checkMatches("\"j* smyth~\"", "1,2"); //wildcards and fuzzies are OK in phrases > checkMatches("\"(jo* -john) smith\"", "2"); // boolean logic works > checkMatches("\"jo* smith\"~2", "1,2,3"); // position logic works. > > checkBadQuery("\"jo* id:1 smith\""); //mixing fields in a phrase is bad > checkBadQuery("\"jo* \"smith\" \""); //phrases inside phrases is bad > checkBadQuery("\"jo* [sma TO smZ]\" \""); //range queries inside phrases not supported > Code plus Junit test to follow... -- 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: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
|
|
[jira] Updated: (LUCENE-1486) Wildcards, ORs etc inside Phrase queries[ https://issues.apache.org/jira/browse/LUCENE-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Harwood updated LUCENE-1486: --------------------------------- Attachment: ComplexPhraseQueryParser.java Added support for "Nots" in phrase queries e.g. "-not interested" > Wildcards, ORs etc inside Phrase queries > ---------------------------------------- > > Key: LUCENE-1486 > URL: https://issues.apache.org/jira/browse/LUCENE-1486 > Project: Lucene - Java > Issue Type: Improvement > Components: QueryParser > Affects Versions: 2.4 > Reporter: Mark Harwood > Priority: Minor > Fix For: 2.4.1, 2.9 > > Attachments: ComplexPhraseQueryParser.java, TestComplexPhraseQuery.java > > > An extension to the default QueryParser that overrides the parsing of PhraseQueries to allow more complex syntax e.g. wildcards in phrase queries. > The implementation feels a little hacky - this is arguably better handled in QueryParser itself. This works as a proof of concept for much of the query parser syntax. Examples from the Junit test include: > checkMatches("\"j* smyth~\"", "1,2"); //wildcards and fuzzies are OK in phrases > checkMatches("\"(jo* -john) smith\"", "2"); // boolean logic works > checkMatches("\"jo* smith\"~2", "1,2,3"); // position logic works. > > checkBadQuery("\"jo* id:1 smith\""); //mixing fields in a phrase is bad > checkBadQuery("\"jo* \"smith\" \""); //phrases inside phrases is bad > checkBadQuery("\"jo* [sma TO smZ]\" \""); //range queries inside phrases not supported > Code plus Junit test to follow... -- 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: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
|
|
[jira] Updated: (LUCENE-1486) Wildcards, ORs etc inside Phrase queries[ https://issues.apache.org/jira/browse/LUCENE-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Harwood updated LUCENE-1486: --------------------------------- Attachment: (was: ComplexPhraseQueryParser.java) > Wildcards, ORs etc inside Phrase queries > ---------------------------------------- > > Key: LUCENE-1486 > URL: https://issues.apache.org/jira/browse/LUCENE-1486 > Project: Lucene - Java > Issue Type: Improvement > Components: QueryParser > Affects Versions: 2.4 > Reporter: Mark Harwood > Priority: Minor > Fix For: 2.4.1, 2.9 > > Attachments: ComplexPhraseQueryParser.java, TestComplexPhraseQuery.java > > > An extension to the default QueryParser that overrides the parsing of PhraseQueries to allow more complex syntax e.g. wildcards in phrase queries. > The implementation feels a little hacky - this is arguably better handled in QueryParser itself. This works as a proof of concept for much of the query parser syntax. Examples from the Junit test include: > checkMatches("\"j* smyth~\"", "1,2"); //wildcards and fuzzies are OK in phrases > checkMatches("\"(jo* -john) smith\"", "2"); // boolean logic works > checkMatches("\"jo* smith\"~2", "1,2,3"); // position logic works. > > checkBadQuery("\"jo* id:1 smith\""); //mixing fields in a phrase is bad > checkBadQuery("\"jo* \"smith\" \""); //phrases inside phrases is bad > checkBadQuery("\"jo* [sma TO smZ]\" \""); //range queries inside phrases not supported > Code plus Junit test to follow... -- 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: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
|
|
[jira] Updated: (LUCENE-1486) Wildcards, ORs etc inside Phrase queries[ https://issues.apache.org/jira/browse/LUCENE-1486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Harwood updated LUCENE-1486: --------------------------------- Attachment: (was: TestComplexPhraseQuery.java) > Wildcards, ORs etc inside Phrase queries > ---------------------------------------- > > Key: LUCENE-1486 > URL: https://issues.apache.org/jira/browse/LUCENE-1486 > Project: Lucene - Java > Issue Type: Improvement > Components: QueryParser > Affects Versions: 2.4 > Reporter: Mark Harwood > Priority: Minor > Fix For: 2.4.1, 2.9 > > Attachments: ComplexPhraseQueryParser.java, TestComplexPhraseQuery.java > > > An extension to the default QueryParser that overrides the parsing of PhraseQueries to allow more complex syntax e.g. wildcards in phrase queries. > The implementation feels a little hacky - this is arguably better handled in QueryParser itself. This works as a proof of concept for much of the query parser syntax. Examples from the Junit test include: > checkMatches("\"j* smyth~\"", "1,2"); //wildcards and fuzzies are OK in phrases > checkMatches("\"(jo* -john) smith\"", "2"); // boolean logic works > checkMatches("\"jo* smith\"~2", "1,2,3"); // position logic works. > > checkBadQuery("\"jo* id:1 smith\""); //mixing fields in a phrase is bad > checkBadQuery("\"jo* \"smith\" \""); //phrases inside phrases is bad > checkBadQuery("\"jo* [sma TO smZ]\" \""); //range queries inside phrases not supported > Code plus Junit test to follow... -- 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: java-dev-unsubscribe@... For additional commands, e-mail: java-dev-help@... |
| < Prev | 1 - 2 - 3 - 4 - 5 - 6 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |