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

Luis Alves edited comment on LUCENE-1486 at 7/22/09 7:55 AM:
-------------------------------------------------------------

I added 2 testcases that return doc 3.
These queries do not make much sense,
I added it just to prove the point that we need more information
describing the use case for complex phrase qp.
We also should define a subset of the supported syntax we want to support 
inside phrases, 
with well defined behaviors.

        checkMatches("\"(goos~0.5 AND (mike OR smith) AND NOT ( percival AND 
john) ) vacation\"~3","3"); // proximity with fuzzy, OR, AND, NOT
        checkMatches("\"(goos~0.5 AND (mike OR smith) AND ( percival AND john) 
) vacation\"~3","3"); // proximity with fuzzy, OR, AND


      was (Author: lafa):
    I added 2 testcases that return doc 3, but do not make much sense just to 
prove the point that we need more docs describing the use case for complex 
phrase qp, and define what is the subset of the supported syntax we want to 
support.

        checkMatches("\"(goos~0.5 AND (mike OR smith) AND NOT ( percival AND 
john) ) vacation\"~3","3"); // proximity with fuzzy, OR, AND, NOT
        checkMatches("\"(goos~0.5 AND (mike OR smith) AND ( percival AND john) 
) vacation\"~3","3"); // proximity with fuzzy, OR, AND

  
> 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
>            Assignee: Mark Harwood
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: ComplexPhraseQueryParser.java, 
> junit_complex_phrase_qp_07_21_2009.patch, 
> junit_complex_phrase_qp_07_22_2009.patch, LUCENE-1486.patch, 
> LUCENE-1486.patch, LUCENE-1486.patch, LUCENE-1486.patch, 
> 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-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to