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 <peshash...@gmail.com> 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 <peshash...@gmail.com>
>>> 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 <peshash...@gmail.com>
>>>>> 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 <peshash...@gmail.com>
>>>>>>> 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.
>>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>> 
>> 

Reply via email to