Re: Can I use RegEx function?

2018-07-23 Thread Peter Sh
Right you are. I hadn't been known it during index-time

On Mon, Jul 23, 2018 at 3:43 PM Erik Hatcher  wrote:

> this is best done at index-time.   (it seems like you're trying to avoid
> doing that though)
>
>
>
> > On Jul 23, 2018, at 5:36 AM, Peter Sh  wrote:
> >
> > I want to be able to parse "KEY:VALUE" pairs from my text and have a
> facet
> > representing distribution of VALUES
> >
> > On Mon, Jul 23, 2018 at 12:25 PM Markus Jelsma <
> markus.jel...@openindex.io>
> > wrote:
> >
> >> Hello,
> >>
> >> Neither fl nor facet.field support functions, but facet.query is
> analogous
> >> to the latter. I do not understand what you need/want with fl and regex.
> >>
> >> Regards,
> >> Markus
> >>
> >>
> >>
> >> -Original message-
> >>> From:Peter Sh 
> >>> Sent: Monday 23rd July 2018 11:21
> >>> To: solr-user@lucene.apache.org
> >>> Subject: Re: Can I use RegEx function?
> >>>
> >>> Can I use it in "fl" and  "facet.field" as a function
> >>>
> >>> On Mon, Jul 23, 2018 at 11:33 AM Markus Jelsma <
> >> markus.jel...@openindex.io>
> >>> wrote:
> >>>
> >>>> Hello,
> >>>>
> >>>> The usual faceting works for all queries,
> facet.query=q:field:/[a-z]+$/
> >>>> will probably work too, i would be really surprised if it didn't. Keep
> >> in
> >>>> mind that my example doesn't work, the + needs to be URL encoded!
> >>>>
> >>>> Regards,
> >>>> Markus
> >>>>
> >>>>
> >>>>
> >>>> -Original message-
> >>>>> From:Peter Sh 
> >>>>> Sent: Monday 23rd July 2018 10:26
> >>>>> To: solr-user@lucene.apache.org
> >>>>> Subject: Re: Can I use RegEx function?
> >>>>>
> >>>>> can it be used in facets?
> >>>>>
> >>>>> On Mon, Jul 23, 2018, 11:24 Markus Jelsma <
> >> markus.jel...@openindex.io>
> >>>>> wrote:
> >>>>>
> >>>>>> Hello,
> >>>>>>
> >>>>>> It is not really obvious in documentation, but the standard query
> >>>> parser
> >>>>>> supports regular expressions. Encapsulate your regex with forward
> >>>> slashes
> >>>>>> /, q=field:/[a-z]+$/ will work.
> >>>>>>
> >>>>>> Regards,
> >>>>>> Markus
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> -Original message-
> >>>>>>> From:Peter Sh 
> >>>>>>> Sent: Monday 23rd July 2018 10:09
> >>>>>>> To: solr-user@lucene.apache.org
> >>>>>>> Subject: Can I use RegEx function?
> >>>>>>>
> >>>>>>> I've got collection with a string or text field storing
> >> free-text.
> >>>> I'd
> >>>>>> like
> >>>>>>> to use some RexEx function looking for patterns like "KEY:VALUE"
> >>>> from the
> >>>>>>> text and use it for filtering and faceting.
> >>>>>>>
> >>>>>>
> >>>>>
> >>>>
> >>>
> >>
>
>


Re: Can I use RegEx function?

2018-07-23 Thread Erik Hatcher
this is best done at index-time.   (it seems like you're trying to avoid doing 
that though)



