Re: Custom field using PatternCaptureGroupFilterFactory

2016-03-07 Thread Jack Krupansky
Great. And you shouldn't need the "{1}" - the square brackets match a single character by definition. -- Jack Krupansky On Mon, Mar 7, 2016 at 12:20 PM, Jay Potharaju wrote: > Thanks Jack, the problem was my regex. Following regex worked. > "([a-zA-Z0-9]{1})" preserve_original="false"/> > Jay

Re: Custom field using PatternCaptureGroupFilterFactory

2016-03-07 Thread Jay Potharaju
Thanks Jack, the problem was my regex. Following regex worked. Jay On Sun, Mar 6, 2016 at 7:43 PM, Jack Krupansky wrote: > The filter name, "Capture Group", says it all - only pattern groups are > captured and you have not specified even a single group. See the example: > > http://www.solr-star

Re: Custom field using PatternCaptureGroupFilterFactory

2016-03-06 Thread Jack Krupansky
The filter name, "Capture Group", says it all - only pattern groups are captured and you have not specified even a single group. See the example: http://www.solr-start.com/javadoc/solr-lucene/org/apache/lucene/analysis/pattern/PatternCaptureGroupFilterFactory.html Groups are each enclosed within p

Re: Custom field using PatternCaptureGroupFilterFactory

2016-03-06 Thread Alexandre Rafalovitch
I don't see the brackets that mark the group you actually want to capture. As per: http://www.solr-start.com/javadoc/solr-lucene/org/apache/lucene/analysis/pattern/PatternCaptureGroupTokenFilter.html I am also not sure if you actually need "{0,1}" part. Regards, Alex. Newsletter and resou

Re: Custom field using PatternCaptureGroupFilterFactory

2016-03-06 Thread Jay Potharaju
On the analysis screen I see the following. Not sure why the regex didnt work. Any suggestions? Thanks KT text raw_bytes start end positionLength type position test [74 65 73 74] 0 4 1 word 1 UCF text raw_bytes start end positionLength type position TEST [54 45 53 54] 0 4 1 word 1 PCGTF text raw_b

Re: Custom field using PatternCaptureGroupFilterFactory

2016-03-06 Thread Binoy Dalal
What do you see under the analysis screen in the solr admin UI? On Sun, Mar 6, 2016 at 10:55 PM Jay Potharaju wrote: > Hi, > I have a custom field for getting the first letter of an firstname. For > this I am using PatternCaptureGroupFilterFactory. > This is not working as expected, not able to

Custom field using PatternCaptureGroupFilterFactory

2016-03-06 Thread Jay Potharaju
Hi, I have a custom field for getting the first letter of an firstname. For this I am using PatternCaptureGroupFilterFactory. This is not working as expected, not able to parse the data and get the first character for the string. Any suggestions on how to fix this?