[ 
https://issues.apache.org/jira/browse/SOLR-7026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14290350#comment-14290350
 ] 

Erick Erickson commented on SOLR-7026:
--------------------------------------

Please raise issues like this on the user's list rather than a JIRA, You'll get 
more help faster there.
See the "mailing list" link here: 
http://lucene.apache.org/solr/resources.html#community

We try to reserve the JIRAs for discussion of code changes, not usage.

In your case the problem is almost certainly that regexes are applied to each 
_term_, not the
whole input line, the input is broken up by the tokenizer into something like 
this, note that
I don't know from memory how StandadTokenizer will deal with odd characters...:
1b 
PIPE
04/14/2014 
PIPE
01:32:48
PIPE
BMC
Power/Reset
action 

Anyway, your regex is applied to the individual tokens not the whole thing so 
of course it's failing.

This really sounds like an XY problem, you probably shouldn't be using regexes 
here. Phrase
queries, standard query syntax, etc. would probably be more appropriate.

I'll close this issue since it's a usage problem IMO, please direct additional 
questions to the
user's list.

> Solr 4.8.0/4.10.3 - is not working for the Regex Query matches
> --------------------------------------------------------------
>
>                 Key: SOLR-7026
>                 URL: https://issues.apache.org/jira/browse/SOLR-7026
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 4.8, 4.10.3
>         Environment: Redhat Linux, JDK 1.7.0_51
>            Reporter: Suresh Arumuam
>            Priority: Blocker
>         Attachments: schema.xml, solrconfig.xml
>
>
> We are trying to use regex queries in the Solr Document, which is not working 
> more than one word.
> While trying to implement the Plain text search for our system outputs to the 
> Solr, the regex not seems to be working with Solr.
> Our config is as below.
>    Analyzer tried.
>              solr.StandardTokenizerFactory
>              solr.ClassicTokenizerFactory
> Sample Data indexed in the text field is as below.
> 1b ::PIPE:: 04/14/2014 ::PIPE:: 01:32:48 ::PIPE:: BMC Power/Reset action  
> ::PIPE:: Delayed shutdown timer disabled ::PIPE:: Asserted
> Pattern tried:
> PIPE*[0-9]{2}\/[0-9}{2}\/[0-9]{4}*Delayed shutdown*Asserted
> The regex query as below is working
>      msg:/[0-9]{2}/
> But when we want to match more than one terms the regex doesn't seems to be 
> working.
> Please help us in this issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to