You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2010/08/17 04:05:17 UTC

[jira] Created: (LUCENE-2604) add regexpquery to queryparser

add regexpquery to queryparser
------------------------------

                 Key: LUCENE-2604
                 URL: https://issues.apache.org/jira/browse/LUCENE-2604
             Project: Lucene - Java
          Issue Type: New Feature
          Components: QueryParser
    Affects Versions: 4.0
            Reporter: Robert Muir


patch that adds RegexpQuery if you /enter an expression between slashes like this/

i didnt do the contrib ones but could add it there too if it seems like a good idea.


-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2604) add regexpquery to queryparser

Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-2604:
--------------------------------

    Attachment: LUCENE-2604.patch

Thanks Simon: you are right! I updated the patch with your test

I modified the grammar slightly to allow "/" when escaped:
{noformat}
<REGEXPTERM: "/" (~[ "/" ] | "\\/" )* "/" >
{noformat}

Additionally i removed any un-escaping in QP itself so that it passes
through unchanged to RegexpQuery: this way you don't have to 
double-escape operators.


> add regexpquery to queryparser
> ------------------------------
>
>                 Key: LUCENE-2604
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2604
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: QueryParser
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>         Attachments: LUCENE-2604.patch, LUCENE-2604.patch
>
>
> patch that adds RegexpQuery if you /enter an expression between slashes like this/
> i didnt do the contrib ones but could add it there too if it seems like a good idea.

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2604) add regexpquery to queryparser

Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901224#action_12901224 ] 

Robert Muir commented on LUCENE-2604:
-------------------------------------

Simon, thats great if you would like to, only thing is i would like to try to do contrib ones too.

if you don't have the time to do this part also, i'll get around to it eventually, but in general i think its best to try to keep all the qp's in sync.


> add regexpquery to queryparser
> ------------------------------
>
>                 Key: LUCENE-2604
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2604
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: QueryParser
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>         Attachments: LUCENE-2604.patch, LUCENE-2604.patch
>
>
> patch that adds RegexpQuery if you /enter an expression between slashes like this/
> i didnt do the contrib ones but could add it there too if it seems like a good idea.

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Assigned: (LUCENE-2604) add regexpquery to queryparser

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Willnauer reassigned LUCENE-2604:
---------------------------------------

    Assignee: Simon Willnauer

> add regexpquery to queryparser
> ------------------------------
>
>                 Key: LUCENE-2604
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2604
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: QueryParser
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>            Assignee: Simon Willnauer
>         Attachments: LUCENE-2604.patch, LUCENE-2604.patch
>
>
> patch that adds RegexpQuery if you /enter an expression between slashes like this/
> i didnt do the contrib ones but could add it there too if it seems like a good idea.

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2604) add regexpquery to queryparser

Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-2604:
--------------------------------

    Attachment: LUCENE-2604.patch

> add regexpquery to queryparser
> ------------------------------
>
>                 Key: LUCENE-2604
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2604
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: QueryParser
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>         Attachments: LUCENE-2604.patch
>
>
> patch that adds RegexpQuery if you /enter an expression between slashes like this/
> i didnt do the contrib ones but could add it there too if it seems like a good idea.

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2604) add regexpquery to queryparser

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903982#action_12903982 ] 

Simon Willnauer commented on LUCENE-2604:
-----------------------------------------

It seems nobody who is more familiar with that contrib query parser code is around to take a look into that. I plan to commit this soon... Any objections?

> add regexpquery to queryparser
> ------------------------------
>
>                 Key: LUCENE-2604
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2604
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: QueryParser
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>            Assignee: Simon Willnauer
>         Attachments: LUCENE-2604.patch, LUCENE-2604.patch, LUCENE-2604.patch
>
>
> patch that adds RegexpQuery if you /enter an expression between slashes like this/
> i didnt do the contrib ones but could add it there too if it seems like a good idea.

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2604) add regexpquery to queryparser

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901277#action_12901277 ] 

Simon Willnauer commented on LUCENE-2604:
-----------------------------------------

bq. Simon, thats great if you would like to, only thing is i would like to try to do contrib ones too.

