Re: Filter query (fq) on comma seperated value does not work
Hi, I think stock example from official ref guide will do the trick. Please see : https://cwiki.apache.org/confluence/display/solr/Tokenizers#Tokenizers-RegularExpressionPatternTokenizer Ahmet On Tuesday, May 17, 2016 8:31 AM, SRINI SOLR wrote: Hi Ahmet / Team - Thanks for your quick response... Can you please help me out on this PatternTokenizer configuration... Here we are using configuration as below ... And also - I have made changes to the field value so that it is separated by space instead of commas and indexed the data as such... And now I was able to retrieve the expected results. But Still Can you help me out in achieving the results using the comma as you suggested. Thanks & Regards On Mon, May 16, 2016 at 5:50 PM, Ahmet Arslan wrote: > Hi, > > Its all about how you tokenize the category field. > It looks like you are using a string type, which does not tokenize at all > (e.g. verbatim) > Please use a PatterTokenizer and configure it so that it splits on comma. > > Ahmet > > > > On Monday, May 16, 2016 2:11 PM, SRINI SOLR wrote: > Hi Team - > Can you please help me out on the following ... > > I have a following field in the solr document which has the comma seperated > values like below .. > > 1,456,768,345 doc1 > 456 doc2 > 1,456 doc3 > > So - Here I need to filter the search docs which contains category is > 456... > when i do like following ... > > fq=category:456 > > it is returning only one document doc2 which has only category is 456. > 456 > > But I need other two also which as this category 456 > > Can you please help me out to achieve this ... > > > Thanks & Regards >
Re: Filter query (fq) on comma seperated value does not work
Hi Ahmet / Team - Thanks for your quick response... Can you please help me out on this PatternTokenizer configuration... Here we are using configuration as below ... And also - I have made changes to the field value so that it is separated by space instead of commas and indexed the data as such... And now I was able to retrieve the expected results. But Still Can you help me out in achieving the results using the comma as you suggested. Thanks & Regards On Mon, May 16, 2016 at 5:50 PM, Ahmet Arslan wrote: > Hi, > > Its all about how you tokenize the category field. > It looks like you are using a string type, which does not tokenize at all > (e.g. verbatim) > Please use a PatterTokenizer and configure it so that it splits on comma. > > Ahmet > > > > On Monday, May 16, 2016 2:11 PM, SRINI SOLR wrote: > Hi Team - > Can you please help me out on the following ... > > I have a following field in the solr document which has the comma seperated > values like below .. > > 1,456,768,345 doc1 > 456 doc2 > 1,456 doc3 > > So - Here I need to filter the search docs which contains category is > 456... > when i do like following ... > > fq=category:456 > > it is returning only one document doc2 which has only category is 456. > 456 > > But I need other two also which as this category 456 > > Can you please help me out to achieve this ... > > > Thanks & Regards >
Re: Filter query (fq) on comma seperated value does not work
Hi, Its all about how you tokenize the category field. It looks like you are using a string type, which does not tokenize at all (e.g. verbatim) Please use a PatterTokenizer and configure it so that it splits on comma. Ahmet On Monday, May 16, 2016 2:11 PM, SRINI SOLR wrote: Hi Team - Can you please help me out on the following ... I have a following field in the solr document which has the comma seperated values like below .. 1,456,768,345 doc1 456 doc2 1,456 doc3 So - Here I need to filter the search docs which contains category is 456... when i do like following ... fq=category:456 it is returning only one document doc2 which has only category is 456. 456 But I need other two also which as this category 456 Can you please help me out to achieve this ... Thanks & Regards
Filter query (fq) on comma seperated value does not work
Hi Team - Can you please help me out on the following ... I have a following field in the solr document which has the comma seperated values like below .. 1,456,768,345 doc1 456 doc2 1,456 doc3 So - Here I need to filter the search docs which contains category is 456... when i do like following ... fq=category:456 it is returning only one document doc2 which has only category is 456. 456 But I need other two also which as this category 456 Can you please help me out to achieve this ... Thanks & Regards