> On Jul 23, 2018, at 5:36 AM, Peter Sh  wrote:
> 
> I want to be able to parse "KEY:VALUE" pairs from my text and have a facet
> representing distribution of VALUES
> 
> On Mon, Jul 23, 2018 at 12:25 PM Markus Jelsma 
> wrote:
> 
>> Hello,
>> 
>> Neither fl nor facet.field support functions, but facet.query is analogous
>> to the latter. I do not understand what you need/want with fl and regex.
>> 
>> Regards,
>> Markus
>> 
>> 
>> 
>> -Original message-
>>> From:Peter Sh 
>>> Sent: Monday 23rd July 2018 11:21
>>> To: solr-user@lucene.apache.org
>>> Subject: Re: Can I use RegEx function?
>>> 
>>> Can I use it in "fl" and  "facet.field" as a function
>>> 
>>> On Mon, Jul 23, 2018 at 11:33 AM Markus Jelsma <
>> markus.jel...@openindex.io>
>>> wrote:
>>> 
>>>> Hello,
>>>> 
>>>> The usual faceting works for all queries, facet.query=q:field:/[a-z]+$/
>>>> will probably work too, i would be really surprised if it didn't. Keep
>> in
>>>> mind that my example doesn't work, the + needs to be URL encoded!
>>>> 
>>>> Regards,
>>>> Markus
>>>> 
>>>> 
>>>> 
>>>> -Original message-
>>>>> From:Peter Sh 
>>>>> Sent: Monday 23rd July 2018 10:26
>>>>> To: solr-user@lucene.apache.org
>>>>> Subject: Re: Can I use RegEx function?
>>>>> 
>>>>> can it be used in facets?
>>>>> 
>>>>> On Mon, Jul 23, 2018, 11:24 Markus Jelsma <
>> markus.jel...@openindex.io>
>>>>> wrote:
>>>>> 
>>>>>> Hello,
>>>>>> 
>>>>>> It is not really obvious in documentation, but the standard query
>>>> parser
>>>>>> supports regular expressions. Encapsulate your regex with forward
>>>> slashes
>>>>>> /, q=field:/[a-z]+$/ will work.
>>>>>> 
>>>>>> Regards,
>>>>>> Markus
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> -Original message-
>>>>>>> From:Peter Sh 
>>>>>>> Sent: Monday 23rd July 2018 10:09
>>>>>>> To: solr-user@lucene.apache.org
>>>>>>> Subject: Can I use RegEx function?
>>>>>>> 
>>>>>>> I've got collection with a string or text field storing
>> free-text.
>>>> I'd
>>>>>> like
>>>>>>> to use some RexEx function looking for patterns like "KEY:VALUE"
>>>> from the
>>>>>>> text and use it for filtering and faceting.
>>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>> 
>> 



Re: Can I use RegEx function?

2018-07-23 Thread Peter Sh
I want to be able to parse "KEY:VALUE" pairs from my text and have a facet
representing distribution of VALUES

On Mon, Jul 23, 2018 at 12:25 PM Markus Jelsma 
wrote:

> Hello,
>
> Neither fl nor facet.field support functions, but facet.query is analogous
> to the latter. I do not understand what you need/want with fl and regex.
>
> Regards,
> Markus
>
>
>
> -Original message-
> > From:Peter Sh 
> > Sent: Monday 23rd July 2018 11:21
> > To: solr-user@lucene.apache.org
> > Subject: Re: Can I use RegEx function?
> >
> > Can I use it in "fl" and  "facet.field" as a function
> >
> > On Mon, Jul 23, 2018 at 11:33 AM Markus Jelsma <
> markus.jel...@openindex.io>
> > wrote:
> >
> > > Hello,
> > >
> > > The usual faceting works for all queries, facet.query=q:field:/[a-z]+$/
> > > will probably work too, i would be really surprised if it didn't. Keep
> in
> > > mind that my example doesn't work, the + needs to be URL encoded!
> > >
> > > Regards,
> > > Markus
> > >
> > >
> > >
> > > -Original message-
> > > > From:Peter Sh 
> > > > Sent: Monday 23rd July 2018 10:26
> > > > To: solr-user@lucene.apache.org
> > > > Subject: Re: Can I use RegEx function?
> > > >
> > > > can it be used in facets?
> > > >
> > > > On Mon, Jul 23, 2018, 11:24 Markus Jelsma <
> markus.jel...@openindex.io>
> > > > wrote:
> > > >
> > > > > Hello,
> > > > >
> > > > > It is not really obvious in documentation, but the standard query
> > > parser
> > > > > supports regular expressions. Encapsulate your regex with forward
> > > slashes
> > > > > /, q=field:/[a-z]+$/ will work.
> > > > >
> > > > > Regards,
> > > > > Markus
> > > > >
> > > > >
> > > > >
> > > > > -Original message-
> > > > > > From:Peter Sh 
> > > > > > Sent: Monday 23rd July 2018 10:09
> > > > > > To: solr-user@lucene.apache.org
> > > > > > Subject: Can I use RegEx function?
> > > > > >
> > > > > > I've got collection with a string or text field storing
> free-text.
> > > I'd
> > > > > like
> > > > > > to use some RexEx function looking for patterns like "KEY:VALUE"
> > > from the
> > > > > > text and use it for filtering and faceting.
> > > > > >
> > > > >
> > > >
> > >
> >
>