will do - no problem...

simon

> add regexpquery to queryparser
> ------------------------------
>
>                 Key: LUCENE-2604
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2604
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: QueryParser
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>         Attachments: LUCENE-2604.patch, LUCENE-2604.patch
>
>
> patch that adds RegexpQuery if you /enter an expression between slashes like this/
> i didnt do the contrib ones but could add it there too if it seems like a good idea.

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2604) add regexpquery to queryparser

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Willnauer updated LUCENE-2604:
------------------------------------

    Attachment: LUCENE-2604.patch

This patch adds RegexpQuery to remaining contrib queryparsers. It also extends the original testcases to cache several other cases.  

I would appreciate if somebody more familiar with the contrib queryparser (the IBM one :) ) could review that code. Buschmi, would you take a look?

simon 

> add regexpquery to queryparser
> ------------------------------
>
>                 Key: LUCENE-2604
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2604
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: QueryParser
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>            Assignee: Simon Willnauer
>         Attachments: LUCENE-2604.patch, LUCENE-2604.patch, LUCENE-2604.patch
>
>
> patch that adds RegexpQuery if you /enter an expression between slashes like this/
> i didnt do the contrib ones but could add it there too if it seems like a good idea.

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2604) add regexpquery to queryparser

Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12903446#action_12903446 ] 

Robert Muir commented on LUCENE-2604:
-------------------------------------

Simon, I took a quick look and the changes look good to me, but i am no expert on that contrib queryparser either :)

Thanks for your work here.

> add regexpquery to queryparser
> ------------------------------
>
>                 Key: LUCENE-2604
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2604
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: QueryParser
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>            Assignee: Simon Willnauer
>         Attachments: LUCENE-2604.patch, LUCENE-2604.patch, LUCENE-2604.patch
>
>
> patch that adds RegexpQuery if you /enter an expression between slashes like this/
> i didnt do the contrib ones but could add it there too if it seems like a good idea.

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2604) add regexpquery to queryparser

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901205#action_12901205 ] 

Simon Willnauer commented on LUCENE-2604:
-----------------------------------------

Looks good to me robert, want me to take the issue?

simon

> add regexpquery to queryparser
> ------------------------------
>
>                 Key: LUCENE-2604
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2604
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: QueryParser
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>         Attachments: LUCENE-2604.patch, LUCENE-2604.patch
>
>
> patch that adds RegexpQuery if you /enter an expression between slashes like this/
> i didnt do the contrib ones but could add it there too if it seems like a good idea.

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Closed: (LUCENE-2604) add regexpquery to queryparser

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Willnauer closed LUCENE-2604.
-----------------------------------

    Fix Version/s: 4.0
       Resolution: Fixed

 Committed revision 990836.


> add regexpquery to queryparser
> ------------------------------
>
>                 Key: LUCENE-2604
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2604
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: QueryParser
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>            Assignee: Simon Willnauer
>             Fix For: 4.0
>
>         Attachments: LUCENE-2604.patch, LUCENE-2604.patch, LUCENE-2604.patch
>
>
> patch that adds RegexpQuery if you /enter an expression between slashes like this/
> i didnt do the contrib ones but could add it there too if it seems like a good idea.

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2604) add regexpquery to queryparser

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899374#action_12899374 ] 

Simon Willnauer commented on LUCENE-2604:
-----------------------------------------

hehe - since regexquery is now in core this can be easily integrated. By skimming through your patch I figured that you can not run parse a query like "/[A-Z]\\/[123]/" (already a valid java string) because of the slash in the regex. I had similar issues in LUCENE-2039 which I can't really remember how I solved them but it would be nice if you could escape the slashes if you wanna search for regexp with those chars.

simon

> add regexpquery to queryparser
> ------------------------------
>
>                 Key: LUCENE-2604
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2604
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: QueryParser
>    Affects Versions: 4.0
>            Reporter: Robert Muir
>         Attachments: LUCENE-2604.patch
>
>
> patch that adds RegexpQuery if you /enter an expression between slashes like this/
> i didnt do the contrib ones but could add it there too if it seems like a good idea.

-- 
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org