lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <erik.hatc...@gmail.com>
Subject Re: Solr regex query help
Date Sat, 24 Jan 2015 12:08:41 GMT
If you make your field type "string" the regex may work as expected.  

But as others said, splitting into separate fields is likely more flexible. 

    Erik


> On Jan 23, 2015, at 23:58, Arumugam, Suresh <Suresh.Arumugam@emc.com> wrote:
> 
> Hi All,
>  
> We have indexed the documents to Solr & not able to query using the Regex.
>  
> Our data looks like as below in a Text Field, which is indexed using the ClassicTokenizer.
>  
>                 1b ::PIPE:: 04/14/2014 ::PIPE:: 01:32:48 ::PIPE:: BMC Power/Reset action
 ::PIPE:: Delayed shutdown timer disabled ::PIPE:: Asserted
>  
>                 We tried lookup this string with the Regex.
> PIPE*[0-9]{2}\/[0-9}{2}\/[0-9]{4}*Delayed shutdown*Asserted
>  
>                 Since the analyzer tokenized the data, the regex match is happening on
the terms & it’s not working as we expect.
>  
> Can you please help us in finding an equivalent way to query this in Solr ?
>  
> The following are the details about our environment.
>  
> 1.       Solr 4.10.3 as well as Solr 4.8
> 2.       JDK 1.7_51
> 3.       SolrConfig.xml & Schema.xml attached.
>  
> 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 resolving this issue.
>  
> Thanks in advance.
>  
> Regards,
> Suresh.A
> <schema.xml>
> <solrconfig.xml>

Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message