RE: Can I use RegEx function?

2018-07-23 Thread Markus Jelsma
Hello,

Neither fl nor facet.field support functions, but facet.query is analogous to 
the latter. I do not understand what you need/want with fl and regex.

Regards,
Markus

 
 
-Original message-
> From:Peter Sh 
> Sent: Monday 23rd July 2018 11:21
> To: solr-user@lucene.apache.org
> Subject: Re: Can I use RegEx function?
> 
> Can I use it in "fl" and  "facet.field" as a function
> 
> On Mon, Jul 23, 2018 at 11:33 AM Markus Jelsma 
> wrote:
> 
> > Hello,
> >
> > The usual faceting works for all queries, facet.query=q:field:/[a-z]+$/
> > will probably work too, i would be really surprised if it didn't. Keep in
> > mind that my example doesn't work, the + needs to be URL encoded!
> >
> > Regards,
> > Markus
> >
> >
> >
> > -Original message-----
> > > From:Peter Sh 
> > > Sent: Monday 23rd July 2018 10:26
> > > To: solr-user@lucene.apache.org
> > > Subject: Re: Can I use RegEx function?
> > >
> > > can it be used in facets?
> > >
> > > On Mon, Jul 23, 2018, 11:24 Markus Jelsma 
> > > wrote:
> > >
> > > > Hello,
> > > >
> > > > It is not really obvious in documentation, but the standard query
> > parser
> > > > supports regular expressions. Encapsulate your regex with forward
> > slashes
> > > > /, q=field:/[a-z]+$/ will work.
> > > >
> > > > Regards,
> > > > Markus
> > > >
> > > >
> > > >
> > > > -Original message-
> > > > > From:Peter Sh 
> > > > > Sent: Monday 23rd July 2018 10:09
> > > > > To: solr-user@lucene.apache.org
> > > > > Subject: Can I use RegEx function?
> > > > >
> > > > > I've got collection with a string or text field storing free-text.
> > I'd
> > > > like
> > > > > to use some RexEx function looking for patterns like "KEY:VALUE"
> > from the
> > > > > text and use it for filtering and faceting.
> > > > >
> > > >
> > >
> >
> 


Re: Can I use RegEx function?

2018-07-23 Thread Peter Sh
Can I use it in "fl" and  "facet.field" as a function

On Mon, Jul 23, 2018 at 11:33 AM Markus Jelsma 
wrote:

> Hello,
>
> The usual faceting works for all queries, facet.query=q:field:/[a-z]+$/
> will probably work too, i would be really surprised if it didn't. Keep in
> mind that my example doesn't work, the + needs to be URL encoded!
>
> Regards,
> Markus
>
>
>
> -Original message-
> > From:Peter Sh 
> > Sent: Monday 23rd July 2018 10:26
> > To: solr-user@lucene.apache.org
> > Subject: Re: Can I use RegEx function?
> >
> > can it be used in facets?
> >
> > On Mon, Jul 23, 2018, 11:24 Markus Jelsma 
> > wrote:
> >
> > > Hello,
> > >
> > > It is not really obvious in documentation, but the standard query
> parser
> > > supports regular expressions. Encapsulate your regex with forward
> slashes
> > > /, q=field:/[a-z]+$/ will work.
> > >
> > > Regards,
> > > Markus
> > >
> > >
> > >
> > > -Original message-
> > > > From:Peter Sh 
> > > > Sent: Monday 23rd July 2018 10:09
> > > > To: solr-user@lucene.apache.org
> > > > Subject: Can I use RegEx function?
> > > >
> > > > I've got collection with a string or text field storing free-text.
> I'd
> > > like
> > > > to use some RexEx function looking for patterns like "KEY:VALUE"
> from the
> > > > text and use it for filtering and faceting.
> > > >
> > >
> >
>


RE: Can I use RegEx function?

2018-07-23 Thread Markus Jelsma
Hello,

The usual faceting works for all queries, facet.query=q:field:/[a-z]+$/ will 
probably work too, i would be really surprised if it didn't. Keep in mind that 
my example doesn't work, the + needs to be URL encoded!

Regards,
Markus

 
 
-Original message-
> From:Peter Sh 
> Sent: Monday 23rd July 2018 10:26
> To: solr-user@lucene.apache.org
> Subject: Re: Can I use RegEx function?
> 
> can it be used in facets?
> 
> On Mon, Jul 23, 2018, 11:24 Markus Jelsma 
> wrote:
> 
> > Hello,
> >
> > It is not really obvious in documentation, but the standard query parser
> > supports regular expressions. Encapsulate your regex with forward slashes
> > /, q=field:/[a-z]+$/ will work.
> >
> > Regards,
> > Markus
> >
> >
> >
> > -Original message-
> > > From:Peter Sh 
> > > Sent: Monday 23rd July 2018 10:09
> > > To: solr-user@lucene.apache.org
> > > Subject: Can I use RegEx function?
> > >
> > > I've got collection with a string or text field storing free-text. I'd
> > like
> > > to use some RexEx function looking for patterns like "KEY:VALUE" from the
> > > text and use it for filtering and faceting.
> > >
> >
> 


Re: Can I use RegEx function?

2018-07-23 Thread Peter Sh
can it be used in facets?

On Mon, Jul 23, 2018, 11:24 Markus Jelsma 
wrote:

> Hello,
>
> It is not really obvious in documentation, but the standard query parser
> supports regular expressions. Encapsulate your regex with forward slashes
> /, q=field:/[a-z]+$/ will work.
>
> Regards,
> Markus
>
>
>
> -Original message-
> > From:Peter Sh 
> > Sent: Monday 23rd July 2018 10:09
> > To: solr-user@lucene.apache.org
> > Subject: Can I use RegEx function?
> >
> > I've got collection with a string or text field storing free-text. I'd
> like
> > to use some RexEx function looking for patterns like "KEY:VALUE" from the
> > text and use it for filtering and faceting.
> >
>


RE: Can I use RegEx function?

2018-07-23 Thread Markus Jelsma
Hello,

It is not really obvious in documentation, but the standard query parser 
supports regular expressions. Encapsulate your regex with forward slashes /, 
q=field:/[a-z]+$/ will work.

Regards,
Markus

 
 
-Original message-
> From:Peter Sh 
> Sent: Monday 23rd July 2018 10:09
> To: solr-user@lucene.apache.org
> Subject: Can I use RegEx function?
> 
> I've got collection with a string or text field storing free-text. I'd like
> to use some RexEx function looking for patterns like "KEY:VALUE" from the
> text and use it for filtering and faceting.
> 


Can I use RegEx function?

2018-07-23 Thread Peter Sh
I've got collection with a string or text field storing free-text. I'd like
to use some RexEx function looking for patterns like "KEY:VALUE" from the
text and use it for filtering and faceting.