Hmm, if you have some stemming algorithm on that field, [a-z]+works is never going to work but [a-z]+work should. If the field contains Juniper Networks, [a-z]+works is not going to be found due to -s being stripped. But if the field is not tokenized net[a-z]+ is also not going to find anything. You can always test with q=field:/.*/ to prove regex works.
-----Original message----- > From:Anil <anilk...@gmail.com> > Sent: Monday 29th February 2016 14:23 > To: solr-user@lucene.apache.org > Subject: Re: Solr regex documenation > > yes. when i search on juniper networks without regex, i can see the results. > > But when I search on net[a-z]+ , i could not see juniper networks. i have > looked all the documents in the results, could not find it. > > Thank you, > Anil > > On 29 February 2016 at 18:42, Markus Jelsma <markus.jel...@openindex.io> > wrote: > > > Hmm, is the field indexed? A field:/[a-z]%2Bwork/ works fine overhere. > > Markus > > > > -----Original message----- > > > From:Anil <anilk...@gmail.com> > > > Sent: Monday 29th February 2016 13:24 > > > To: solr-user@lucene.apache.org > > > Subject: Re: Solr regex documenation > > > > > > Yes Markus. > > > > > > On 29 February 2016 at 15:54, Markus Jelsma <markus.jel...@openindex.io> > > > wrote: > > > > > > > Hi - do you enclose the regex in slashes? Do you url encode the + sign? > > > > Markus > > > > > > > > > > > > > > > > -----Original message----- > > > > > From:Anil <anilk...@gmail.com> > > > > > Sent: Monday 29th February 2016 7:45 > > > > > To: solr-user@lucene.apache.org > > > > > Subject: Re: Solr regex documenation > > > > > > > > > > HI , > > > > > > > > > > i am using [a-z]+works. i could not see networks in the solr results. > > > > > > > > > > is it regex working properly in solr ? Please clarify. > > > > > > > > > > Regards, > > > > > Anil > > > > > > > > > > > > > > > > > > > > On 27 February 2016 at 20:52, Anil <anilk...@gmail.com> wrote: > > > > > > > > > > > Thanks Jack. > > > > > > > > > > > > On 27 February 2016 at 20:41, Jack Krupansky < > > jack.krupan...@gmail.com > > > > > > > > > > > wrote: > > > > > > > > > > > >> See: > > > > > >> > > > > > >> > > > > > > https://lucene.apache.org/core/5_5_0/core/org/apache/lucene/search/RegexpQuery.html > > > > > >> > > > > > >> > > > > > > https://lucene.apache.org/core/5_5_0/core/org/apache/lucene/util/automaton/RegExp.html > > > > > >> > > > > > >> I vaguely recall a Jira about regex not working at all in Solr. I > > > > don't > > > > > >> recall reading about a resolution. > > > > > >> > > > > > >> > > > > > >> -- Jack Krupansky > > > > > >> > > > > > >> On Sat, Feb 27, 2016 at 7:05 AM, Anil <anilk...@gmail.com> wrote: > > > > > >> > > > > > >> > Hi, > > > > > >> > > > > > > >> > Can some one point me to the solr regex documentation ? > > > > > >> > > > > > > >> > i read it supports all java regex features. i tried ^ and $ , > > > > seems it > > > > > >> is > > > > > >> > not working. > > > > > >> > > > > > > >> > Thanks, > > > > > >> > Anil > > > > > >> > > > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > >