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 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 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 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.
> >
>


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.


Streaming Expressions (/stream) StreamHandler java.lang.NullPointerException

2016-06-25 Thread Peter Sh
I've got an exception below running
curl --data-urlencode
'expr=search(EventsAndDCF,q="*:*",fl="AccessPath",sort="AccessPath
asc",qt="/export")' "http://localhost:8983/solr/EventsAndDCF/stream";
Solr responce:
{"result-set":{"docs":[
{"EXCEPTION":null,"EOF":true}]}}


My collection EventsAndDCF exists. and I succeed to run GET queries like:
http://localhost:8983/solr/EventsAndDCF/export?fl=AccessPath&q=*:*&sort=AccessPath
desc&wt=json

Solr version: 6.0.1. Single node



2016-06-25 21:15:44.147 ERROR (qtp1514322932-16) [   x:EventsAndDCF]
o.a.s.h.StreamHandler java.lang.NullPointerException
at
org.apache.solr.client.solrj.io.stream.expr.StreamExpressionParser.generateStreamExpression(StreamExpressionParser.java:46)
at
org.apache.solr.client.solrj.io.stream.expr.StreamExpressionParser.parse(StreamExpressionParser.java:37)
at
org.apache.solr.client.solrj.io.stream.expr.StreamFactory.constructStream(StreamFactory.java:178)
at
org.apache.solr.handler.StreamHandler.handleRequestBody(StreamHandler.java:164)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:155)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:2053)
at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:652)
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:460)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:229)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:184)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1160)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1092)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
at org.eclipse.jetty.server.Server.handle(Server.java:518)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)
at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244)
at
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at
org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
at
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:246)
at
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:156)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
at java.lang.Thread.run(Unknown Source)

2016-06-25 21:15:44.147 INFO  (qtp1514322932-16) [   x:EventsAndDCF]
o.a.s.c.S.Request [EventsAndDCF]  webapp=/solr path=/stream
params={'expr=search(EventsAndDCF,q%3D*:*,fl%3DAccessPath,sort%3DAccessPath+asc,qt%3D/export)'}
status=0 QTime=2