Re: NullPointerException in Graph Traversal nodes streaming expression

2021-01-26 Thread Joel Bernstein
How are you constructing the Stream with classes or using a Streaming
Expression?

In either case can you post either the code or expression?

Are there more errors in the logs? The place where this NPE is occurring is
that an underlying stream is null, which leads me to believe there would be
some exceptions before this, possibly on a different server if this has
multiple servers involved.

Joel Bernstein
http://joelsolr.blogspot.com/


On Thu, Jan 21, 2021 at 5:46 PM Mike Drob  wrote:

> Can you provide a sample expression that would be able to reproduce this?
> Are you able to try a newer version by chance - I know we've fixed a few
> NPEs recently, maybe https://issues.apache.org/jira/browse/SOLR-14700
>
> On Thu, Jan 21, 2021 at 4:13 PM ufuk yılmaz 
> wrote:
>
> > Solr version 8.4. I’m getting an unexplanetory NullPointerException when
> > executing a simple 2 level nodes stream, do you have any idea what may
> > cause this?
> >
> > I tried setting /stream?partialResults=true&shards.tolerant=true and
> > shards.tolerant=true in nodes expressions, with no luck. I also tried
> > reading source of GatherNodesStream in branch 8_4, but couldn’t
> understand
> > it. Here is a beautiful stack trace:
> >
> > solr| 2021-01-21 22:00:12.726 ERROR (qtp832292933-25149)
> > [c:WorkerCollection s:shard1 r:core_node10
> > x:WorkerCollection_shard1_replica_n9] o.a.s.c.s.i.s.ExceptionStream
> > java.lang.RuntimeException: java.util.concurrent.ExecutionException:
> > java.lang.RuntimeException: java.lang.NullPointerException
> > solr|   at
> >
> org.apache.solr.client.solrj.io.graph.GatherNodesStream.read(GatherNodesStream.java:607)
> > solr|   at
> >
> org.apache.solr.client.solrj.io.stream.ExceptionStream.read(ExceptionStream.java:71)
> > solr|   at
> >
> org.apache.solr.handler.StreamHandler$TimerStream.read(StreamHandler.java:454)
> > solr|   at
> >
> org.apache.solr.client.solrj.io.stream.TupleStream.lambda$writeMap$0(TupleStream.java:84)
> > solr|   at
> >
> org.apache.solr.common.util.JsonTextWriter.writeIterator(JsonTextWriter.java:141)
> > solr|   at
> > org.apache.solr.common.util.TextWriter.writeVal(TextWriter.java:67)
> > solr|   at
> >
> org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:152)
> > solr|   at
> > org.apache.solr.common.util.JsonTextWriter$2.put(JsonTextWriter.java:176)
> > solr|   at
> >
> org.apache.solr.client.solrj.io.stream.TupleStream.writeMap(TupleStream.java:81)
> > solr|   at
> >
> org.apache.solr.common.util.JsonTextWriter.writeMap(JsonTextWriter.java:164)
> > solr|   at
> > org.apache.solr.common.util.TextWriter.writeVal(TextWriter.java:69)
> > solr|   at
> >
> org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:152)
> > solr|   at
> >
> org.apache.solr.common.util.JsonTextWriter.writeNamedListAsMapWithDups(JsonTextWriter.java:386)
> > solr|   at
> >
> org.apache.solr.common.util.JsonTextWriter.writeNamedList(JsonTextWriter.java:292)
> > solr|   at
> > org.apache.solr.response.JSONWriter.writeResponse(JSONWriter.java:73)
> > solr|   at
> >
> org.apache.solr.response.JSONResponseWriter.write(JSONResponseWriter.java:66)
> > solr|   at
> >
> org.apache.solr.response.QueryResponseWriterUtil.writeQueryResponse(QueryResponseWriterUtil.java:65)
> > solr|   at
> > org.apache.solr.servlet.HttpSolrCall.writeResponse(HttpSolrCall.java:892)
> > solr|   at
> > org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:594)
> > solr|   at
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:419)
> > solr|   at
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:351)
> > solr|   at
> >
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
> > solr|   at
> >
> org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:311)
> > solr|   at
> >
> org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:265)
> > solr|   at
> >
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)
> > solr|   at
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
> > solr|   at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
> > solr|   at
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
> > solr|   at
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
> > solr|   at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
> > solr|   at
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1711)
> > solr|   at
> >
> org.eclipse.jetty.server.handler.ScopedHandl

Re: NullPointerException in Graph Traversal nodes streaming expression

2021-01-21 Thread Mike Drob
Can you provide a sample expression that would be able to reproduce this?
Are you able to try a newer version by chance - I know we've fixed a few
NPEs recently, maybe https://issues.apache.org/jira/browse/SOLR-14700

On Thu, Jan 21, 2021 at 4:13 PM ufuk yılmaz 
wrote:

> Solr version 8.4. I’m getting an unexplanetory NullPointerException when
> executing a simple 2 level nodes stream, do you have any idea what may
> cause this?
>
> I tried setting /stream?partialResults=true&shards.tolerant=true and
> shards.tolerant=true in nodes expressions, with no luck. I also tried
> reading source of GatherNodesStream in branch 8_4, but couldn’t understand
> it. Here is a beautiful stack trace:
>
> solr| 2021-01-21 22:00:12.726 ERROR (qtp832292933-25149)
> [c:WorkerCollection s:shard1 r:core_node10
> x:WorkerCollection_shard1_replica_n9] o.a.s.c.s.i.s.ExceptionStream
> java.lang.RuntimeException: java.util.concurrent.ExecutionException:
> java.lang.RuntimeException: java.lang.NullPointerException
> solr|   at
> org.apache.solr.client.solrj.io.graph.GatherNodesStream.read(GatherNodesStream.java:607)
> solr|   at
> org.apache.solr.client.solrj.io.stream.ExceptionStream.read(ExceptionStream.java:71)
> solr|   at
> org.apache.solr.handler.StreamHandler$TimerStream.read(StreamHandler.java:454)
> solr|   at
> org.apache.solr.client.solrj.io.stream.TupleStream.lambda$writeMap$0(TupleStream.java:84)
> solr|   at
> org.apache.solr.common.util.JsonTextWriter.writeIterator(JsonTextWriter.java:141)
> solr|   at
> org.apache.solr.common.util.TextWriter.writeVal(TextWriter.java:67)
> solr|   at
> org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:152)
> solr|   at
> org.apache.solr.common.util.JsonTextWriter$2.put(JsonTextWriter.java:176)
> solr|   at
> org.apache.solr.client.solrj.io.stream.TupleStream.writeMap(TupleStream.java:81)
> solr|   at
> org.apache.solr.common.util.JsonTextWriter.writeMap(JsonTextWriter.java:164)
> solr|   at
> org.apache.solr.common.util.TextWriter.writeVal(TextWriter.java:69)
> solr|   at
> org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:152)
> solr|   at
> org.apache.solr.common.util.JsonTextWriter.writeNamedListAsMapWithDups(JsonTextWriter.java:386)
> solr|   at
> org.apache.solr.common.util.JsonTextWriter.writeNamedList(JsonTextWriter.java:292)
> solr|   at
> org.apache.solr.response.JSONWriter.writeResponse(JSONWriter.java:73)
> solr|   at
> org.apache.solr.response.JSONResponseWriter.write(JSONResponseWriter.java:66)
> solr|   at
> org.apache.solr.response.QueryResponseWriterUtil.writeQueryResponse(QueryResponseWriterUtil.java:65)
> solr|   at
> org.apache.solr.servlet.HttpSolrCall.writeResponse(HttpSolrCall.java:892)
> solr|   at
> org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:594)
> solr|   at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:419)
> solr|   at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:351)
> solr|   at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
> solr|   at
> org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:311)
> solr|   at
> org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:265)
> solr|   at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)
> solr|   at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
> solr|   at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
> solr|   at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
> solr|   at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
> solr|   at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
> solr|   at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1711)
> solr|   at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
> solr|   at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1347)
> solr|   at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
> solr|   at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
> solr|   at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1678)
> solr|   at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
> solr|   at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1249)
> solr|   at
> org.eclipse.jetty.server.handler.

Re: NullPointerException when select query on multiple IDs after splitting a shard

2020-09-03 Thread Erick Erickson
that syntax isn’t isn’t a syntax that Solr recognize intentionally at all.
At very best, the select handler is using the default field (if it’s defined).

Although not having a “q” parameter means all bets are off. On a local copy of 
7.3
I have lying around I get a valid response, but using a MatchNoDocsQuery
(added &debug=query to something similar) so it finds no documents. And no
NPE even with a sharded collection.

What probably happened after you split the shard was that the sub-requests were
being sent slightly differently than the input. When a collection has more than 
one
shard, a subrequest is sent out to one replica of each shard. Apparently the 
syntax
you’re using doesn’t quite survive that process unscathed.

So your single-shard happened to be working with incorrect syntax by chance.

It’d be interesting to see how the query worked, if you have a copy of your
single-shard setup working try adding &debug=query to the url, the return
should have the parsed query which would be informative.

Best,
Erick

> On Sep 3, 2020, at 2:04 PM, Louis  wrote:
> 
> Yes, we are sure that this is not typo.
> 
> Actually we did more experiments and found that
> 
> 1) https://hostname:8983/solr/my_collection/select?ids=169455599|1
> 2) https://hostname:8983/solr/my_collection/select?q=id:169455599|1 
> 3) https://hostname:8983/solr/my_collection/get?ids=169455599|1 
> 
> 1) throws NPE, but 2) and 3) is working.
> 
> However 1) is also working with one shard in the same collection which I
> backed up before splitting a shard
> 
> It looks very weird and we are wondering about missing any config. 
> 
> Or, 1) is the type of the syntax Solr discourages to use?
> 
> 
> 
> 
> --
> Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html



Re: NullPointerException when select query on multiple IDs after splitting a shard

2020-09-03 Thread Louis
Yes, we are sure that this is not typo.

Actually we did more experiments and found that

1) https://hostname:8983/solr/my_collection/select?ids=169455599|1
2) https://hostname:8983/solr/my_collection/select?q=id:169455599|1 
3) https://hostname:8983/solr/my_collection/get?ids=169455599|1 

1) throws NPE, but 2) and 3) is working.

However 1) is also working with one shard in the same collection which I
backed up before splitting a shard

It looks very weird and we are wondering about missing any config. 

Or, 1) is the type of the syntax Solr discourages to use?




--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: NullPointerException when select query on multiple IDs after splitting a shard

2020-09-03 Thread Erick Erickson
Hmm, an NPE is weird in any case, but assuming “ids” is a field, your syntax
is wrong
q=ids:111|222

or 
q=ids: (111 222) would do too.

Are you sure you used this syntax before? Or is it a typo?
Erick

> On Sep 3, 2020, at 1:02 PM, Louis  wrote:
> 
> We are using SolrCloud 7.7.2 and having some trouble with multi shards.
> 
> The initial number of shards in the collection was one(and 3 replica), and
> we have recently split a shard into 4 shards(and 3 replica for each shard)
> by using API call :
> /admin/collections?action=SPLITSHARD&collection=name&shard=shardID
> 
> And now this query,
> "https://hostname:8983/solr/my_collection/select?ids=169455599|1" , is
> returning NPE, which was working before multi shards.
> 
> Could you please give any advice on why select query on multiple IDs doesn't
> work after shart splitting?
> 
> 
> null:java.lang.NullPointerException
>   at
> org.apache.solr.handler.component.QueryComponent.unmarshalSortValues(QueryComponent.java:1034)
>   at
> org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:885)
>   at
> org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:585)
>   at
> org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:564)
>   at
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:426)
>   at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
>   at org.apache.solr.core.SolrCore.execute(SolrCore.java:2551)
>   at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:710)
>   at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:516)
>   at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:395)
>   at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:341)
>   at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)
>   at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
>   at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
>   at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
>   at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
>   at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
>   at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1588)
>   at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
>   at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)
>   at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
>   at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
>   at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1557)
>   at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
>   at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)
>   at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
>   at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:220)
>   at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
>   at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
>   at
> org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
>   at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
>   at org.eclipse.jetty.server.Server.handle(Server.java:502)
>   at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)
>   at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
>   at
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
>   at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
>   at
> org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:411)
>   at
> org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:305)
>   at
> org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:159)
>   at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
>   at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
>   at
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
>   at
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
>   at
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
>   at
> org.eclipse.jetty.util.t

Re: NullPointerException with ExpandComponent on Collapsed Null Values

2019-06-04 Thread Joel Bernstein
This should be considered a bug. Feel free file jira for this.



Joel Bernstein
http://joelsolr.blogspot.com/


On Tue, Jun 4, 2019 at 9:16 AM aus...@3bx.org.INVALID
 wrote:

> Just wanted to provide a bit more information on this issue after
> experimenting a bit more.
>
> The error I've described below only seems to occur when I'm
> collapsing/expanding on an integer field.  If I switch the field type to a
> string, no errors occur if there are missing field values within the
> document set.  For now, this seems to be a workaround, but I'd be curious
> if there is an issue or something I missed when trying to use this feature
> with integers.
>
>
> On Tue, May 28, 2019 at 3:22 PM aus...@3bx.org  wrote:
>
> > Hi all,
> >
> >
> >
> > I’m currently running 7.5.0 and am looking to use the collapse and expand
> > results functionality.
> >
> >
> >
> > The field I’m attempting to collapse on is an “int” field that isn’t
> > required, and I’m using a null policy of expand to create a unique group
> > for each document that has a missing field.   The majority of documents
> *are
> > *missing this field at this time.
> >
> >
> >
> > I’m running into a NullPointerException on the response from within the
> > ExpandComponent.  I’ve also tried the grouping with a field where I’ve
> > generated an ID (to cause the field to never be null), which seems to
> > resolve the issue.  I’m wondering if there’s some type of issue with how
> > Solr is handling the expansion of these null records.
> >
> >
> >
> > Any thoughts?
> >
> >
> >
> >
> >
> > Here’s an example request:
> >
> >
> >
> >
> >
> https://localhost:8985/solr/products/select?fq=%7B!collapse%20field%3DGroupId_i%20nullPolicy%3Dexpand%7D&qf=Name%5E100&start=0&rows=5&version=2.2&q=test&expand=true&expand.rows=1&sort=score%20desc&fl=ItemId
> >
> >
> >
> > … and the response
> >
> >
> >
> > 
> >
> > 
> >
> >
> >
> >   true
> >
> >   500
> >
> >   19
> >
> >   
> >
> >  test
> >
> >  true
> >
> >  1
> >
> >  Name^100
> >
> >  ItemId
> >
> >  0
> >
> >  {!collapse field=GroupId_i
> nullPolicy=expand}
> >
> >  score desc
> >
> >  5
> >
> >  2.2
> >
> >   
> >
> >
> >
> >
> >
> >   
> >
> >  186209
> >
> >   
> >
> >   
> >
> >  3516830
> >
> >   
> >
> >   
> >
> >  9764413
> >
> >   
> >
> >   
> >
> >  9764705
> >
> >   
> >
> >   
> >
> > 9764767
> >
> >   
> >
> >
> >
> >
> >
> >   java.lang.NullPointerException
> >
> > at
> >
> org.apache.solr.handler.component.ExpandComponent.process(ExpandComponent.java:351)
> >
> > at
> >
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:298)
> >
> > at
> >
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
> >
> > at org.apache.solr.core.SolrCore.execute(SolrCore.java:2541)
> >
> > at
> > org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:709)
> >
> > at
> org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:515)
> >
> > at
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:377)
> >
> > at
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:323)
> >
> > at
> >
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634)
> >
> > at
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
> >
> > at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
> >
> > at
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
> >
> > at
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
> >
> > at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
> >
> > at
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
> >
> > at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
> >
> > at
> >
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317)
> >
> > at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
> >
> > at
> > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
> >
> > at
> >
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
> >
> > at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
> >
> > at
> >
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219)
> >
> > at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
> >
> > at
> 

Re: NullPointerException with ExpandComponent on Collapsed Null Values

2019-06-04 Thread aus...@3bx.org.INVALID
Just wanted to provide a bit more information on this issue after
experimenting a bit more.

The error I've described below only seems to occur when I'm
collapsing/expanding on an integer field.  If I switch the field type to a
string, no errors occur if there are missing field values within the
document set.  For now, this seems to be a workaround, but I'd be curious
if there is an issue or something I missed when trying to use this feature
with integers.


On Tue, May 28, 2019 at 3:22 PM aus...@3bx.org  wrote:

> Hi all,
>
>
>
> I’m currently running 7.5.0 and am looking to use the collapse and expand
> results functionality.
>
>
>
> The field I’m attempting to collapse on is an “int” field that isn’t
> required, and I’m using a null policy of expand to create a unique group
> for each document that has a missing field.   The majority of documents *are
> *missing this field at this time.
>
>
>
> I’m running into a NullPointerException on the response from within the
> ExpandComponent.  I’ve also tried the grouping with a field where I’ve
> generated an ID (to cause the field to never be null), which seems to
> resolve the issue.  I’m wondering if there’s some type of issue with how
> Solr is handling the expansion of these null records.
>
>
>
> Any thoughts?
>
>
>
>
>
> Here’s an example request:
>
>
>
>
> https://localhost:8985/solr/products/select?fq=%7B!collapse%20field%3DGroupId_i%20nullPolicy%3Dexpand%7D&qf=Name%5E100&start=0&rows=5&version=2.2&q=test&expand=true&expand.rows=1&sort=score%20desc&fl=ItemId
>
>
>
> … and the response
>
>
>
> 
>
> 
>
>
>
>   true
>
>   500
>
>   19
>
>   
>
>  test
>
>  true
>
>  1
>
>  Name^100
>
>  ItemId
>
>  0
>
>  {!collapse field=GroupId_i nullPolicy=expand}
>
>  score desc
>
>  5
>
>  2.2
>
>   
>
>
>
>
>
>   
>
>  186209
>
>   
>
>   
>
>  3516830
>
>   
>
>   
>
>  9764413
>
>   
>
>   
>
>  9764705
>
>   
>
>   
>
> 9764767
>
>   
>
>
>
>
>
>   java.lang.NullPointerException
>
> at
> org.apache.solr.handler.component.ExpandComponent.process(ExpandComponent.java:351)
>
> at
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:298)
>
> at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
>
> at org.apache.solr.core.SolrCore.execute(SolrCore.java:2541)
>
> at
> org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:709)
>
> at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:515)
>
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:377)
>
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:323)
>
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634)
>
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
>
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
>
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
>
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
>
> at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
>
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
>
> at
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
>
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317)
>
> at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
>
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
>
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
>
> at
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
>
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219)
>
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
>
> at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:219)
>
> at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
>
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
>
> at
> org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
>
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
>
> at org.eclipse.jetty.server.Server.handle(Server.java:531)
>
> at
> org.eclipse.jetty.server.HttpChanne

Re: NullPointerException at org.apache.solr.handler.component.TermVectorComponent.process(TermVectorComponent.java:324)

2018-07-18 Thread Erick Erickson
Probably SOLR-11770 and/or SOLR-11792.

In the meantime, insure that  has stored=true set and
insure that there are terms.

You'll probably have to re-index though

Best,
Erick

On Wed, Jul 18, 2018 at 10:38 AM, babuasian  wrote:
> Hi,Running solr version 6.5.Trying to get tf-idf values of a term ‘price’
> .../solr/mycore/tvrh/?q=price&start=0&rows=1&indent=on&tv=true&tv.all=true&terms=trueWhen
> run, I get the following messagejava.lang.NullPointerException at
> org.apache.solr.handler.component.TermVectorComponent.process(TermVectorComponent.java:324)
> at
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:295)
> at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:173)
> at org.apache.solr.core.SolrCore.execute(SolrCore.java:2440) at
> org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723) at
> org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:529) at
> ..Also, when tried against single field, it doesn’t throw error, but
> the following messageNote: I’ve enabled adding termVectors to title field,
> but to no avail. Kindly suggest...
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: NullPointerException in PeerSync.handleUpdates

2017-11-22 Thread Michael Braun
I went ahead and resolved the jira - it was never seen again by us in later
versions of Solr. There are a number of bug fixes since the 6.2 release, so
I personally recommend updating!

On Wed, Nov 22, 2017 at 11:48 AM, Pushkar Raste 
wrote:

> As mentioned in the JIRA, exception seems to be coming from a log
> statement. The issue was fixed in 6.3, here is relevant line f rom 6.3
> https://github.com/apache/lucene-solr/blob/releases/
> lucene-solr/6.3.0/solr/core/src/java/org/apache/solr/
> update/PeerSync.java#L707
>
>
>
> On Wed, Nov 22, 2017 at 1:18 AM, Erick Erickson 
> wrote:
>
> > Right, if there's no "fixed version" mentioned and if the resolution
> > is "unresolved", it's not in the code base at all. But that JIRA is
> > not apparently reproducible, especially on more recent versions that
> > 6.2. Is it possible to test a more recent version (6.6.2 would be my
> > recommendation).
> >
> > Erick
> >
> > On Tue, Nov 21, 2017 at 9:58 PM, S G  wrote:
> > > My bad. I found it at https://issues.apache.org/jira/browse/SOLR-9453
> > > But I could not find it in changes.txt perhaps because its yet not
> > resolved.
> > >
> > > On Tue, Nov 21, 2017 at 9:15 AM, Erick Erickson <
> erickerick...@gmail.com
> > >
> > > wrote:
> > >
> > >> Did you check the JIRA list? Or CHANGES.txt in more recent versions?
> > >>
> > >> On Tue, Nov 21, 2017 at 1:13 AM, S G 
> wrote:
> > >> > Hi,
> > >> >
> > >> > We are running 6.2 version of Solr and hitting this error
> frequently.
> > >> >
> > >> > Error while trying to recover. core=my_core:java.lang.
> > >> NullPointerException
> > >> > at org.apache.solr.update.PeerSync.handleUpdates(
> > >> PeerSync.java:605)
> > >> > at org.apache.solr.update.PeerSync.handleResponse(
> > >> PeerSync.java:344)
> > >> > at org.apache.solr.update.PeerSync.sync(PeerSync.java:257)
> > >> > at org.apache.solr.cloud.RecoveryStrategy.doRecovery(
> > >> RecoveryStrategy.java:376)
> > >> > at org.apache.solr.cloud.RecoveryStrategy.run(
> > >> RecoveryStrategy.java:221)
> > >> > at java.util.concurrent.Executors$RunnableAdapter.
> > >> call(Executors.java:511)
> > >> > at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> > >> > at org.apache.solr.common.util.ExecutorUtil$
> > >> MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229)
> > >> > at java.util.concurrent.ThreadPoolExecutor.runWorker(
> > >> ThreadPoolExecutor.java:1142)
> > >> > at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> > >> ThreadPoolExecutor.java:617)
> > >> > at java.lang.Thread.run(Thread.java:745)
> > >> >
> > >> >
> > >> >
> > >> > Is this a known issue and fixed in some newer version?
> > >> >
> > >> >
> > >> > Thanks
> > >> > SG
> > >>
> >
>


Re: NullPointerException in PeerSync.handleUpdates

2017-11-22 Thread Pushkar Raste
As mentioned in the JIRA, exception seems to be coming from a log
statement. The issue was fixed in 6.3, here is relevant line f rom 6.3
https://github.com/apache/lucene-solr/blob/releases/lucene-solr/6.3.0/solr/core/src/java/org/apache/solr/update/PeerSync.java#L707



On Wed, Nov 22, 2017 at 1:18 AM, Erick Erickson 
wrote:

> Right, if there's no "fixed version" mentioned and if the resolution
> is "unresolved", it's not in the code base at all. But that JIRA is
> not apparently reproducible, especially on more recent versions that
> 6.2. Is it possible to test a more recent version (6.6.2 would be my
> recommendation).
>
> Erick
>
> On Tue, Nov 21, 2017 at 9:58 PM, S G  wrote:
> > My bad. I found it at https://issues.apache.org/jira/browse/SOLR-9453
> > But I could not find it in changes.txt perhaps because its yet not
> resolved.
> >
> > On Tue, Nov 21, 2017 at 9:15 AM, Erick Erickson  >
> > wrote:
> >
> >> Did you check the JIRA list? Or CHANGES.txt in more recent versions?
> >>
> >> On Tue, Nov 21, 2017 at 1:13 AM, S G  wrote:
> >> > Hi,
> >> >
> >> > We are running 6.2 version of Solr and hitting this error frequently.
> >> >
> >> > Error while trying to recover. core=my_core:java.lang.
> >> NullPointerException
> >> > at org.apache.solr.update.PeerSync.handleUpdates(
> >> PeerSync.java:605)
> >> > at org.apache.solr.update.PeerSync.handleResponse(
> >> PeerSync.java:344)
> >> > at org.apache.solr.update.PeerSync.sync(PeerSync.java:257)
> >> > at org.apache.solr.cloud.RecoveryStrategy.doRecovery(
> >> RecoveryStrategy.java:376)
> >> > at org.apache.solr.cloud.RecoveryStrategy.run(
> >> RecoveryStrategy.java:221)
> >> > at java.util.concurrent.Executors$RunnableAdapter.
> >> call(Executors.java:511)
> >> > at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> >> > at org.apache.solr.common.util.ExecutorUtil$
> >> MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229)
> >> > at java.util.concurrent.ThreadPoolExecutor.runWorker(
> >> ThreadPoolExecutor.java:1142)
> >> > at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> >> ThreadPoolExecutor.java:617)
> >> > at java.lang.Thread.run(Thread.java:745)
> >> >
> >> >
> >> >
> >> > Is this a known issue and fixed in some newer version?
> >> >
> >> >
> >> > Thanks
> >> > SG
> >>
>


Re: NullPointerException in PeerSync.handleUpdates

2017-11-21 Thread Erick Erickson
Right, if there's no "fixed version" mentioned and if the resolution
is "unresolved", it's not in the code base at all. But that JIRA is
not apparently reproducible, especially on more recent versions that
6.2. Is it possible to test a more recent version (6.6.2 would be my
recommendation).

Erick

On Tue, Nov 21, 2017 at 9:58 PM, S G  wrote:
> My bad. I found it at https://issues.apache.org/jira/browse/SOLR-9453
> But I could not find it in changes.txt perhaps because its yet not resolved.
>
> On Tue, Nov 21, 2017 at 9:15 AM, Erick Erickson 
> wrote:
>
>> Did you check the JIRA list? Or CHANGES.txt in more recent versions?
>>
>> On Tue, Nov 21, 2017 at 1:13 AM, S G  wrote:
>> > Hi,
>> >
>> > We are running 6.2 version of Solr and hitting this error frequently.
>> >
>> > Error while trying to recover. core=my_core:java.lang.
>> NullPointerException
>> > at org.apache.solr.update.PeerSync.handleUpdates(
>> PeerSync.java:605)
>> > at org.apache.solr.update.PeerSync.handleResponse(
>> PeerSync.java:344)
>> > at org.apache.solr.update.PeerSync.sync(PeerSync.java:257)
>> > at org.apache.solr.cloud.RecoveryStrategy.doRecovery(
>> RecoveryStrategy.java:376)
>> > at org.apache.solr.cloud.RecoveryStrategy.run(
>> RecoveryStrategy.java:221)
>> > at java.util.concurrent.Executors$RunnableAdapter.
>> call(Executors.java:511)
>> > at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>> > at org.apache.solr.common.util.ExecutorUtil$
>> MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229)
>> > at java.util.concurrent.ThreadPoolExecutor.runWorker(
>> ThreadPoolExecutor.java:1142)
>> > at java.util.concurrent.ThreadPoolExecutor$Worker.run(
>> ThreadPoolExecutor.java:617)
>> > at java.lang.Thread.run(Thread.java:745)
>> >
>> >
>> >
>> > Is this a known issue and fixed in some newer version?
>> >
>> >
>> > Thanks
>> > SG
>>


Re: NullPointerException in PeerSync.handleUpdates

2017-11-21 Thread S G
My bad. I found it at https://issues.apache.org/jira/browse/SOLR-9453
But I could not find it in changes.txt perhaps because its yet not resolved.

On Tue, Nov 21, 2017 at 9:15 AM, Erick Erickson 
wrote:

> Did you check the JIRA list? Or CHANGES.txt in more recent versions?
>
> On Tue, Nov 21, 2017 at 1:13 AM, S G  wrote:
> > Hi,
> >
> > We are running 6.2 version of Solr and hitting this error frequently.
> >
> > Error while trying to recover. core=my_core:java.lang.
> NullPointerException
> > at org.apache.solr.update.PeerSync.handleUpdates(
> PeerSync.java:605)
> > at org.apache.solr.update.PeerSync.handleResponse(
> PeerSync.java:344)
> > at org.apache.solr.update.PeerSync.sync(PeerSync.java:257)
> > at org.apache.solr.cloud.RecoveryStrategy.doRecovery(
> RecoveryStrategy.java:376)
> > at org.apache.solr.cloud.RecoveryStrategy.run(
> RecoveryStrategy.java:221)
> > at java.util.concurrent.Executors$RunnableAdapter.
> call(Executors.java:511)
> > at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> > at org.apache.solr.common.util.ExecutorUtil$
> MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229)
> > at java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
> > at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
> > at java.lang.Thread.run(Thread.java:745)
> >
> >
> >
> > Is this a known issue and fixed in some newer version?
> >
> >
> > Thanks
> > SG
>


Re: NullPointerException in PeerSync.handleUpdates

2017-11-21 Thread Erick Erickson
Did you check the JIRA list? Or CHANGES.txt in more recent versions?

On Tue, Nov 21, 2017 at 1:13 AM, S G  wrote:
> Hi,
>
> We are running 6.2 version of Solr and hitting this error frequently.
>
> Error while trying to recover. core=my_core:java.lang.NullPointerException
> at org.apache.solr.update.PeerSync.handleUpdates(PeerSync.java:605)
> at org.apache.solr.update.PeerSync.handleResponse(PeerSync.java:344)
> at org.apache.solr.update.PeerSync.sync(PeerSync.java:257)
> at 
> org.apache.solr.cloud.RecoveryStrategy.doRecovery(RecoveryStrategy.java:376)
> at 
> org.apache.solr.cloud.RecoveryStrategy.run(RecoveryStrategy.java:221)
> at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at 
> org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
>
>
>
> Is this a known issue and fixed in some newer version?
>
>
> Thanks
> SG


Re: NullPointerException on openStreams

2017-07-14 Thread Erick Erickson
Joel:

Would it make sense to throw a more informative error when the stream
context wasn't set? Maybe an explicit check in open() or some such?

Erick

On Fri, Jul 14, 2017 at 8:25 AM, Joe Obernberger
 wrote:
> Still stuck on this one.  I suspect there is something I'm not setting in
> the StreamContext.  I'm not sure what to put for these two?
> context.put("core", this.coreName);
> context.put("solr-core", req.getCore());
>
> Also not sure what the class is for ClassifyStream?  Error that I'm getting
> is:
>
> java.io.IOException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
> at
> org.apache.solr.client.solrj.io.stream.CloudSolrStream.constructStreams(CloudSolrStream.java:408)
> at
> org.apache.solr.client.solrj.io.stream.CloudSolrStream.open(CloudSolrStream.java:299)
> at
> com.ngc.bigdata.ie_machinelearningprofile.MachineLearningProfileProcessor.profile(MachineLearningProfileProcessor.java:344)
> at
> com.ngc.bigdata.ie_machinelearningprofile.ProfileThread.run(ProfileThread.java:41)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
> at java.util.ArrayList.rangeCheck(ArrayList.java:653)
> at java.util.ArrayList.get(ArrayList.java:429)
> at
> org.apache.solr.client.solrj.io.stream.TupleStream.getShards(TupleStream.java:133)
> at
> org.apache.solr.client.solrj.io.stream.CloudSolrStream.constructStreams(CloudSolrStream.java:393)
>
> Thanks for any ideas!
>
> -Joe
>
>
>
> On 7/13/2017 4:33 PM, Joe Obernberger wrote:
>>
>> Thanks for this.  I'm now trying to use stream for classify, but am
>> getting an ArrayIndexOutOfBounds error on the stream.open().  I'm setting
>> the streamFactory up, and including .withFunctionName("classify",
>> ClassifyStream.class) - but is that class in orga.apache.solr.handler?
>>
>> -
>> StringBuilder expression = new StringBuilder();
>> solrCollection = getCollectionFromProfileBean(pBean);
>>
>> expression.append("classify(model(models,id=\"").append(pBean.getModelID()).append("\",cacheMillis=5000),");
>>
>> expression.append("search(").append(solrCollection).append(",q=\"DocumentId:").append(docID).append("\",");
>> expression.append("fl=\"ClusterText,id\",sort=\"id
>> asc\"),field=\"ClusterText\")");
>> logger.info("Have classify expression:\n" +
>> expression.toString() + "\n");
>> params.set("expr", expression.toString());
>> params.set("qt", "/stream");
>> params.set("explain", "true");
>> params.set("q", "*:*");
>> params.set("fl", "id");
>> params.set("sort", "id asc");
>>
>> context = new StreamContext();
>>
>> context.setSolrClientCache(StaticInfo.getSingleton(props).getClientCache());
>> context.workerID = 0;
>> context.numWorkers = 1;
>> context.setModelCache(StaticInfo.getSingleton(props).getModelCache());
>>
>> streamFactory.withCollectionZkHost(solrCollection,
>> props.getProperty("hbase.zookeeper.solr.quorum"))
>> .withFunctionName("search", CloudSolrStream.class)
>> .withFunctionName("facet", FacetStream.class)
>> .withFunctionName("update", UpdateStream.class)
>> .withFunctionName("jdbc", JDBCStream.class)
>> .withFunctionName("topic", TopicStream.class)
>> .withFunctionName("commit", CommitStream.class)
>> // decorator streams
>> .withFunctionName("merge", MergeStream.class)
>> .withFunctionName("unique", UniqueStream.class)
>> .withFunctionName("top", RankStream.class)
>> .withFunctionName("reduce", ReducerStream.class)
>> .withFunctionName("parallel", ParallelStream.class)
>> .withFunctionName("rollup", RollupStream.class)
>> .withFunctionName("stats", StatsStream.class)
>> .withFunctionName("innerJoin", InnerJoinStream.class)
>> .withFunctionName("leftOuterJoin",
>> LeftOuterJoinStream.class)
>> .withFunctionName("hashJoin", HashJoinStream.class)
>> .withFunctionName("outerHashJoin",
>> OuterHashJoinStream.class)
>> .withFunctionName("intersect", IntersectStream.class)
>> .withFunctionName("complement",
>> ComplementStream.class)
>> .withFunctionName(SORT, SortStream.class)
>> .withFunctionName("train", TextLogitStream.class)
>> .withFunctionName("features",
>> FeaturesSelectionStream.class)
>> .withF

Re: NullPointerException on openStreams

2017-07-14 Thread Joe Obernberger
Still stuck on this one.  I suspect there is something I'm not setting 
in the StreamContext.  I'm not sure what to put for these two?

context.put("core", this.coreName);
context.put("solr-core", req.getCore());

Also not sure what the class is for ClassifyStream?  Error that I'm 
getting is:


java.io.IOException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at 
org.apache.solr.client.solrj.io.stream.CloudSolrStream.constructStreams(CloudSolrStream.java:408)
at 
org.apache.solr.client.solrj.io.stream.CloudSolrStream.open(CloudSolrStream.java:299)
at 
com.ngc.bigdata.ie_machinelearningprofile.MachineLearningProfileProcessor.profile(MachineLearningProfileProcessor.java:344)
at 
com.ngc.bigdata.ie_machinelearningprofile.ProfileThread.run(ProfileThread.java:41)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.get(ArrayList.java:429)
at 
org.apache.solr.client.solrj.io.stream.TupleStream.getShards(TupleStream.java:133)
at 
org.apache.solr.client.solrj.io.stream.CloudSolrStream.constructStreams(CloudSolrStream.java:393)


Thanks for any ideas!

-Joe


On 7/13/2017 4:33 PM, Joe Obernberger wrote:
Thanks for this.  I'm now trying to use stream for classify, but am 
getting an ArrayIndexOutOfBounds error on the stream.open().  I'm 
setting the streamFactory up, and including 
.withFunctionName("classify", ClassifyStream.class) - but is that 
class in orga.apache.solr.handler?


-
StringBuilder expression = new StringBuilder();
solrCollection = getCollectionFromProfileBean(pBean);
expression.append("classify(model(models,id=\"").append(pBean.getModelID()).append("\",cacheMillis=5000),"); 

expression.append("search(").append(solrCollection).append(",q=\"DocumentId:").append(docID).append("\","); 

expression.append("fl=\"ClusterText,id\",sort=\"id 
asc\"),field=\"ClusterText\")");
logger.info("Have classify expression:\n" + 
expression.toString() + "\n");

params.set("expr", expression.toString());
params.set("qt", "/stream");
params.set("explain", "true");
params.set("q", "*:*");
params.set("fl", "id");
params.set("sort", "id asc");

context = new StreamContext();
context.setSolrClientCache(StaticInfo.getSingleton(props).getClientCache()); 


context.workerID = 0;
context.numWorkers = 1;
context.setModelCache(StaticInfo.getSingleton(props).getModelCache());

streamFactory.withCollectionZkHost(solrCollection, 
props.getProperty("hbase.zookeeper.solr.quorum"))

.withFunctionName("search", CloudSolrStream.class)
.withFunctionName("facet", FacetStream.class)
.withFunctionName("update", UpdateStream.class)
.withFunctionName("jdbc", JDBCStream.class)
.withFunctionName("topic", TopicStream.class)
.withFunctionName("commit", CommitStream.class)
// decorator streams
.withFunctionName("merge", MergeStream.class)
.withFunctionName("unique", UniqueStream.class)
.withFunctionName("top", RankStream.class)
.withFunctionName("reduce", ReducerStream.class)
.withFunctionName("parallel", ParallelStream.class)
.withFunctionName("rollup", RollupStream.class)
.withFunctionName("stats", StatsStream.class)
.withFunctionName("innerJoin", InnerJoinStream.class)
.withFunctionName("leftOuterJoin", 
LeftOuterJoinStream.class)

.withFunctionName("hashJoin", HashJoinStream.class)
.withFunctionName("outerHashJoin", 
OuterHashJoinStream.class)

.withFunctionName("intersect", IntersectStream.class)
.withFunctionName("complement", 
ComplementStream.class)

.withFunctionName(SORT, SortStream.class)
.withFunctionName("train", TextLogitStream.class)
.withFunctionName("features", 
FeaturesSelectionStream.class)

.withFunctionName("daemon", DaemonStream.class)
.withFunctionName("shortestPath", 
ShortestPathStream.class)
.withFunctionName("gatherNodes", 
GatherNodesStream.class)

.withFunctionName("nodes", GatherNodesStream.class)
.withFunctionName("select", SelectStream.class)
.withFunctionName("shortestPath", 
ShortestPathStream.cl

Re: NullPointerException on openStreams

2017-07-13 Thread Joel Bernstein
If you can include the stack trace and version of Solr we can see what's
causing the exception.

Joel Bernstein
http://joelsolr.blogspot.com/

On Thu, Jul 13, 2017 at 4:33 PM, Joe Obernberger <
joseph.obernber...@gmail.com> wrote:

> Thanks for this.  I'm now trying to use stream for classify, but am
> getting an ArrayIndexOutOfBounds error on the stream.open().  I'm setting
> the streamFactory up, and including .withFunctionName("classify",
> ClassifyStream.class) - but is that class in orga.apache.solr.handler?
>
> -
> StringBuilder expression = new StringBuilder();
> solrCollection = getCollectionFromProfileBean(pBean);
> expression.append("classify(model(models,id=\"").append(pBea
> n.getModelID()).append("\",cacheMillis=5000),");
> expression.append("search(").append(solrCollection).append("
> ,q=\"DocumentId:").append(docID).append("\",");
> expression.append("fl=\"ClusterText,id\",sort=\"id
> asc\"),field=\"ClusterText\")");
> logger.info("Have classify expression:\n" +
> expression.toString() + "\n");
> params.set("expr", expression.toString());
> params.set("qt", "/stream");
> params.set("explain", "true");
> params.set("q", "*:*");
> params.set("fl", "id");
> params.set("sort", "id asc");
>
> context = new StreamContext();
> context.setSolrClientCache(StaticInfo.getSingleton(props).
> getClientCache());
> context.workerID = 0;
> context.numWorkers = 1;
> context.setModelCache(StaticInfo.getSingleton(props).getModelCache());
>
> streamFactory.withCollectionZkHost(solrCollection,
> props.getProperty("hbase.zookeeper.solr.quorum"))
> .withFunctionName("search", CloudSolrStream.class)
> .withFunctionName("facet", FacetStream.class)
> .withFunctionName("update", UpdateStream.class)
> .withFunctionName("jdbc", JDBCStream.class)
> .withFunctionName("topic", TopicStream.class)
> .withFunctionName("commit", CommitStream.class)
> // decorator streams
> .withFunctionName("merge", MergeStream.class)
> .withFunctionName("unique", UniqueStream.class)
> .withFunctionName("top", RankStream.class)
> .withFunctionName("reduce", ReducerStream.class)
> .withFunctionName("parallel", ParallelStream.class)
> .withFunctionName("rollup", RollupStream.class)
> .withFunctionName("stats", StatsStream.class)
> .withFunctionName("innerJoin", InnerJoinStream.class)
> .withFunctionName("leftOuterJoin",
> LeftOuterJoinStream.class)
> .withFunctionName("hashJoin", HashJoinStream.class)
> .withFunctionName("outerHashJoin",
> OuterHashJoinStream.class)
> .withFunctionName("intersect", IntersectStream.class)
> .withFunctionName("complement",
> ComplementStream.class)
> .withFunctionName(SORT, SortStream.class)
> .withFunctionName("train", TextLogitStream.class)
> .withFunctionName("features",
> FeaturesSelectionStream.class)
> .withFunctionName("daemon", DaemonStream.class)
> .withFunctionName("shortestPath",
> ShortestPathStream.class)
> .withFunctionName("gatherNodes",
> GatherNodesStream.class)
> .withFunctionName("nodes", GatherNodesStream.class)
> .withFunctionName("select", SelectStream.class)
> .withFunctionName("shortestPath",
> ShortestPathStream.class)
> .withFunctionName("gatherNodes",
> GatherNodesStream.class)
> .withFunctionName("nodes", GatherNodesStream.class)
> .withFunctionName("scoreNodes",
> ScoreNodesStream.class)
> .withFunctionName("model", ModelStream.class)
> .withFunctionName("classify", ClassifyStream.class)
> .withFunctionName("fetch", FetchStream.class)
> .withFunctionName("executor", ExecutorStream.class)
> .withFunctionName("null", NullStream.class)
> .withFunctionName("priority", PriorityStream.class)
> .withFunctionName("significantTerms",
> SignificantTermsStream.class)
> .withFunctionName("cartesianProduct",
> CartesianProductStream.class)
> .withFunctionName("shuffle", ShuffleStream.class)
> .withFunctionName("calc", CalculatorStream.class)
> .withFunctionName("eval", EvalStream.class)
> .withFunctionName("echo", EchoStream.class)
> .withFunctionName("cell",

Re: NullPointerException on openStreams

2017-07-13 Thread Joe Obernberger
Thanks for this.  I'm now trying to use stream for classify, but am 
getting an ArrayIndexOutOfBounds error on the stream.open().  I'm 
setting the streamFactory up, and including 
.withFunctionName("classify", ClassifyStream.class) - but is that class 
in orga.apache.solr.handler?


-
StringBuilder expression = new StringBuilder();
solrCollection = getCollectionFromProfileBean(pBean);
expression.append("classify(model(models,id=\"").append(pBean.getModelID()).append("\",cacheMillis=5000),");
expression.append("search(").append(solrCollection).append(",q=\"DocumentId:").append(docID).append("\",");
expression.append("fl=\"ClusterText,id\",sort=\"id 
asc\"),field=\"ClusterText\")");
logger.info("Have classify expression:\n" + 
expression.toString() + "\n");

params.set("expr", expression.toString());
params.set("qt", "/stream");
params.set("explain", "true");
params.set("q", "*:*");
params.set("fl", "id");
params.set("sort", "id asc");

context = new StreamContext();
context.setSolrClientCache(StaticInfo.getSingleton(props).getClientCache());
context.workerID = 0;
context.numWorkers = 1;
context.setModelCache(StaticInfo.getSingleton(props).getModelCache());

streamFactory.withCollectionZkHost(solrCollection, 
props.getProperty("hbase.zookeeper.solr.quorum"))

.withFunctionName("search", CloudSolrStream.class)
.withFunctionName("facet", FacetStream.class)
.withFunctionName("update", UpdateStream.class)
.withFunctionName("jdbc", JDBCStream.class)
.withFunctionName("topic", TopicStream.class)
.withFunctionName("commit", CommitStream.class)
// decorator streams
.withFunctionName("merge", MergeStream.class)
.withFunctionName("unique", UniqueStream.class)
.withFunctionName("top", RankStream.class)
.withFunctionName("reduce", ReducerStream.class)
.withFunctionName("parallel", ParallelStream.class)
.withFunctionName("rollup", RollupStream.class)
.withFunctionName("stats", StatsStream.class)
.withFunctionName("innerJoin", InnerJoinStream.class)
.withFunctionName("leftOuterJoin", 
LeftOuterJoinStream.class)

.withFunctionName("hashJoin", HashJoinStream.class)
.withFunctionName("outerHashJoin", 
OuterHashJoinStream.class)

.withFunctionName("intersect", IntersectStream.class)
.withFunctionName("complement", ComplementStream.class)
.withFunctionName(SORT, SortStream.class)
.withFunctionName("train", TextLogitStream.class)
.withFunctionName("features", 
FeaturesSelectionStream.class)

.withFunctionName("daemon", DaemonStream.class)
.withFunctionName("shortestPath", 
ShortestPathStream.class)
.withFunctionName("gatherNodes", 
GatherNodesStream.class)

.withFunctionName("nodes", GatherNodesStream.class)
.withFunctionName("select", SelectStream.class)
.withFunctionName("shortestPath", 
ShortestPathStream.class)
.withFunctionName("gatherNodes", 
GatherNodesStream.class)

.withFunctionName("nodes", GatherNodesStream.class)
.withFunctionName("scoreNodes", ScoreNodesStream.class)
.withFunctionName("model", ModelStream.class)
.withFunctionName("classify", ClassifyStream.class)
.withFunctionName("fetch", FetchStream.class)
.withFunctionName("executor", ExecutorStream.class)
.withFunctionName("null", NullStream.class)
.withFunctionName("priority", PriorityStream.class)
.withFunctionName("significantTerms", 
SignificantTermsStream.class)
.withFunctionName("cartesianProduct", 
CartesianProductStream.class)

.withFunctionName("shuffle", ShuffleStream.class)
.withFunctionName("calc", CalculatorStream.class)
.withFunctionName("eval", EvalStream.class)
.withFunctionName("echo", EchoStream.class)
.withFunctionName("cell", CellStream.class)
.withFunctionName("list", ListStream.class)
.withFunctionName("let", LetStream.class)
.withFunctionName("get", GetStream.class)
.withFunctionName("timeseries", TimeSeriesStream.class)
.withFunctionName("tuple", TupStream.class)
// metrics
 

Re: NullPointerException on openStreams

2017-07-13 Thread Joe Obernberger

Thank you Joel - that was it.

context = new StreamContext();
context.setSolrClientCache(StaticInfo.getSingleton(props).getClientCache());
context.workerID = 0;
context.numWorkers = 1;
context.setModelCache(StaticInfo.getSingleton(props).getModelCache());

Then:
stream = new 
CloudSolrStream(props.getProperty("hbase.zookeeper.solr.quorum"), 
solrCollectionName, params);

stream.setStreamContext(context);

Did the trick.  I suspect it will be a problem if multiple programs use 
the name workerID; will do more reading.


-Joe

On 7/13/2017 2:18 PM, Joel Bernstein wrote:

It's most likely that you're not setting the StreamContext. New versions of
Solr expect the StreamContext to be set before the stream is opened. The
SolrClientCache also needs to present in the StreamContext. You can take a
look at how the StreamHandler does this for an example:
https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/handler/StreamHandler.java#L339

Joel Bernstein
http://joelsolr.blogspot.com/

On Thu, Jul 13, 2017 at 2:06 PM, Joe Obernberger <
joseph.obernber...@gmail.com> wrote:


Hi All - trying to call ClouderSolrStream.open(), but I'm getting this
error:

java.io.IOException: java.lang.NullPointerException
  at org.apache.solr.client.solrj.io.stream.CloudSolrStream.const
ructStreams(CloudSolrStream.java:408)
  at org.apache.solr.client.solrj.io.stream.CloudSolrStream.open(
CloudSolrStream.java:299)

I'm passing in a valid zkHost, collection name, and parameters. In fact,
if I take the stream expression and past it into the GUI, it works OK.  I'm
stumped by what could be null here.

My code looks like the following, and I'm getting the error on
stream.open().

 StringBuilder expression = new StringBuilder();
 expression.append("update(models, batchSize=\"50\",");
expression.append("train(").append(solrCollectionName).append(",");
expression.append("features(").append(solrCollectionName).append(",");
expression.append("q=\"*:*\",featureSet=\"FSet_").append(sol
rCollectionName).append("\",");
expression.append("field=\"Text\",outcome=\"out_i\",positive
Label=1,numTerms=").append(numTerms).append("),");
expression.append("q=\"*:*\",name=\"").append(docID).append(
"\",field=\"Text\",outcome=\"out_i\",maxIterations=\"").
append(maxIterations).append("\"))");
 logger.info("Have update expression:\n"+expression.toSt
ring()+"\n");
 params.set("expr", expression.toString());
 params.set("qt", "/stream");
 params.set("explain", "true");
 params.set("q", "*:*");
 params.set("fl", "id");
 params.set("sort", "id asc");
 try {
 System.out.println("Open: "+props.getProperty("hbase.zoo
keeper.solr.quorum")+"\nCollection: "+solrCollectionName+" \nWith params:
"+params);
 stream = new CloudSolrStream(props.getPrope
rty("hbase.zookeeper.solr.quorum"), solrCollectionName, params);
 stream.open();
 while (true) {
 Tuple tuple = stream.read();
 logger.info("Tuple Read: "+tuple.fields.toString());
 if (tuple.EOF) {
 break;
 }
 }
 } catch (IOException ex) {
 logger.error("Solr stream error: " + ex);
 ex.printStackTrace();
 } finally {
 if (stream != null) {
 try {
 stream.close();
 } catch (IOException ex) {
 logger.error("Could not close stream: "+ex);
 }
 }
 }

I'm stuck!  Thanks!

-Joe




---
This email has been checked for viruses by AVG.
http://www.avg.com





Re: NullPointerException on openStreams

2017-07-13 Thread Susheel Kumar
This the working code snippet I have, if that helps

public static void main(String []args) throws IOException
{
String clause;
   TupleStream stream;
   List tuples;
   StreamContext streamContext = new StreamContext();
   SolrClientCache solrClientCache = new SolrClientCache();
   streamContext.setSolrClientCache(solrClientCache);

   StreamFactory factory = new StreamFactory()
 .withCollectionZkHost("gettingstarted",
"server1:2182, server2:2182,server3:2182/solr66")
  //  .withCollectionZkHost("gettingstarted", "localhost:2181")
.withFunctionName("search", CloudSolrStream.class)
 .withFunctionName("select", SelectStream.class)
 .withFunctionName("add", AddEvaluator.class)
 .withFunctionName("if", IfThenElseEvaluator.class)
 .withFunctionName("gt", GreaterThanEvaluator.class)
 .withFunctionName("let", LetStream.class)
 .withFunctionName("get", GetStream.class)
 .withFunctionName("echo", EchoStream.class)
 .withFunctionName("merge", MergeStream.class)
 .withFunctionName("sort", SortStream.class)
 .withFunctionName("tuple", TupStream.class)
 .withFunctionName("rollup",RollupStream.class)
 .withFunctionName("hashJoin", HashJoinStream.class)
 .withFunctionName("complement", ComplementStream.class)
 .withFunctionName("fetch", FetchStream.class)
 .withFunctionName("having",HavingStream.class)
 .withFunctionName("eq", EqualsEvaluator.class)
 .withFunctionName("count", CountMetric.class)
 .withFunctionName("facet", FacetStream.class)
 .withFunctionName("sum", SumMetric.class)
 .withFunctionName("unique", UniqueStream.class)
 .withFunctionName("uniq", UniqueMetric.class)
 .withFunctionName("innerJoin", InnerJoinStream.class)
 .withFunctionName("intersect", IntersectStream.class)

 ;
   try {
clause = getClause2();
 //   clause = getFacet();
 stream = factory.constructStream(clause);
 stream.setStreamContext(streamContext);
 tuples = getTuples(stream);

 for(Tuple tuple : tuples )
 {
 System.out.println(tuple.getString("id"));
 System.out.println(tuple.getString("sr_sv_business_email_s"));
 System.out.println(tuple.getString("sum(price_i)"));
 System.out.println(tuple.getString("count(price_i)"));
 System.out.println(tuple.getString("unique(price_i)"));
 System.out.println(tuple.getString("email"));
 }

 System.out.println("Total tuples retunred "+tuples.size());
   } finally {
   solrClientCache.close();
 }

On Thu, Jul 13, 2017 at 2:18 PM, Joel Bernstein  wrote:

> It's most likely that you're not setting the StreamContext. New versions of
> Solr expect the StreamContext to be set before the stream is opened. The
> SolrClientCache also needs to present in the StreamContext. You can take a
> look at how the StreamHandler does this for an example:
> https://github.com/apache/lucene-solr/blob/master/solr/
> core/src/java/org/apache/solr/handler/StreamHandler.java#L339
>
> Joel Bernstein
> http://joelsolr.blogspot.com/
>
> On Thu, Jul 13, 2017 at 2:06 PM, Joe Obernberger <
> joseph.obernber...@gmail.com> wrote:
>
> > Hi All - trying to call ClouderSolrStream.open(), but I'm getting this
> > error:
> >
> > java.io.IOException: java.lang.NullPointerException
> >  at org.apache.solr.client.solrj.io.stream.CloudSolrStream.const
> > ructStreams(CloudSolrStream.java:408)
> >  at org.apache.solr.client.solrj.io.stream.CloudSolrStream.open(
> > CloudSolrStream.java:299)
> >
> > I'm passing in a valid zkHost, collection name, and parameters. In fact,
> > if I take the stream expression and past it into the GUI, it works OK.
> I'm
> > stumped by what could be null here.
> >
> > My code looks like the following, and I'm getting the error on
> > stream.open().
> >
> > StringBuilder expression = new StringBuilder();
> > expression.append("update(models, batchSize=\"50\",");
> > expression.append("train(").append(solrCollectionName).append(",");
> > expression.append("features(").append(solrCollectionName).append(",");
> > expression.append("q=\"*:*\",featureSet=\"FSet_").append(sol
> > rCollectionName).append("\",");
> > expression.append("field=\"Text\",outcome=\"out_i\",positive
> > Label=1,numTerms=").append(numTerms).append("),");
> > expression.append("q=\"*:*\",name=\"").append(docID).append(
> > "\",field=\"Text\",outcome=\"out_i\",maxIterations=\"").
> > append(maxIterations).append("\"))");
> > logger.info("Have update expression:\n"+expression.toSt
> > ring()+"\n");
> > params.set("expr", expression.toString());
> > params.set("qt", "/stream");
> > params.set("explain", "true");
> > params.set("q", "*:*");
> > params.set("fl", "id");
> > params.set("sort", "id asc");
> > try {
> > System.out.println("Open: "+props.getProperty("hbase.zoo
> > keeper.solr.quorum")+"\nCollection: "+solrCollectionName+" \nWith
> params:
> > "+params);
> > stream = n

Re: NullPointerException on openStreams

2017-07-13 Thread Joel Bernstein
It's most likely that you're not setting the StreamContext. New versions of
Solr expect the StreamContext to be set before the stream is opened. The
SolrClientCache also needs to present in the StreamContext. You can take a
look at how the StreamHandler does this for an example:
https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/handler/StreamHandler.java#L339

Joel Bernstein
http://joelsolr.blogspot.com/

On Thu, Jul 13, 2017 at 2:06 PM, Joe Obernberger <
joseph.obernber...@gmail.com> wrote:

> Hi All - trying to call ClouderSolrStream.open(), but I'm getting this
> error:
>
> java.io.IOException: java.lang.NullPointerException
>  at org.apache.solr.client.solrj.io.stream.CloudSolrStream.const
> ructStreams(CloudSolrStream.java:408)
>  at org.apache.solr.client.solrj.io.stream.CloudSolrStream.open(
> CloudSolrStream.java:299)
>
> I'm passing in a valid zkHost, collection name, and parameters. In fact,
> if I take the stream expression and past it into the GUI, it works OK.  I'm
> stumped by what could be null here.
>
> My code looks like the following, and I'm getting the error on
> stream.open().
>
> StringBuilder expression = new StringBuilder();
> expression.append("update(models, batchSize=\"50\",");
> expression.append("train(").append(solrCollectionName).append(",");
> expression.append("features(").append(solrCollectionName).append(",");
> expression.append("q=\"*:*\",featureSet=\"FSet_").append(sol
> rCollectionName).append("\",");
> expression.append("field=\"Text\",outcome=\"out_i\",positive
> Label=1,numTerms=").append(numTerms).append("),");
> expression.append("q=\"*:*\",name=\"").append(docID).append(
> "\",field=\"Text\",outcome=\"out_i\",maxIterations=\"").
> append(maxIterations).append("\"))");
> logger.info("Have update expression:\n"+expression.toSt
> ring()+"\n");
> params.set("expr", expression.toString());
> params.set("qt", "/stream");
> params.set("explain", "true");
> params.set("q", "*:*");
> params.set("fl", "id");
> params.set("sort", "id asc");
> try {
> System.out.println("Open: "+props.getProperty("hbase.zoo
> keeper.solr.quorum")+"\nCollection: "+solrCollectionName+" \nWith params:
> "+params);
> stream = new CloudSolrStream(props.getPrope
> rty("hbase.zookeeper.solr.quorum"), solrCollectionName, params);
> stream.open();
> while (true) {
> Tuple tuple = stream.read();
> logger.info("Tuple Read: "+tuple.fields.toString());
> if (tuple.EOF) {
> break;
> }
> }
> } catch (IOException ex) {
> logger.error("Solr stream error: " + ex);
> ex.printStackTrace();
> } finally {
> if (stream != null) {
> try {
> stream.close();
> } catch (IOException ex) {
> logger.error("Could not close stream: "+ex);
> }
> }
> }
>
> I'm stuck!  Thanks!
>
> -Joe
>
>


Re: NullPointerException

2015-10-16 Thread Mark Fenbers
Yes, I'm aware that building an index is expensive and I will remove 
"buildOnStartup" once I have it working.  The field I added was an 
attempt to get it working...


I have attached my latest version of solrconfig.xml and schema.xml (both 
are in the same attachment), except that I have removed all block 
comments for your easier scrutiny.  The source of the correctly spelled 
words is a RedHat baseline file called /usr/share/dict/linux.words.  
(Does this also mean it is the source of the suggestions?)


thanks for the help!

Mark

On 10/13/2015 7:07 AM, Alessandro Benedetti wrote:

Generally it is highly discouraged to build the spellcheck on startup.
In the case of big suggestion file, you are going to build the suggester
data structures ( basically FST in memory and then in disk) for a long
time, on startup.
You should build your spellchecker only when you change the file source of
the suggestions,

Checking the snippet, first I see you add a field to the FileBased
Spellchecker config, which is useless.
Anyway should not be the problem.
Can you give us the source of suggestions ?
A snippet of the file ?

Cheers

On 13 October 2015 at 10:02, Duck Geraint (ext) GBJH <
geraint.d...@syngenta.com> wrote:





  5.3.0
  ${solr.data.dir:}
  
   
  

  
  
${solr.lock.type:native}
 true
  
  
  

  ${solr.ulog.dir:}
  ${solr.ulog.numVersionBuckets:65536}

  
   ${solr.autoCommit.maxTime:15000} 
   false 
 
  
   ${solr.autoSoftCommit.maxTime:-1} 
 

  
  
1024



   
 


true

   20
   200
false
2

  
  
 

 

  

  
 
   explicit
   10
 



  
  
 
   explicit
   json
   true
   text
 
  

  

  {!xport}
  xsort
  false



  query

  
  
  

/localapps/dev/EventLog/solr/EventLog2/conf/data-config.xml 
   

  

  

  text

  

  
  

  
  

 explicit 
 true

  
  
  
text_en


  WordBreak
  solr.WordBreakSolrSpellChecker
  logtext
  true
  true
  10



 solr.FileBasedSpellChecker
logtext 
FileDict
 /usr/share/dict/linux.words
 UTF-8
 /localapps/dev/EventLog/solr/EventLog2/data/spFile
 true
   0.5

  2

  1

  5

  4

  0.01

  
  
  

  


  FileDict
  WordBreak
  on
  true
  10
  5
  5
  true
  true
  10
  5


  spellcheck

  
  
  

  
  
 
  true
  false
 

  terms

  

  
  
*:*
  

















   
   





   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

   
   

   
   
   

   
   
   
   
   
   

   

   
   

   

 id
















 









  

  


  



  
  




  




  







  
  







  



  






  
  







  



  








  



  




  
  




  



  





  




  


  
















Re: NullPointerException

2015-10-13 Thread Alessandro Benedetti
Generally it is highly discouraged to build the spellcheck on startup.
In the case of big suggestion file, you are going to build the suggester
data structures ( basically FST in memory and then in disk) for a long
time, on startup.
You should build your spellchecker only when you change the file source of
the suggestions,

Checking the snippet, first I see you add a field to the FileBased
Spellchecker config, which is useless.
Anyway should not be the problem.
Can you give us the source of suggestions ?
A snippet of the file ?

Cheers

On 13 October 2015 at 10:02, Duck Geraint (ext) GBJH <
geraint.d...@syngenta.com> wrote:

> How odd, though I'm afraid this is reaching the limit of my knowledge at
> this point (and I still can't find where that box is within the Admin UI!).
>
> The only thing I'd say is to check that "logtext" is a defined named field
> within your schema, and to double check how it's field type is defined.
>
> Also, try without the "text_en"
> definition (I believe this should be implicit as the filed type of
> "logtext" above).
>
> Geraint
>
> Geraint Duck
> Data Scientist
> Toxicology and Health Sciences
> Syngenta UK
> Email: geraint.d...@syngenta.com
>
>
> -Original Message-
> From: Mark Fenbers [mailto:mark.fenb...@noaa.gov]
> Sent: 12 October 2015 12:14
> To: solr-user@lucene.apache.org
> Subject: Re: NullPointerException
>
> On 10/12/2015 5:38 AM, Duck Geraint (ext) GBJH wrote:
> > "When I use the Admin UI (v5.3.0), and check the spellcheck.build box"
> > Out of interest, where is this option within the Admin UI? I can't find
> anything like it in mine...
> This is in the expanded options that open up once I put a checkmark in the
> "spellcheck" box.
> > Do you get the same issue by submitting the build command directly with
> something like this instead:
> > http://localhost:8983/solr//ELspell?spellcheck.build=true
> > ?
> Yes, I do.
> > It'll be reasonably obvious if the dictionary has actually built or not
> by the file size of your speller store:
> > /localapps/dev/EventLog/solr/EventLog2/data/spFile
> >
> >
> > Otherwise, (temporarily) try adding...
> > true
> > ...to your spellchecker search component config, you might find it'll
> log a more useful error message that way.
> Interesting!  The index builds successfully using this method and I get no
> stacktrace error.  Hurray!  But why??
>
> So now, I tried running a query, so I typed Fenbers into the spellcheck.q
> box, and I get the following 9 suggestions:
> fenber
> f en be r
> f e nb er
> f en b er
> f e n be r
> f en b e r
> f e nb e r
> f e n b er
> f e n b e r
>
> I find this very odd because I commented out all references to the
> wordbreak checker in solrconfig.xml.  What do I configure so that Solr will
> give me sensible suggestions like:
>fenders
>embers
>fenberry
> and so on?
>
> Mark
>
> 
>
>
> Syngenta Limited, Registered in England No 2710846;Registered Office :
> Syngenta Limited, European Regional Centre, Priestley Road, Surrey Research
> Park, Guildford, Surrey, GU2 7YH, United Kingdom
> 
>  This message may contain confidential information. If you are not the
> designated recipient, please notify the sender immediately, and delete the
> original and any copies. Any use of the message by you is prohibited.
>



-- 
--

Benedetti Alessandro
Visiting card - http://about.me/alessandro_benedetti
Blog - http://alexbenedetti.blogspot.co.uk

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England


RE: NullPointerException

2015-10-13 Thread Duck Geraint (ext) GBJH
How odd, though I'm afraid this is reaching the limit of my knowledge at this 
point (and I still can't find where that box is within the Admin UI!).

The only thing I'd say is to check that "logtext" is a defined named field 
within your schema, and to double check how it's field type is defined.

Also, try without the "text_en" 
definition (I believe this should be implicit as the filed type of "logtext" 
above).

Geraint

Geraint Duck
Data Scientist
Toxicology and Health Sciences
Syngenta UK
Email: geraint.d...@syngenta.com


-Original Message-
From: Mark Fenbers [mailto:mark.fenb...@noaa.gov]
Sent: 12 October 2015 12:14
To: solr-user@lucene.apache.org
Subject: Re: NullPointerException

On 10/12/2015 5:38 AM, Duck Geraint (ext) GBJH wrote:
> "When I use the Admin UI (v5.3.0), and check the spellcheck.build box"
> Out of interest, where is this option within the Admin UI? I can't find 
> anything like it in mine...
This is in the expanded options that open up once I put a checkmark in the 
"spellcheck" box.
> Do you get the same issue by submitting the build command directly with 
> something like this instead:
> http://localhost:8983/solr//ELspell?spellcheck.build=true
> ?
Yes, I do.
> It'll be reasonably obvious if the dictionary has actually built or not by 
> the file size of your speller store:
> /localapps/dev/EventLog/solr/EventLog2/data/spFile
>
>
> Otherwise, (temporarily) try adding...
> true
> ...to your spellchecker search component config, you might find it'll log a 
> more useful error message that way.
Interesting!  The index builds successfully using this method and I get no 
stacktrace error.  Hurray!  But why??

So now, I tried running a query, so I typed Fenbers into the spellcheck.q box, 
and I get the following 9 suggestions:
fenber
f en be r
f e nb er
f en b er
f e n be r
f en b e r
f e nb e r
f e n b er
f e n b e r

I find this very odd because I commented out all references to the wordbreak 
checker in solrconfig.xml.  What do I configure so that Solr will give me 
sensible suggestions like:
   fenders
   embers
   fenberry
and so on?

Mark




Syngenta Limited, Registered in England No 2710846;Registered Office : Syngenta 
Limited, European Regional Centre, Priestley Road, Surrey Research Park, 
Guildford, Surrey, GU2 7YH, United Kingdom

 This message may contain confidential information. If you are not the 
designated recipient, please notify the sender immediately, and delete the 
original and any copies. Any use of the message by you is prohibited.


Re: NullPointerException

2015-10-12 Thread Mark Fenbers

On 10/12/2015 5:38 AM, Duck Geraint (ext) GBJH wrote:

"When I use the Admin UI (v5.3.0), and check the spellcheck.build box"
Out of interest, where is this option within the Admin UI? I can't find 
anything like it in mine...
This is in the expanded options that open up once I put a checkmark in 
the "spellcheck" box.

Do you get the same issue by submitting the build command directly with 
something like this instead:
http://localhost:8983/solr//ELspell?spellcheck.build=true
?

Yes, I do.

It'll be reasonably obvious if the dictionary has actually built or not by the 
file size of your speller store:
/localapps/dev/EventLog/solr/EventLog2/data/spFile


Otherwise, (temporarily) try adding...
true
...to your spellchecker search component config, you might find it'll log a 
more useful error message that way.
Interesting!  The index builds successfully using this method and I get 
no stacktrace error.  Hurray!  But why??


So now, I tried running a query, so I typed Fenbers into the 
spellcheck.q box, and I get the following 9 suggestions:

fenber
f en be r
f e nb er
f en b er
f e n be r
f en b e r
f e nb e r
f e n b er
f e n b e r

I find this very odd because I commented out all references to the 
wordbreak checker in solrconfig.xml.  What do I configure so that Solr 
will give me sensible suggestions like:

  fenders
  embers
  fenberry
and so on?

Mark



RE: NullPointerException

2015-10-12 Thread Duck Geraint (ext) GBJH
"When I use the Admin UI (v5.3.0), and check the spellcheck.build box"
Out of interest, where is this option within the Admin UI? I can't find 
anything like it in mine...

Do you get the same issue by submitting the build command directly with 
something like this instead:
http://localhost:8983/solr//ELspell?spellcheck.build=true
?

It'll be reasonably obvious if the dictionary has actually built or not by the 
file size of your speller store:
/localapps/dev/EventLog/solr/EventLog2/data/spFile


Otherwise, (temporarily) try adding...
true
...to your spellchecker search component config, you might find it'll log a 
more useful error message that way.

Geraint

Geraint Duck
Data Scientist
Toxicology and Health Sciences
Syngenta UK
Email: geraint.d...@syngenta.com

-Original Message-
From: Mark Fenbers [mailto:mark.fenb...@noaa.gov]
Sent: 10 October 2015 20:03
To: solr User Group
Subject: NullPointerException

Greetings!

I'm new to Solr Spellchecking...  I have yet to get it to work.

Attached is a snippet from my solrconfig.xml pertaining to my spellcheck 
efforts.

When I use the Admin UI (v5.3.0), and check the spellcheck.build box, I get a 
NullPointerException stacktrace.  The actual stacktrace is at the bottom of the 
attachment.  My spellcheck.q is the following:
Solr will yuse suggestions frum both.

The FileBasedSpellChecker.build method is clearly the problem (determined from 
the stack trace), but I cannot figure out why.

Maybe I don't need to do a build on it...(?)  If I don't, the spell-checker 
finds no mispelled words.  yet, "yuse" and "frum" are not stand-alone words in 
/usr/share/dict/words.

/usr/share/dict/words exists and has global read permissions.  I displayed the 
file and see no issues (i.e., one word per line) although some "words" are a 
string of digits, but that shouldn't matter.

Does my snippet give any clues about why I would get this error? Is my stripped 
down configuration missing something, perhaps?

Mark




Syngenta Limited, Registered in England No 2710846;Registered Office : Syngenta 
Limited, European Regional Centre, Priestley Road, Surrey Research Park, 
Guildford, Surrey, GU2 7YH, United Kingdom

 This message may contain confidential information. If you are not the 
designated recipient, please notify the sender immediately, and delete the 
original and any copies. Any use of the message by you is prohibited.


Re: NullPointerException for ExternalFileField when key field has no terms

2014-10-08 Thread Matthew Nigl
Thanks Markus. I initially interpreted the line "It's OK to have a keyField
value that can't be found in the index" as meaning that the key field value
in the external file does not have to exist as a term in the index.





On 8 October 2014 23:56, Markus Jelsma  wrote:

> Hi - yes it is worth a ticket as the javadoc says it is ok:
>
> http://lucene.apache.org/solr/4_10_1/solr-core/org/apache/solr/schema/ExternalFileField.html
>
>
> -Original message-
> > From:Matthew Nigl 
> > Sent: Wednesday 8th October 2014 14:48
> > To: solr-user@lucene.apache.org
> > Subject: NullPointerException for ExternalFileField when key field has
> no terms
> >
> > Hi,
> >
> > I use various ID fields as the keys for various ExternalFileField fields,
> > and I have noticed that I will sometimes get the following error:
> >
> > ERROR org.apache.solr.servlet.SolrDispatchFilter  û
> > null:java.lang.NullPointerException
> > at
> >
> org.apache.solr.search.function.FileFloatSource.getFloats(FileFloatSource.java:273)
> > at
> >
> org.apache.solr.search.function.FileFloatSource.access$000(FileFloatSource.java:51)
> > at
> >
> org.apache.solr.search.function.FileFloatSource$2.createValue(FileFloatSource.java:147)
> > at
> >
> org.apache.solr.search.function.FileFloatSource$Cache.get(FileFloatSource.java:190)
> > at
> >
> org.apache.solr.search.function.FileFloatSource.getCachedFloats(FileFloatSource.java:141)
> > at
> >
> org.apache.solr.search.function.FileFloatSource.getValues(FileFloatSource.java:84)
> > at
> >
> org.apache.solr.response.transform.ValueSourceAugmenter.transform(ValueSourceAugmenter.java:95)
> > at
> >
> org.apache.solr.response.TextResponseWriter.writeDocuments(TextResponseWriter.java:252)
> > at
> >
> org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:170)
> > at
> >
> org.apache.solr.response.JSONWriter.writeNamedListAsMapWithDups(JSONResponseWriter.java:184)
> > at
> >
> org.apache.solr.response.JSONWriter.writeNamedList(JSONResponseWriter.java:300)
> > at
> >
> org.apache.solr.response.JSONWriter.writeResponse(JSONResponseWriter.java:96)
> > at
> >
> org.apache.solr.response.JSONResponseWriter.write(JSONResponseWriter.java:61)
> > at
> >
> org.apache.solr.servlet.SolrDispatchFilter.writeResponse(SolrDispatchFilter.java:765)
> > at
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:426)
> > at
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
> > at
> >
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
> > at
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
> > at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
> > at
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
> > at
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
> > at
> >
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
> > at
> > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
> > at
> >
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
> > at
> >
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
> > at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
> > at
> >
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
> > at
> >
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
> > at
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
> > at org.eclipse.jetty.server.Server.handle(Server.java:368)
> > at
> >
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
> > at
> >
> org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
> > at
> >
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
> > at
> >
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
> > at
> org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
> > at
> > org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
> > at
> >
> org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
> > at
> >
> org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
> > at
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
> >  

RE: NullPointerException for ExternalFileField when key field has no terms

2014-10-08 Thread Markus Jelsma
Hi - yes it is worth a ticket as the javadoc says it is ok:
http://lucene.apache.org/solr/4_10_1/solr-core/org/apache/solr/schema/ExternalFileField.html
 
 
-Original message-
> From:Matthew Nigl 
> Sent: Wednesday 8th October 2014 14:48
> To: solr-user@lucene.apache.org
> Subject: NullPointerException for ExternalFileField when key field has no 
> terms
> 
> Hi,
> 
> I use various ID fields as the keys for various ExternalFileField fields,
> and I have noticed that I will sometimes get the following error:
> 
> ERROR org.apache.solr.servlet.SolrDispatchFilter  û
> null:java.lang.NullPointerException
> at
> org.apache.solr.search.function.FileFloatSource.getFloats(FileFloatSource.java:273)
> at
> org.apache.solr.search.function.FileFloatSource.access$000(FileFloatSource.java:51)
> at
> org.apache.solr.search.function.FileFloatSource$2.createValue(FileFloatSource.java:147)
> at
> org.apache.solr.search.function.FileFloatSource$Cache.get(FileFloatSource.java:190)
> at
> org.apache.solr.search.function.FileFloatSource.getCachedFloats(FileFloatSource.java:141)
> at
> org.apache.solr.search.function.FileFloatSource.getValues(FileFloatSource.java:84)
> at
> org.apache.solr.response.transform.ValueSourceAugmenter.transform(ValueSourceAugmenter.java:95)
> at
> org.apache.solr.response.TextResponseWriter.writeDocuments(TextResponseWriter.java:252)
> at
> org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:170)
> at
> org.apache.solr.response.JSONWriter.writeNamedListAsMapWithDups(JSONResponseWriter.java:184)
> at
> org.apache.solr.response.JSONWriter.writeNamedList(JSONResponseWriter.java:300)
> at
> org.apache.solr.response.JSONWriter.writeResponse(JSONResponseWriter.java:96)
> at
> org.apache.solr.response.JSONResponseWriter.write(JSONResponseWriter.java:61)
> at
> org.apache.solr.servlet.SolrDispatchFilter.writeResponse(SolrDispatchFilter.java:765)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:426)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
> at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
> at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
> at org.eclipse.jetty.server.Server.handle(Server.java:368)
> at
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
> at
> org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
> at
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942)
> at
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004)
> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
> at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
> at
> org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
> at
> org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
> at java.lang.Thread.run(Unknown Source)
> 
> 
> 
> The source code referenced in the error is below (FileFloatSource.java:273):
> 
> TermsEnum termsEnum = MultiFields.getTerms(reader, idName).iterator(null);
> 
> So if there are no terms in the index for the key field, then getTerms will
> return null, and of course trying to call iterator on null will cause the
> exception.
> 
> For my use-case, it makes sense that the key f

Re: NullPointerException

2013-11-22 Thread Bill Bell
It seems to be a modified row and referenced in EvaluatorBag.

I am not familiar with either.

Sent from my iPad

> On Nov 22, 2013, at 3:05 AM, Adrien RUFFIE  wrote:
> 
> Hello all,
> 
> I have perform a full indexation with solr, but when I try to perform an 
> incrementation indexation I get the following exception (cf attachment).
> 
> Any one have a idea of the problem ?
> 
> Greate thank
> 


Re: NullPointerException when debugQuery=true

2012-11-09 Thread Erick Erickson
If this went away when you made your "id" field into a string type rather
than analyzed then it's probably not worth a JIRA...

Erick


On Thu, Nov 8, 2012 at 11:39 AM, Otis Gospodnetic <
otis.gospodne...@gmail.com> wrote:

> Looks like a bug.  If Solr 4.0, maybe this needs to be in JIRA along with
> some sample data you indexed + your schema, so one can reproduce it.
>
> Otis
> --
> Search Analytics - http://sematext.com/search-analytics/index.html
> Performance Monitoring - http://sematext.com/spm/index.html
>
>
> On Thu, Nov 8, 2012 at 9:04 AM, Jeff Rhines  wrote:
>
> > Any help would be greatly appreciated
> >
> > Query:
> >
> /solr/collection1/select?q=*%3A*&fl=id&wt=json&indent=true&debugQuery=true<
> >
> http://solr-zk1/solr/collection1/select?q=*%3A*&fl=id&wt=json&indent=true&debugQuery=true
> > >
> > Result:
> >
> > {
> >   "responseHeader":{
> > "status":500,
> > "QTime":92},
> >   "response":{"numFound":6,"start":0,"maxScore":1.0,"docs":[]
> >   },
> >   "error":{
> > "trace":"java.lang.NullPointerException\n\tat
> >
> >
> org.apache.solr.common.util.NamedList.nameValueMapToList(NamedList.java:109)\n\tat
> > org.apache.solr.common.util.NamedList.(NamedList.java:75)\n\tat
> >
> >
> org.apache.solr.common.util.SimpleOrderedMap.(SimpleOrderedMap.java:58)\n\tat
> >
> >
> org.apache.solr.handler.component.DebugComponent.finishStage(DebugComponent.java:144)\n\tat
> >
> >
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:315)\n\tat
> >
> >
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)\n\tat
> > org.apache.solr.core.SolrCore.execute(SolrCore.java:1699)\n\tat
> >
> >
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:455)\n\tat
> >
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:276)\n\tat
> >
> >
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)\n\tat
> >
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)\n\tat
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)\n\tat
> >
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)\n\tat
> >
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)\n\tat
> >
> >
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)\n\tat
> >
> >
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)\n\tat
> >
> >
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)\n\tat
> >
> >
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)\n\tat
> >
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)\n\tat
> >
> >
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)\n\tat
> >
> >
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)\n\tat
> >
> >
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)\n\tat
> > org.eclipse.jetty.server.Server.handle(Server.java:351)\n\tat
> >
> >
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)\n\tat
> >
> >
> org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)\n\tat
> >
> >
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)\n\tat
> >
> >
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)\n\tat
> > org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)\n\tat
> >
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)\n\tat
> >
> >
> org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)\n\tat
> >
> >
> org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)\n\tat
> >
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)\n\tat
> >
> >
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)\n\tat
> > java.lang.Thread.run(Thread.java:722)\n",
> > "code":500}}
> >
>


Re: NullPointerException when debugQuery=true

2012-11-08 Thread Otis Gospodnetic
Looks like a bug.  If Solr 4.0, maybe this needs to be in JIRA along with
some sample data you indexed + your schema, so one can reproduce it.

Otis
--
Search Analytics - http://sematext.com/search-analytics/index.html
Performance Monitoring - http://sematext.com/spm/index.html


On Thu, Nov 8, 2012 at 9:04 AM, Jeff Rhines  wrote:

> Any help would be greatly appreciated
>
> Query:
> /solr/collection1/select?q=*%3A*&fl=id&wt=json&indent=true&debugQuery=true<
> http://solr-zk1/solr/collection1/select?q=*%3A*&fl=id&wt=json&indent=true&debugQuery=true
> >
> Result:
>
> {
>   "responseHeader":{
> "status":500,
> "QTime":92},
>   "response":{"numFound":6,"start":0,"maxScore":1.0,"docs":[]
>   },
>   "error":{
> "trace":"java.lang.NullPointerException\n\tat
>
> org.apache.solr.common.util.NamedList.nameValueMapToList(NamedList.java:109)\n\tat
> org.apache.solr.common.util.NamedList.(NamedList.java:75)\n\tat
>
> org.apache.solr.common.util.SimpleOrderedMap.(SimpleOrderedMap.java:58)\n\tat
>
> org.apache.solr.handler.component.DebugComponent.finishStage(DebugComponent.java:144)\n\tat
>
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:315)\n\tat
>
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)\n\tat
> org.apache.solr.core.SolrCore.execute(SolrCore.java:1699)\n\tat
>
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:455)\n\tat
>
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:276)\n\tat
>
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)\n\tat
>
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)\n\tat
>
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)\n\tat
>
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)\n\tat
>
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)\n\tat
>
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)\n\tat
>
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)\n\tat
>
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)\n\tat
>
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)\n\tat
>
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)\n\tat
>
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)\n\tat
>
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)\n\tat
>
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)\n\tat
> org.eclipse.jetty.server.Server.handle(Server.java:351)\n\tat
>
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)\n\tat
>
> org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)\n\tat
>
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)\n\tat
>
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)\n\tat
> org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:634)\n\tat
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)\n\tat
>
> org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)\n\tat
>
> org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)\n\tat
>
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)\n\tat
>
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)\n\tat
> java.lang.Thread.run(Thread.java:722)\n",
> "code":500}}
>


Re: NullpointerException when combining spellcheck component and synonyms

2010-09-22 Thread Stefan Moises
 well, to sum it up... it doesn't really matter if I use standard or 
dismax, at the moment both give me NullPointers for the same query, 
although I didn't change anything since it was working ... it seems 
totally random, sometimes it works a couple of times, sometimes it 
doesn't :(


Weird...

Stefan

Am 22.09.2010 19:58, schrieb Stefan Moises:

 Hi all,

wow, this is weird...
now before I file the JIRA issue - one thing I forgot to mention is 
that I am using the edismax query parser.

I've just done the following:

1) searched with edismax parser:
/select?indent=on&version=2.2&q=beffy&fq=&start=0&rows=10&fl=*%2Cscore&qt=dismax&wt=standard&debugQuery=on&explainOther=&hl.fl=&spellcheck=true 


and got the NullPointer as usual

2) changed "dismax" to "standard", just to make sure - using the same 
query:
/select?indent=on&version=2.2&q=beffy&fq=&start=0&rows=10&fl=*%2Cscore&qt=standard&wt=standard&debugQuery=on&explainOther=&hl.fl=&spellcheck=true 


and got 6 results

3) changed back to "dismax" and got the 6 results, again - no more 
NullPointer... !?


Is that something cache-related maybe? Because I've had other indexes 
which at first gave me the NullPointer exception using this setup and 
after a while the synonyms were working, even with spellchecking 
turned on and using edismax...


Just for reference, here is my handler config:


edismax
explicit
0.05

oxtitle^136.9 oxartnum^20.9 oxartnum_exact^30 oxartnum_rev^30 
oxtags^20 seokeywords^25 seodesc^15 oxlongdesc^10 oxcattitle^80.4 
allcattitles_exact^55 allcattitles^50 allcattitles_rev^45 
allcattitles_preserve_rev^50 oxmanu_title^60.0 oxvendor_title^60.0



oxtitle^136.9 oxartnum^20.9 oxartnum_exact^30 oxartnum_rev^30 
oxtags^20 seokeywords^25 seodesc^15 oxlongdesc^10 oxcattitle^80.4 
allcattitles_exact^55 allcattitles^50 allcattitles_rev^45 
allcattitles_preserve_rev^50 oxmanu_title^60.0 oxvendor_title^60.0



2<-1 5<-2 6<90%

100
*:*

oxcattitle oxtitle oxshortdesc oxlongdesc

0

oxtitle
regex 


spellcheck
elevator




Thanks for any hint :)
Stefan

Am 21.09.2010 21:14, schrieb Stefan Moises:

 Sure, no problem, I'll submit a JIRA entry :)

Am 21.09.2010 16:13, schrieb Robert Muir:
I don't think you should get an error like this from 
SynonymFilter... would

you mind opening a JIRA issue?

On Tue, Sep 21, 2010 at 9:49 AM, Stefan Moises  
wrote:



  Hi again,

well it turns out that it still doesn't work ...
Sometimes it works (i.e. for some cores), sometimes I still get the
nullpointer - e.g. if I create a new core and use the same settings 
as a
working one, but index different data, then I add a synonym (e.g. 
"foo =>

bar") and activate spellchecking, then search for "foo" -  boom :(
And I can't really tell where this error comes from... any idea 
where to

start looking?

Thanks,
Stefan

Am 01.09.2010 17:20, schrieb Stefan Moises:

   doh, looks like I only forgot to add the spellcheck component to my

edismax request handler... now it works with:

...

spellcheck
elevator


What's strange is that spellchecking seemed to work *without* that 
entry,

too

Cheers,
Stefan

Am 01.09.2010 13:33, schrieb Stefan Moises:


  Hi there,

I am using Solr from SVN,
https://svn.apache.org/repos/asf/lucene/dev/trunk (my last 
update/build

on my dev server was in July I think)...

I've encountered a strange problem when using the Spellcheck 
component in

combination with the SynonymFilter...
My "text" field is pretty standard, using the default 
synonyms.txt file:
positionIncrementGap="100">





generateWordParts="1"

generateNumberParts="1" catenateWords="1" catenateNumbers="1"
catenateAll="0" splitOnCaseChange="1"/>









generateWordParts="1"

generateNumberParts="1" catenateWords="0" catenateNumbers="0"
catenateAll="0" splitOnCaseChange="1"/>







I have only added some terms at the end of synonyms.txt:
...
# Synonym mappings can be used for spelling correction too
pixima =>  pixma

tekanne =>  teekanne
teekane =>  teekanne
flashen =>  flaschen
flasen =>  flaschen

Here is my query and the exception... if I turn off spellcheck,
everything works as expected and the synonyms are found...

INFO: [db] webapp=/solr path=/select
params={mlt.minwl=3&spellcheck=true&facet=true&mlt.fl=oxmanu_oxid,oxvendor_oxid,oxtags,oxsearchkeys&spellcheck.q=flasen&mlt.mintf=1&facet.limit=-1&mlt=true& 

json.nl=map&hl.fl=oxtitle&hl.fl=oxshortdesc&hl.fl=oxlongdesc&hl.fl=oxtags&hl.fl=seodesc&hl.fl=seokeywords&wt=json&hl=true&rows=10&version=1.2&mlt.mindf=1&debugQuery=true&facet.sort=lex&start=0&q=flasen&facet.field=oxcat_oxid&facet.field=oxcat_oxidtitle&facet.field=oxprice&facet.field=oxmanu_oxid&facet.field=oxmanu_oxidtitle&facet.field=oxvendor_oxid&facet.field=oxvendor_oxidtitle&facet.field=attrgroup_oxid&facet.field=attrgroup_oxidtitle&facet.field=attrgroup_oxidvalue&facet.field=attrvalue_oxid&facet.field=attrvalue_oxidtitle&facet.field=attr2attrgroup_oxidtitle&qt=dismax&spellcheck.build=false} 


hits=2 status=500 QTime=14
01.09.2010 

Re: NullpointerException when combining spellcheck component and synonyms

2010-09-22 Thread Stefan Moises

 Hi all,

wow, this is weird...
now before I file the JIRA issue - one thing I forgot to mention is that 
I am using the edismax query parser.

I've just done the following:

1) searched with edismax parser:
/select?indent=on&version=2.2&q=beffy&fq=&start=0&rows=10&fl=*%2Cscore&qt=dismax&wt=standard&debugQuery=on&explainOther=&hl.fl=&spellcheck=true
and got the NullPointer as usual

2) changed "dismax" to "standard", just to make sure - using the same query:
/select?indent=on&version=2.2&q=beffy&fq=&start=0&rows=10&fl=*%2Cscore&qt=standard&wt=standard&debugQuery=on&explainOther=&hl.fl=&spellcheck=true
and got 6 results

3) changed back to "dismax" and got the 6 results, again - no more 
NullPointer... !?


Is that something cache-related maybe? Because I've had other indexes 
which at first gave me the NullPointer exception using this setup and 
after a while the synonyms were working, even with spellchecking turned 
on and using edismax...


Just for reference, here is my handler config:


edismax
explicit
0.05

oxtitle^136.9 oxartnum^20.9 oxartnum_exact^30 oxartnum_rev^30 
oxtags^20 seokeywords^25 seodesc^15 oxlongdesc^10 oxcattitle^80.4 
allcattitles_exact^55 allcattitles^50 allcattitles_rev^45 
allcattitles_preserve_rev^50 oxmanu_title^60.0 oxvendor_title^60.0



oxtitle^136.9 oxartnum^20.9 oxartnum_exact^30 oxartnum_rev^30 
oxtags^20 seokeywords^25 seodesc^15 oxlongdesc^10 oxcattitle^80.4 
allcattitles_exact^55 allcattitles^50 allcattitles_rev^45 
allcattitles_preserve_rev^50 oxmanu_title^60.0 oxvendor_title^60.0



2<-1 5<-2 6<90%

100
*:*

oxcattitle oxtitle oxshortdesc oxlongdesc

0

oxtitle
regex 


spellcheck
elevator




Thanks for any hint :)
Stefan

Am 21.09.2010 21:14, schrieb Stefan Moises:

 Sure, no problem, I'll submit a JIRA entry :)

Am 21.09.2010 16:13, schrieb Robert Muir:
I don't think you should get an error like this from SynonymFilter... 
would

you mind opening a JIRA issue?

On Tue, Sep 21, 2010 at 9:49 AM, Stefan Moises  
wrote:



  Hi again,

well it turns out that it still doesn't work ...
Sometimes it works (i.e. for some cores), sometimes I still get the
nullpointer - e.g. if I create a new core and use the same settings 
as a
working one, but index different data, then I add a synonym (e.g. 
"foo =>

bar") and activate spellchecking, then search for "foo" -  boom :(
And I can't really tell where this error comes from... any idea 
where to

start looking?

Thanks,
Stefan

Am 01.09.2010 17:20, schrieb Stefan Moises:

   doh, looks like I only forgot to add the spellcheck component to my

edismax request handler... now it works with:

...

spellcheck
elevator


What's strange is that spellchecking seemed to work *without* that 
entry,

too

Cheers,
Stefan

Am 01.09.2010 13:33, schrieb Stefan Moises:


  Hi there,

I am using Solr from SVN,
https://svn.apache.org/repos/asf/lucene/dev/trunk (my last 
update/build

on my dev server was in July I think)...

I've encountered a strange problem when using the Spellcheck 
component in

combination with the SynonymFilter...
My "text" field is pretty standard, using the default synonyms.txt 
file:
positionIncrementGap="100">























I have only added some terms at the end of synonyms.txt:
...
# Synonym mappings can be used for spelling correction too
pixima =>  pixma

tekanne =>  teekanne
teekane =>  teekanne
flashen =>  flaschen
flasen =>  flaschen

Here is my query and the exception... if I turn off spellcheck,
everything works as expected and the synonyms are found...

INFO: [db] webapp=/solr path=/select
params={mlt.minwl=3&spellcheck=true&facet=true&mlt.fl=oxmanu_oxid,oxvendor_oxid,oxtags,oxsearchkeys&spellcheck.q=flasen&mlt.mintf=1&facet.limit=-1&mlt=true& 

json.nl=map&hl.fl=oxtitle&hl.fl=oxshortdesc&hl.fl=oxlongdesc&hl.fl=oxtags&hl.fl=seodesc&hl.fl=seokeywords&wt=json&hl=true&rows=10&version=1.2&mlt.mindf=1&debugQuery=true&facet.sort=lex&start=0&q=flasen&facet.field=oxcat_oxid&facet.field=oxcat_oxidtitle&facet.field=oxprice&facet.field=oxmanu_oxid&facet.field=oxmanu_oxidtitle&facet.field=oxvendor_oxid&facet.field=oxvendor_oxidtitle&facet.field=attrgroup_oxid&facet.field=attrgroup_oxidtitle&facet.field=attrgroup_oxidvalue&facet.field=attrvalue_oxid&facet.field=attrvalue_oxidtitle&facet.field=attr2attrgroup_oxidtitle&qt=dismax&spellcheck.build=false} 


hits=2 status=500 QTime=14
01.09.2010 12:54:47 org.apache.solr.common.SolrException log
SCHWERWIEGEND: java.lang.NullPointerException
at
org.apache.lucene.util.AttributeSource.cloneAttributes(AttributeSource.java:470) 


at
org.apache.lucene.analysis.synonym.SynonymFilter.incrementToken(SynonymFilter.java:128) 


at
org.apache.lucene.analysis.core.StopFilter.incrementToken(StopFilter.java:260) 


at
org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.incrementToken(WordDelimiterFilter.java:336) 


at
org.apache.lucene.analysis.core.LowerCaseFilter.incrementToken(LowerCaseFilter.java:62) 

Re: NullpointerException when combining spellcheck component and synonyms

2010-09-21 Thread Stefan Moises

 Sure, no problem, I'll submit a JIRA entry :)

Am 21.09.2010 16:13, schrieb Robert Muir:

I don't think you should get an error like this from SynonymFilter... would
you mind opening a JIRA issue?

On Tue, Sep 21, 2010 at 9:49 AM, Stefan Moises  wrote:


  Hi again,

well it turns out that it still doesn't work ...
Sometimes it works (i.e. for some cores), sometimes I still get the
nullpointer - e.g. if I create a new core and use the same settings as a
working one, but index different data, then I add a synonym (e.g. "foo =>
bar") and activate spellchecking, then search for "foo" -  boom :(
And I can't really tell where this error comes from... any idea where to
start looking?

Thanks,
Stefan

Am 01.09.2010 17:20, schrieb Stefan Moises:

   doh, looks like I only forgot to add the spellcheck component to my

edismax request handler... now it works with:

...

spellcheck
elevator


What's strange is that spellchecking seemed to work *without* that entry,
too

Cheers,
Stefan

Am 01.09.2010 13:33, schrieb Stefan Moises:


  Hi there,

I am using Solr from SVN,
https://svn.apache.org/repos/asf/lucene/dev/trunk (my last update/build
on my dev server was in July I think)...

I've encountered a strange problem when using the Spellcheck component in
combination with the SynonymFilter...
My "text" field is pretty standard, using the default synonyms.txt file:























I have only added some terms at the end of synonyms.txt:
...
# Synonym mappings can be used for spelling correction too
pixima =>  pixma

tekanne =>  teekanne
teekane =>  teekanne
flashen =>  flaschen
flasen =>  flaschen

Here is my query and the exception... if I turn off spellcheck,
everything works as expected and the synonyms are found...

INFO: [db] webapp=/solr path=/select
params={mlt.minwl=3&spellcheck=true&facet=true&mlt.fl=oxmanu_oxid,oxvendor_oxid,oxtags,oxsearchkeys&spellcheck.q=flasen&mlt.mintf=1&facet.limit=-1&mlt=true&
json.nl=map&hl.fl=oxtitle&hl.fl=oxshortdesc&hl.fl=oxlongdesc&hl.fl=oxtags&hl.fl=seodesc&hl.fl=seokeywords&wt=json&hl=true&rows=10&version=1.2&mlt.mindf=1&debugQuery=true&facet.sort=lex&start=0&q=flasen&facet.field=oxcat_oxid&facet.field=oxcat_oxidtitle&facet.field=oxprice&facet.field=oxmanu_oxid&facet.field=oxmanu_oxidtitle&facet.field=oxvendor_oxid&facet.field=oxvendor_oxidtitle&facet.field=attrgroup_oxid&facet.field=attrgroup_oxidtitle&facet.field=attrgroup_oxidvalue&facet.field=attrvalue_oxid&facet.field=attrvalue_oxidtitle&facet.field=attr2attrgroup_oxidtitle&qt=dismax&spellcheck.build=false}
hits=2 status=500 QTime=14
01.09.2010 12:54:47 org.apache.solr.common.SolrException log
SCHWERWIEGEND: java.lang.NullPointerException
at
org.apache.lucene.util.AttributeSource.cloneAttributes(AttributeSource.java:470)
at
org.apache.lucene.analysis.synonym.SynonymFilter.incrementToken(SynonymFilter.java:128)
at
org.apache.lucene.analysis.core.StopFilter.incrementToken(StopFilter.java:260)
at
org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.incrementToken(WordDelimiterFilter.java:336)
at
org.apache.lucene.analysis.core.LowerCaseFilter.incrementToken(LowerCaseFilter.java:62)
at
org.apache.solr.handler.component.SpellCheckComponent.getTokens(SpellCheckComponent.java:380)
at
org.apache.solr.handler.component.SpellCheckComponent.process(SpellCheckComponent.java:127)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:203)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1323)
at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:337)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:240)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at
org.apache.tomcat

Re: NullpointerException when combining spellcheck component and synonyms

2010-09-21 Thread Robert Muir
I don't think you should get an error like this from SynonymFilter... would
you mind opening a JIRA issue?

On Tue, Sep 21, 2010 at 9:49 AM, Stefan Moises  wrote:

>  Hi again,
>
> well it turns out that it still doesn't work ...
> Sometimes it works (i.e. for some cores), sometimes I still get the
> nullpointer - e.g. if I create a new core and use the same settings as a
> working one, but index different data, then I add a synonym (e.g. "foo =>
> bar") and activate spellchecking, then search for "foo" -  boom :(
> And I can't really tell where this error comes from... any idea where to
> start looking?
>
> Thanks,
> Stefan
>
> Am 01.09.2010 17:20, schrieb Stefan Moises:
>
>   doh, looks like I only forgot to add the spellcheck component to my
>> edismax request handler... now it works with:
>>
>> ...
>> 
>> spellcheck
>> elevator
>> 
>>
>> What's strange is that spellchecking seemed to work *without* that entry,
>> too
>>
>> Cheers,
>> Stefan
>>
>> Am 01.09.2010 13:33, schrieb Stefan Moises:
>>
>>>  Hi there,
>>>
>>> I am using Solr from SVN,
>>> https://svn.apache.org/repos/asf/lucene/dev/trunk (my last update/build
>>> on my dev server was in July I think)...
>>>
>>> I've encountered a strange problem when using the Spellcheck component in
>>> combination with the SynonymFilter...
>>> My "text" field is pretty standard, using the default synonyms.txt file:
>>> 
>>> 
>>> 
>>> 
>>> >> words="stopwords.txt"/>
>>> >> generateNumberParts="1" catenateWords="1" catenateNumbers="1"
>>> catenateAll="0" splitOnCaseChange="1"/>
>>> 
>>> 
>>> >> protected="protwords.txt"/>
>>> 
>>> 
>>> 
>>> 
>>> >> ignoreCase="true" expand="true"/>
>>> >> words="stopwords.txt"/>
>>> >> generateNumberParts="1" catenateWords="0" catenateNumbers="0"
>>> catenateAll="0" splitOnCaseChange="1"/>
>>> 
>>> 
>>> >> protected="protwords.txt"/>
>>> 
>>> 
>>> 
>>>
>>> I have only added some terms at the end of synonyms.txt:
>>> ...
>>> # Synonym mappings can be used for spelling correction too
>>> pixima => pixma
>>>
>>> tekanne => teekanne
>>> teekane => teekanne
>>> flashen => flaschen
>>> flasen => flaschen
>>>
>>> Here is my query and the exception... if I turn off spellcheck,
>>> everything works as expected and the synonyms are found...
>>>
>>> INFO: [db] webapp=/solr path=/select
>>> params={mlt.minwl=3&spellcheck=true&facet=true&mlt.fl=oxmanu_oxid,oxvendor_oxid,oxtags,oxsearchkeys&spellcheck.q=flasen&mlt.mintf=1&facet.limit=-1&mlt=true&
>>> json.nl=map&hl.fl=oxtitle&hl.fl=oxshortdesc&hl.fl=oxlongdesc&hl.fl=oxtags&hl.fl=seodesc&hl.fl=seokeywords&wt=json&hl=true&rows=10&version=1.2&mlt.mindf=1&debugQuery=true&facet.sort=lex&start=0&q=flasen&facet.field=oxcat_oxid&facet.field=oxcat_oxidtitle&facet.field=oxprice&facet.field=oxmanu_oxid&facet.field=oxmanu_oxidtitle&facet.field=oxvendor_oxid&facet.field=oxvendor_oxidtitle&facet.field=attrgroup_oxid&facet.field=attrgroup_oxidtitle&facet.field=attrgroup_oxidvalue&facet.field=attrvalue_oxid&facet.field=attrvalue_oxidtitle&facet.field=attr2attrgroup_oxidtitle&qt=dismax&spellcheck.build=false}
>>> hits=2 status=500 QTime=14
>>> 01.09.2010 12:54:47 org.apache.solr.common.SolrException log
>>> SCHWERWIEGEND: java.lang.NullPointerException
>>>at
>>> org.apache.lucene.util.AttributeSource.cloneAttributes(AttributeSource.java:470)
>>>at
>>> org.apache.lucene.analysis.synonym.SynonymFilter.incrementToken(SynonymFilter.java:128)
>>>at
>>> org.apache.lucene.analysis.core.StopFilter.incrementToken(StopFilter.java:260)
>>>at
>>> org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.incrementToken(WordDelimiterFilter.java:336)
>>>at
>>> org.apache.lucene.analysis.core.LowerCaseFilter.incrementToken(LowerCaseFilter.java:62)
>>>at
>>> org.apache.solr.handler.component.SpellCheckComponent.getTokens(SpellCheckComponent.java:380)
>>>at
>>> org.apache.solr.handler.component.SpellCheckComponent.process(SpellCheckComponent.java:127)
>>>at
>>> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:203)
>>>at
>>> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
>>>at org.apache.solr.core.SolrCore.execute(SolrCore.java:1323)
>>>at
>>> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:337)
>>>at
>>> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:240)
>>>at
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>>>at
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>>at
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>>>at
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>>>at
>>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)
>>>at
>>> or

Re: NullpointerException when combining spellcheck component and synonyms

2010-09-21 Thread Stefan Moises

 Hi again,

well it turns out that it still doesn't work ...
Sometimes it works (i.e. for some cores), sometimes I still get the 
nullpointer - e.g. if I create a new core and use the same settings as a 
working one, but index different data, then I add a synonym (e.g. "foo 
=> bar") and activate spellchecking, then search for "foo" -  boom :(
And I can't really tell where this error comes from... any idea where to 
start looking?


Thanks,
Stefan

Am 01.09.2010 17:20, schrieb Stefan Moises:
 doh, looks like I only forgot to add the spellcheck component to my 
edismax request handler... now it works with:


...

spellcheck
elevator


What's strange is that spellchecking seemed to work *without* that 
entry, too


Cheers,
Stefan

Am 01.09.2010 13:33, schrieb Stefan Moises:

 Hi there,

I am using Solr from SVN, 
https://svn.apache.org/repos/asf/lucene/dev/trunk (my last 
update/build on my dev server was in July I think)...


I've encountered a strange problem when using the Spellcheck 
component in combination with the SynonymFilter...

My "text" field is pretty standard, using the default synonyms.txt file:
positionIncrementGap="100">




words="stopwords.txt"/>
generateNumberParts="1" catenateWords="1" catenateNumbers="1" 
catenateAll="0" splitOnCaseChange="1"/>



protected="protwords.txt"/>





ignoreCase="true" expand="true"/>
words="stopwords.txt"/>
generateNumberParts="1" catenateWords="0" catenateNumbers="0" 
catenateAll="0" splitOnCaseChange="1"/>



protected="protwords.txt"/>





I have only added some terms at the end of synonyms.txt:
...
# Synonym mappings can be used for spelling correction too
pixima => pixma

tekanne => teekanne
teekane => teekanne
flashen => flaschen
flasen => flaschen

Here is my query and the exception... if I turn off spellcheck, 
everything works as expected and the synonyms are found...


INFO: [db] webapp=/solr path=/select 
params={mlt.minwl=3&spellcheck=true&facet=true&mlt.fl=oxmanu_oxid,oxvendor_oxid,oxtags,oxsearchkeys&spellcheck.q=flasen&mlt.mintf=1&facet.limit=-1&mlt=true&json.nl=map&hl.fl=oxtitle&hl.fl=oxshortdesc&hl.fl=oxlongdesc&hl.fl=oxtags&hl.fl=seodesc&hl.fl=seokeywords&wt=json&hl=true&rows=10&version=1.2&mlt.mindf=1&debugQuery=true&facet.sort=lex&start=0&q=flasen&facet.field=oxcat_oxid&facet.field=oxcat_oxidtitle&facet.field=oxprice&facet.field=oxmanu_oxid&facet.field=oxmanu_oxidtitle&facet.field=oxvendor_oxid&facet.field=oxvendor_oxidtitle&facet.field=attrgroup_oxid&facet.field=attrgroup_oxidtitle&facet.field=attrgroup_oxidvalue&facet.field=attrvalue_oxid&facet.field=attrvalue_oxidtitle&facet.field=attr2attrgroup_oxidtitle&qt=dismax&spellcheck.build=false} 
hits=2 status=500 QTime=14

01.09.2010 12:54:47 org.apache.solr.common.SolrException log
SCHWERWIEGEND: java.lang.NullPointerException
at 
org.apache.lucene.util.AttributeSource.cloneAttributes(AttributeSource.java:470)
at 
org.apache.lucene.analysis.synonym.SynonymFilter.incrementToken(SynonymFilter.java:128)
at 
org.apache.lucene.analysis.core.StopFilter.incrementToken(StopFilter.java:260)
at 
org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.incrementToken(WordDelimiterFilter.java:336)
at 
org.apache.lucene.analysis.core.LowerCaseFilter.incrementToken(LowerCaseFilter.java:62)
at 
org.apache.solr.handler.component.SpellCheckComponent.getTokens(SpellCheckComponent.java:380)
at 
org.apache.solr.handler.component.SpellCheckComponent.process(SpellCheckComponent.java:127)
at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:203)
at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)

at org.apache.solr.core.SolrCore.execute(SolrCore.java:1323)
at 
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:337)
at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:240)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java

Re: NullpointerException when combining spellcheck component and synonyms

2010-09-01 Thread Stefan Moises
 doh, looks like I only forgot to add the spellcheck component to my 
edismax request handler... now it works with:


...

spellcheck
elevator


What's strange is that spellchecking seemed to work *without* that 
entry, too


Cheers,
Stefan

Am 01.09.2010 13:33, schrieb Stefan Moises:

 Hi there,

I am using Solr from SVN, 
https://svn.apache.org/repos/asf/lucene/dev/trunk (my last 
update/build on my dev server was in July I think)...


I've encountered a strange problem when using the Spellcheck component 
in combination with the SynonymFilter...

My "text" field is pretty standard, using the default synonyms.txt file:




words="stopwords.txt"/>
generateNumberParts="1" catenateWords="1" catenateNumbers="1" 
catenateAll="0" splitOnCaseChange="1"/>



protected="protwords.txt"/>





ignoreCase="true" expand="true"/>
words="stopwords.txt"/>
generateNumberParts="1" catenateWords="0" catenateNumbers="0" 
catenateAll="0" splitOnCaseChange="1"/>



protected="protwords.txt"/>





I have only added some terms at the end of synonyms.txt:
...
# Synonym mappings can be used for spelling correction too
pixima => pixma

tekanne => teekanne
teekane => teekanne
flashen => flaschen
flasen => flaschen

Here is my query and the exception... if I turn off spellcheck, 
everything works as expected and the synonyms are found...


INFO: [db] webapp=/solr path=/select 
params={mlt.minwl=3&spellcheck=true&facet=true&mlt.fl=oxmanu_oxid,oxvendor_oxid,oxtags,oxsearchkeys&spellcheck.q=flasen&mlt.mintf=1&facet.limit=-1&mlt=true&json.nl=map&hl.fl=oxtitle&hl.fl=oxshortdesc&hl.fl=oxlongdesc&hl.fl=oxtags&hl.fl=seodesc&hl.fl=seokeywords&wt=json&hl=true&rows=10&version=1.2&mlt.mindf=1&debugQuery=true&facet.sort=lex&start=0&q=flasen&facet.field=oxcat_oxid&facet.field=oxcat_oxidtitle&facet.field=oxprice&facet.field=oxmanu_oxid&facet.field=oxmanu_oxidtitle&facet.field=oxvendor_oxid&facet.field=oxvendor_oxidtitle&facet.field=attrgroup_oxid&facet.field=attrgroup_oxidtitle&facet.field=attrgroup_oxidvalue&facet.field=attrvalue_oxid&facet.field=attrvalue_oxidtitle&facet.field=attr2attrgroup_oxidtitle&qt=dismax&spellcheck.build=false} 
hits=2 status=500 QTime=14

01.09.2010 12:54:47 org.apache.solr.common.SolrException log
SCHWERWIEGEND: java.lang.NullPointerException
at 
org.apache.lucene.util.AttributeSource.cloneAttributes(AttributeSource.java:470)
at 
org.apache.lucene.analysis.synonym.SynonymFilter.incrementToken(SynonymFilter.java:128)
at 
org.apache.lucene.analysis.core.StopFilter.incrementToken(StopFilter.java:260)
at 
org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter.incrementToken(WordDelimiterFilter.java:336)
at 
org.apache.lucene.analysis.core.LowerCaseFilter.incrementToken(LowerCaseFilter.java:62)
at 
org.apache.solr.handler.component.SpellCheckComponent.getTokens(SpellCheckComponent.java:380)
at 
org.apache.solr.handler.component.SpellCheckComponent.process(SpellCheckComponent.java:127)
at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:203)
at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)

at org.apache.solr.core.SolrCore.execute(SolrCore.java:1323)
at 
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:337)
at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:240)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:465)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)

at java.lang.Thread.run(Thread.java:619)

Thanks for any hint what I may be doing wrong! :)
Stefan




--
***
Stefan Moises
Senior Softwareentwickler

shoptimax GmbH
Guntherstraße 45 a
90461 Nürnberg
Amtsgericht Nürnberg HRB 21703
GF Friedrich Schreieck

Tel.: 0911/25566-25
Fax

Re: NullPointerException with CURL, but not in browser

2010-07-27 Thread Rene Rath
Ouch! Absolutely correct - quoting the URL fixed it. Thanks for saving me a
sleepless night!

cheers - rene

2010/7/26 Chris Hostetter 

>
> : However, when I'm trying this very URL with curl within my (perl) script,
> I
> : receive a NullPointerException:
> : CURL-COMMAND: curl -sL
> :
> http://localhost:8983/solr/select?indent=on&version=2.2&q=*&fq=ListId%3A881&start=0&rows=0&fl=*%2Cscore&qt=standard&wt=standard
>
> it appears you aren't quoting the URL, so that first "&" character  is
> causing the shell to think yo uare done with the command, and you want it
> to be backgrounded (allthough i'm not certain, since it depends on how you
> are having perl execute curl)
>
> i would suggest that you avoid exec/system calls to "curl" from Perl, and
> use an LWP::UserAgent instead.
>
>
> -Hoss
>
>


Re: NullPointerException with CURL, but not in browser

2010-07-26 Thread Chris Hostetter

: However, when I'm trying this very URL with curl within my (perl) script, I
: receive a NullPointerException:
: CURL-COMMAND: curl -sL
: 
http://localhost:8983/solr/select?indent=on&version=2.2&q=*&fq=ListId%3A881&start=0&rows=0&fl=*%2Cscore&qt=standard&wt=standard

it appears you aren't quoting the URL, so that first "&" character  is 
causing the shell to think yo uare done with the command, and you want it 
to be backgrounded (allthough i'm not certain, since it depends on how you 
are having perl execute curl)

i would suggest that you avoid exec/system calls to "curl" from Perl, and 
use an LWP::UserAgent instead.


-Hoss



Re: NullPointerException in ReplicationHandler.postCommit + question about compression

2010-02-15 Thread Shalin Shekhar Mangar
On Sat, Jan 30, 2010 at 5:08 AM, Chris Hostetter
wrote:

>
> : never keep a 0.
> :
> : It is better to leave not mention the deletionPolicy at all. The
> : defaults are usually fine.
>
> if setting the "keep" values to 0 results in NPEs we should do one (if not
> both) of the following...
>
> 1) change the init code to warn/fail if the values are 0 (not sure if
> there is ever a legitimate use for 0 as a value)
>
> 2) change the code that's currently throwing an NPE to check it's
> assumptings and log a more meaninful error if it can't function because of
> the existing config.
>
>
Setting the keep values to 0 does not result in NPEs. Setting both
maxCommitsToKeep and maxOptimizedCommitsToKeep to 0 is invalid and should be
checked for. However, this problem is different. We use the same
configuration in production and we haven't seen an NPE like that. I'm not
able to reproduce this locally too.

-- 
Regards,
Shalin Shekhar Mangar.


Re: NullPointerException in ReplicationHandler.postCommit + question about compression

2010-01-29 Thread Chris Hostetter

: never keep a 0.
: 
: It is better to leave not mention the deletionPolicy at all. The
: defaults are usually fine.

if setting the "keep" values to 0 results in NPEs we should do one (if not 
both) of the following...

1) change the init code to warn/fail if the values are 0 (not sure if 
there is ever a legitimate use for 0 as a value)

2) change the code that's currently throwing an NPE to check it's 
assumptings and log a more meaninful error if it can't function because of 
the existing config.


-Hoss



Re: NullPointerException in ReplicationHandler.postCommit + question about compression

2010-01-26 Thread Noble Paul നോബിള്‍ नोब्ळ्
never keep a 0.

It is better to leave not mention the deletionPolicy at all. The
defaults are usually fine.

On Fri, Jan 22, 2010 at 11:12 AM, Stephen Weiss  wrote:
> Hi Shalin,
>
> Thanks for your reply.  Please see below.
>
>
> On Jan 18, 2010, at 4:19 AM, Shalin Shekhar Mangar wrote:
>
>> On Wed, Jan 13, 2010 at 12:51 AM, Stephen Weiss
>> wrote:
>> ...
>
>>>  When we replicate
>>> manually (via the admin page) things seem to go well.  However, when
>>> replication is triggered by a commit event on the master, the master gets
>>> a
>>> NullPointerException and no replication seems to take place.
>>>
>>> SEVERE: java.lang.NullPointerException

      at

 org.apache.solr.handler.ReplicationHandler$4.postCommit(ReplicationHandler.java:922)
      at...
>>>
>>> Does anyone know off the top of their head what this might indicate, or
>>> know what further troubleshooting steps we should be taking to isolate
>>> the
>>> issue?
>>>
>>
>> That is a strange one. It looks like the latest commit point was null. Do
>> you have a deletion policy section in your solrconfig.xml? Are you always
>> able to reproduce the exception?
>
> We are always able to reproduce the exception.
>
> The master has committed changes many times for over a year now... so if
> that's what's being reported, it's not quite accurate.
>
> This is our deletion policy.  I don't believe that I've edited it, it is
> probably verbatim from the example (the example of what version of Solr, I
> can't tell you for sure, but I imagine it's from 1.2 or 1.4 - we never
> updated the config when using 1.3).
>
>>    
>>      1
>>      0
>>    
>
> (removing comments per Noble Paul's request...  we keep these in the file
> for our own readability purposes but agreed, we have no need to e-mail them
> along)
>
> I would have never thought to look there but it does seem suspicious now
> that you mention it.  For a proper replication configuration where we
> replicate on commit, is there a recommended setting?
>
>>> ...
>>>
>> During our tests we found that enabling compression on a gigabit ethernet
>> actually degrades transfer rate because of the compress/de-compress
>> overhead. Just comment out that line to disable compression.
>
> Thank you for the clarification.  We will comment it out.
>
> --
> Steve



-- 
-
Noble Paul | Systems Architect| AOL | http://aol.com


Re: NullPointerException in ReplicationHandler.postCommit + question about compression

2010-01-21 Thread Stephen Weiss

Hi Shalin,

Thanks for your reply.  Please see below.


On Jan 18, 2010, at 4:19 AM, Shalin Shekhar Mangar wrote:

On Wed, Jan 13, 2010 at 12:51 AM, Stephen Weiss  
wrote:

...



 When we replicate
manually (via the admin page) things seem to go well.  However, when
replication is triggered by a commit event on the master, the  
master gets a

NullPointerException and no replication seems to take place.

SEVERE: java.lang.NullPointerException

  at
org.apache.solr.handler.ReplicationHandler 
$4.postCommit(ReplicationHandler.java:922)

  at...


Does anyone know off the top of their head what this might  
indicate, or
know what further troubleshooting steps we should be taking to  
isolate the

issue?



That is a strange one. It looks like the latest commit point was  
null. Do
you have a deletion policy section in your solrconfig.xml? Are you  
always

able to reproduce the exception?


We are always able to reproduce the exception.

The master has committed changes many times for over a year now... so  
if that's what's being reported, it's not quite accurate.


This is our deletion policy.  I don't believe that I've edited it, it  
is probably verbatim from the example (the example of what version of  
Solr, I can't tell you for sure, but I imagine it's from 1.2 or 1.4 -  
we never updated the config when using 1.3).




  1
  0



(removing comments per Noble Paul's request...  we keep these in the  
file for our own readability purposes but agreed, we have no need to e- 
mail them along)


I would have never thought to look there but it does seem suspicious  
now that you mention it.  For a proper replication configuration where  
we replicate on commit, is there a recommended setting?



...

During our tests we found that enabling compression on a gigabit  
ethernet

actually degrades transfer rate because of the compress/de-compress
overhead. Just comment out that line to disable compression.


Thank you for the clarification.  We will comment it out.

--
Steve

Re: NullPointerException in ReplicationHandler.postCommit + question about compression

2010-01-18 Thread Noble Paul നോബിള്‍ नोब्ळ्
When you copy paste config from wiki, just copy what you need.
excluding documentation and comments

On Wed, Jan 13, 2010 at 12:51 AM, Stephen Weiss  wrote:
> Hi Solr List,
>
> We're trying to set up java-based replication with Solr 1.4 (dist tarball).
>  We are running this to start with on a pair of test servers just to see how
> things go.
>
> There's one major problem we can't seem to get past.  When we replicate
> manually (via the admin page) things seem to go well.  However, when
> replication is triggered by a commit event on the master, the master gets a
> NullPointerException and no replication seems to take place.
>
>> SEVERE: java.lang.NullPointerException
>>        at
>> org.apache.solr.handler.ReplicationHandler$4.postCommit(ReplicationHandler.java:922)
>>        at
>> org.apache.solr.update.UpdateHandler.callPostCommitCallbacks(UpdateHandler.java:78)
>>        at
>> org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:411)
>>        at
>> org.apache.solr.update.processor.RunUpdateProcessor.processCommit(RunUpdateProcessorFactory.java:85)
>>        at
>> org.apache.solr.handler.XMLLoader.processUpdate(XMLLoader.java:169)
>>        at org.apache.solr.handler.XMLLoader.load(XMLLoader.java:69)
>>        at
>> org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:54)
>>        at
>> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
>>        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
>>        at
>> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:336)
>>        at
>> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:239)
>>        at
>> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1115)
>>        at
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:361)
>>        at
>> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>>        at
>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>>        at
>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
>>        at
>> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
>>        at
>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
>>        at
>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>        at
>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>>        at org.mortbay.jetty.Server.handle(Server.java:324)
>>        at
>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:534)
>>        at
>> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:879)
>>        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:741)
>>        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:213)
>>        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:403)
>>        at
>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
>>        at
>> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522)
>>
>
>
> This is the master config:
>
>  
>    
>        
>        commit
>
>        
>        
>
>        
>         name="confFiles">solrconfig_slave.xml:solrconfig.xml,schema.xml,synonyms.txt,stopwords.txt,elevate.xml
>
>        
>        00:00:10
>    
>  
>
>
> and... the slave config:
>
>  
>    
>
>        
>         name="masterUrl">http://hostname.obscured.com:8080/solr/calendar_core/replication
>
>        
>        00:00:20
>
>        
>        
>        internal
>        
>
>      
>        5000
>        1
>
>        
>        
>
>     
>  
>
>
> Does anyone know off the top of their head what this might indicate, or know
> what further troubleshooting steps we should be taking to isolate the issue?
>
> Also, on a (probably) unrelated topic, we're kinda confused by this section
> of the slave config:
>
>        
>        internal
>
> Since we *are* on a LAN, what exactly should we be doing here?  The language
> is somewhat unclear... I thought that meant that we should just comment out
> the line altogether, but others think it means that we should leave it set
> to "internal".  We get that compression is probably unnecessary for our more
> vanilla setup, we're just not 100% sure how to express that correctly.
>
> Thanks in advance for any advice!
>
> --
> Steve
>



-- 
-
Noble Paul | Systems Architect| AOL | http://aol.com


Re: NullPointerException in ReplicationHandler.postCommit + question about compression

2010-01-18 Thread Shalin Shekhar Mangar
On Wed, Jan 13, 2010 at 12:51 AM, Stephen Weiss wrote:

> Hi Solr List,
>
> We're trying to set up java-based replication with Solr 1.4 (dist tarball).
>  We are running this to start with on a pair of test servers just to see how
> things go.
>
> There's one major problem we can't seem to get past.  When we replicate
> manually (via the admin page) things seem to go well.  However, when
> replication is triggered by a commit event on the master, the master gets a
> NullPointerException and no replication seems to take place.
>
>  SEVERE: java.lang.NullPointerException
>>at
>> org.apache.solr.handler.ReplicationHandler$4.postCommit(ReplicationHandler.java:922)
>>at
>> org.apache.solr.update.UpdateHandler.callPostCommitCallbacks(UpdateHandler.java:78)
>>at
>> org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:411)
>>
>
> Does anyone know off the top of their head what this might indicate, or
> know what further troubleshooting steps we should be taking to isolate the
> issue?
>

That is a strange one. It looks like the latest commit point was null. Do
you have a deletion policy section in your solrconfig.xml? Are you always
able to reproduce the exception?


>
> Also, on a (probably) unrelated topic, we're kinda confused by this section
> of the slave config:
>
>
>internal
>
> Since we *are* on a LAN, what exactly should we be doing here?  The
> language is somewhat unclear... I thought that meant that we should just
> comment out the line altogether, but others think it means that we should
> leave it set to "internal".  We get that compression is probably unnecessary
> for our more vanilla setup, we're just not 100% sure how to express that
> correctly.
>
>
During our tests we found that enabling compression on a gigabit ethernet
actually degrades transfer rate because of the compress/de-compress
overhead. Just comment out that line to disable compression.

-- 
Regards,
Shalin Shekhar Mangar.


Re: NullPointerException thrown during updates to index

2009-12-16 Thread smock

Just to clarify, the error is being thrown FROM a search, DURING an update.

This error is making distributed SOLR close to unusable for me.  Any ideas? 
Does SOLR fail on searches if one node takes too long to respond?  



hossman wrote:
> 
> : Hi,
> : I'm running a distributed solr index (3 nodes) and have noticed frequent
> : exceptions thrown during updates.  The exception (see below for full
> trace)
> 
> what do you mean "during updates" ? ... QueryComponent isn't used at all 
> when updating hte index, so there may be a missunderstanding here.
> 
> I'm not very familiar with the code in question, but i opened a bug to 
> track it, please update with any new info you may have as you do more 
> testing...
> 
> https://issues.apache.org/jira/browse/SOLR-1631
> 
> 
> 
> 
> 
> -Hoss
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/NullPointerException-thrown-during-updates-to-index-tp26613309p26819479.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: NullPointerException thrown during updates to index

2009-12-07 Thread Chris Hostetter
: Hi,
: I'm running a distributed solr index (3 nodes) and have noticed frequent
: exceptions thrown during updates.  The exception (see below for full trace)

what do you mean "during updates" ? ... QueryComponent isn't used at all 
when updating hte index, so there may be a missunderstanding here.

I'm not very familiar with the code in question, but i opened a bug to 
track it, please update with any new info you may have as you do more 
testing...

https://issues.apache.org/jira/browse/SOLR-1631





-Hoss



Re: NullPointerException thrown during updates to index

2009-12-02 Thread smock

I'm using a very slightly modified version of a nightly build from the middle
of September.  

It seems like this isn't the only report of problems of this sort:

http://markmail.org/message/zept5u3hv4ytunfv#query:solr%20commit%20connection%20reset%20mergeids+page:1+mid:aqzaaphbuow4sa5o+state:results




Erick Erickson wrote:
> 
> What version are you using? If a nightly build, from when?
> 
> Thanks
> Erick
> 
> On Wed, Dec 2, 2009 at 12:53 PM, smock  wrote:
> 
>>
>> Hi,
>> I'm running a distributed solr index (3 nodes) and have noticed frequent
>> exceptions thrown during updates.  The exception (see below for full
>> trace)
>> occurs in the mergeIds function of QueryComponents, in this code block:
>>  Map resultIds = new HashMap();
>>  for (int i=resultSize-1; i>=0; i--) {
>>ShardDoc shardDoc = (ShardDoc)queue.pop();
>>shardDoc.positionInResponse = i;
>>// Need the toString() for correlation with other lists that must
>>// be strings (like keys in highlighting, explain, etc)
>>resultIds.put(shardDoc.id.toString(), shardDoc);
>>  }
>>
>>
>> specifically, in the line:
>>shardDoc.positionInResponse = i;
>>
>>
>> I really have no idea why this would be happening or how to begin
>> debugging
>> this error.  Any ideas would be greatly appreciated.
>>
>> Thanks,
>> -Harish
>>
>>
>>
>>
>> The server encountered an internal error (null
>> java.lang.NullPointerException at
>>
>> org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:459)
>> at
>>
>> org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:298)
>> at
>>
>> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:290)
>> at
>>
>> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
>> at org.apache.solr.core.SolrCore.execute(SolrCore.java:1301) at
>>
>> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
>> at
>>
>> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
>> at
>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>> at
>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>> at
>>
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>> at org.apache.catali...ing this request.
>>
>> --
>> View this message in context:
>> http://old.nabble.com/NullPointerException-thrown-during-updates-to-index-tp26613309p26613309.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://old.nabble.com/NullPointerException-thrown-during-updates-to-index-tp26613309p26615934.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: NullPointerException thrown during updates to index

2009-12-02 Thread Erick Erickson
What version are you using? If a nightly build, from when?

Thanks
Erick

On Wed, Dec 2, 2009 at 12:53 PM, smock  wrote:

>
> Hi,
> I'm running a distributed solr index (3 nodes) and have noticed frequent
> exceptions thrown during updates.  The exception (see below for full trace)
> occurs in the mergeIds function of QueryComponents, in this code block:
>  Map resultIds = new HashMap();
>  for (int i=resultSize-1; i>=0; i--) {
>ShardDoc shardDoc = (ShardDoc)queue.pop();
>shardDoc.positionInResponse = i;
>// Need the toString() for correlation with other lists that must
>// be strings (like keys in highlighting, explain, etc)
>resultIds.put(shardDoc.id.toString(), shardDoc);
>  }
>
>
> specifically, in the line:
>shardDoc.positionInResponse = i;
>
>
> I really have no idea why this would be happening or how to begin debugging
> this error.  Any ideas would be greatly appreciated.
>
> Thanks,
> -Harish
>
>
>
>
> The server encountered an internal error (null
> java.lang.NullPointerException at
>
> org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:459)
> at
>
> org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:298)
> at
>
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:290)
> at
>
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
> at org.apache.solr.core.SolrCore.execute(SolrCore.java:1301) at
>
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
> at
>
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
> at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> at org.apache.catali...ing this request.
>
> --
> View this message in context:
> http://old.nabble.com/NullPointerException-thrown-during-updates-to-index-tp26613309p26613309.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>


Re: NullPointerException with TermVectorComponent

2009-11-02 Thread david.stu...@progressivealliance.co.uk
I think it might be to do with the library itself

I downloaded semanticvectors-1.22 and compiled from source. Then created a demo
corpus using 
java org.apache.lucene.demo.IndexFiles against the lucene src directory
I then ran a java pitt.search.semanticvectors.BuildIndex against the index and
got the following

Seedlength = 10
Dimension = 200
Minimum frequency = 0
Number non-alphabet characters = 0
Contents fields are: [contents]
Creating semantic term vectors ...
Populating basic sparse doc vector store, number of vectors: 774
Creating store of sparse vectors  ...
Created 774 sparse random vectors.
Creating term vectors ...
There are 36881 terms (and 774 docs)
0 ... 1000 ... 2000 ... 3000 ... 4000 ... Exception in thread "main"
java.lang.NullPointerException
    at
org.apache.lucene.index.DirectoryReader$MultiTermDocs.freq(DirectoryReader.java:
1068)
    at
pitt.search.semanticvectors.LuceneUtils.getGlobalTermFreq(LuceneUtils.java:70)
    at
pitt.search.semanticvectors.LuceneUtils.termFilter(LuceneUtils.java:187)
    at
pitt.search.semanticvectors.TermVectorsFromLucene.(TermVectorsFromLucene.j
ava:163)
    at pitt.search.semanticvectors.BuildIndex.main(BuildIndex.java:138)
I am still digging but when you look at the source code it references lucene
call dating back to lucene 2.4 alot fo which are deprecated might need some
refreshing.

Cheers,

Dave

 
On 02 November 2009 at 14:40 Andrew Clegg  wrote:

> 
> Hi,
> 
> I've recently added the TermVectorComponent as a separate handler, following
> the example in the supplied config file, i.e.:
> 
>    class="org.apache.solr.handler.component.TermVectorComponent"/>
> 
>    class="org.apache.solr.handler.component.SearchHandler">
>           
>                   true
>           
>           
>                   tvComponent
>           
>   
> 
> It works, but with one quirk. When you use tf.all=true, you get the tf*idf
> scores in the output, just fine (along with tf and df). But if you use
> tv.tf_idf=true you get an NPE:
> 
> http://server:8080/solr/tvrh/?q=1cuk&version=2.2&indent=on&tv.tf_idf=true
> 
> HTTP Status 500 - null java.lang.NullPointerException at
> org.apache.solr.handler.component.TermVectorComponent$TVMapper.getDocFreq(Term
> VectorComponent.java:253)
> at
> org.apache.solr.handler.component.TermVectorComponent$TVMapper.map(TermVectorC
> omponent.java:245)
> at
> org.apache.lucene.index.TermVectorsReader.readTermVector(TermVectorsReader.jav
> a:522)
> at
> org.apache.lucene.index.TermVectorsReader.readTermVectors(TermVectorsReader.ja
> va:401)
> at org.apache.lucene.index.TermVectorsReader.get(TermVectorsReader.java:378)
> at
> org.apache.lucene.index.SegmentReader.getTermFreqVector(SegmentReader.java:125
> 3)
> at
> org.apache.lucene.index.DirectoryReader.getTermFreqVector(DirectoryReader.java
> :474)
> at
> org.apache.solr.search.SolrIndexReader.getTermFreqVector(SolrIndexReader.java:
> 244)
> at
> org.apache.solr.handler.component.TermVectorComponent.process(TermVectorCompon
> ent.java:125)
> at
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandle
> r.java:195)
> at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.ja
> va:131)
> at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316) at
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338
> )
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:24
> 1)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFi
> lterChain.java:235)
> at 
> (etc.)
> 
> Is this a bug, or am I doing it wrong?
> 
> Cheers,
> 
> Andrew.
> 
> -- 
> View this message in context:
> http://old.nabble.com/NullPointerException-with-TermVectorComponent-tp26156903p26156903.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: NullPointerException in DataImportHandler

2009-07-30 Thread Noble Paul നോബിള്‍ नोब्ळ्
On Thu, Jul 30, 2009 at 9:45 PM, Andrew Clegg wrote:
>
>
> Erik Hatcher wrote:
>>
>>
>> On Jul 30, 2009, at 11:54 AM, Andrew Clegg wrote:
>>>            >> url="${domain.pdb_code}-noatom.xml" processor="XPathEntityProcessor"
>>> forEach="/">
>>>                >> xpath="//*[local-name()='structCategory']/*[local-name()='struct']/
>>> *[local-name()='title']"
>>> />
>>
>> The XPathEntityProcessor doesn't support that fancy of an xpath - it
>> supports only a limited subset.  Try /structCategory/struct/title
>> perhaps?
>>
>>
>
> Sadly not...
>
> I tried with:
>
>                 xpath="/datablock/structCategory/struct/title" />
>
> (full path from root)
>
> and
>
>                 xpath="//structCategory/struct/title" />
>
> Same ArrayIndex error each time.
>
> Doesn't it use javax.xml then? I was using the complex local-name
> expressions to make it namespace-agnostic -- is it agnostic anyway?
it does not use javax.xml because those work on a DOM tree which is
not usable for large xml files.

This only supports a subset of xpath. The supported syntax is given here

http://wiki.apache.org/solr/DataImportHandler#head-5ced7c797f1014ef6e8326a34c23f541ebbaadf1-2


>
> Thanks,
>
> Andrew.
>
> --
> View this message in context: 
> http://www.nabble.com/NullPointerException-in-DataImportHandler-tp24739580p24741696.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>



-- 
-
Noble Paul | Principal Engineer| AOL | http://aol.com


Re: NullPointerException in DataImportHandler

2009-07-30 Thread Chantal Ackermann
It's very easy to write your own entity processor. At least, that is my 
experience with extending the SQLEntityProcessor to my needs. So, maybe 
you'd be better off subclassing the xpath processor and handling the 
xpath in a way you can keep your configuration straight forward.



Andrew Clegg schrieb:



Chantal Ackermann wrote:


my experience with XPathEntityProcessor is non-existent. ;-)




Don't worry -- your hints put me on the right track :-)

I got it working with:





Now, to get it to ignore missing files without an error... Hmm...

Cheers,

Andrew.

--
View this message in context: 
http://www.nabble.com/NullPointerException-in-DataImportHandler-tp24739580p24741772.html
Sent from the Solr - User mailing list archive at Nabble.com.



--
Chantal Ackermann
Consultant

mobil+49 (176) 10 00 09 45
emailchantal.ackerm...@btelligent.de



b.telligent GmbH & Co. KG
Lichtenbergstraße 8
D-85748 Garching / München

fon   +49 (89) 54 84 25 60
fax+49 (89) 54 84 25 69
web  www.btelligent.de

Registered in Munich: HRA 84393
Managing Director: b.telligent Verwaltungs GmbH, HRB 153164 represented 
by Sebastian Amtage and Klaus Blaschek

USt.Id.-Nr. DE814054803



Confidentiality Note
This email is intended only for the use of the individual or entity to 
which it is addressed, and may contain information that is privileged, 
confidential and exempt from disclosure under applicable law. If the 
reader of this email message is not the intended recipient, or the 
employee or agent responsible for delivery of the message to the 
intended recipient, you are hereby notified that any dissemination, 
distribution or copying of this communication is prohibited. If you have 
received this email in error, please notify us immediately by telephone 
at +49 (0) 89 54 84 25 60. Thank you.


Re: NullPointerException in DataImportHandler

2009-07-30 Thread Erik Hatcher


On Jul 30, 2009, at 12:19 PM, Andrew Clegg wrote:

Don't worry -- your hints put me on the right track :-)

I got it working with:

   
   
   

Now, to get it to ignore missing files without an error... Hmm...


onError="skip"  or abort, or continue

Erik




Re: NullPointerException in DataImportHandler

2009-07-30 Thread Andrew Clegg



Chantal Ackermann wrote:
> 
> 
> my experience with XPathEntityProcessor is non-existent. ;-)
> 
> 

Don't worry -- your hints put me on the right track :-)

I got it working with:





Now, to get it to ignore missing files without an error... Hmm...

Cheers,

Andrew.

-- 
View this message in context: 
http://www.nabble.com/NullPointerException-in-DataImportHandler-tp24739580p24741772.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: NullPointerException in DataImportHandler

2009-07-30 Thread Andrew Clegg


Erik Hatcher wrote:
> 
> 
> On Jul 30, 2009, at 11:54 AM, Andrew Clegg wrote:
>>> url="${domain.pdb_code}-noatom.xml" processor="XPathEntityProcessor"
>> forEach="/">
>>> xpath="//*[local-name()='structCategory']/*[local-name()='struct']/ 
>> *[local-name()='title']"
>> />
> 
> The XPathEntityProcessor doesn't support that fancy of an xpath - it  
> supports only a limited subset.  Try /structCategory/struct/title  
> perhaps?
> 
> 

Sadly not...

I tried with:



(full path from root)

and



Same ArrayIndex error each time.

Doesn't it use javax.xml then? I was using the complex local-name
expressions to make it namespace-agnostic -- is it agnostic anyway?

Thanks,

Andrew.

-- 
View this message in context: 
http://www.nabble.com/NullPointerException-in-DataImportHandler-tp24739580p24741696.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: NullPointerException in DataImportHandler

2009-07-30 Thread Chantal Ackermann

Hi Andrew,

my experience with XPathEntityProcessor is non-existent. ;-)

Just after a quick look at the method that throws the exception:

  private void addField0(String xpath, String name, boolean multiValued,
 boolean isRecord) {
List paths = new 
LinkedList(Arrays.asList(xpath.split("/")));

if ("".equals(paths.get(0).trim()))
  paths.remove(0);
rootNode.build(paths, name, multiValued, isRecord);
  }

and your foreach attribute value in combination with the xpath:
> forEach="/">
> > 
xpath="//*[local-name()='structCategory']/*[local-name()='struct']/*[local-name()='title']"

> />

I would guess that the double slash at the beginning is not working with 
your foreach regex. I don't know whether this is something the processor 
should expect and handle correctly or whether you have to take care of 
in your configuration.


Cheers,
Chantal

Andrew Clegg schrieb:


Chantal Ackermann wrote:

Hi Andrew,

your inner entity uses an XML type datasource. The default entity
processor is the SQL one, however.

For your inner entity, you have to specify the correct entity processor
explicitly. You do that by adding the attribute "processor", and the
value is the classname of the processor you want to use.

e.g. 

Thanks -- I was also missing a forEach expression -- in my case, just "/"
since each XML file contains the information for no more than one document.

However, I'm now getting a different exception:


30-Jul-2009 16:48:52 org.apache.solr.handler.dataimport.DocBuilder
buildDocument
SEVERE: Exception while processing: domain document :
SolrInputDocument[{id=id(1.0)={1udaA02}, title=title(1.0)={PDB code 1uda,
chain A, domain 02}, pdb_code=pdb_code(1.0)={1uda},
doc_type=doc_type(1.0)={domain}, related_ids=related_ids(1.0)={1uda,1udaA}}]
org.apache.solr.handler.dataimport.DataImportHandlerException: Exception
while reading xpaths for fields Processing Document # 1
at
org.apache.solr.handler.dataimport.XPathEntityProcessor.initXpathReader(XPathEntityProcessor.java:135)
at
org.apache.solr.handler.dataimport.XPathEntityProcessor.init(XPathEntityProcessor.java:76)
at
org.apache.solr.handler.dataimport.EntityProcessorWrapper.init(EntityProcessorWrapper.java:71)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:307)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:372)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:225)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:167)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:333)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:393)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:372)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.LinkedList.entry(LinkedList.java:365)
at java.util.LinkedList.get(LinkedList.java:315)
at
org.apache.solr.handler.dataimport.XPathRecordReader.addField0(XPathRecordReader.java:71)
at
org.apache.solr.handler.dataimport.XPathRecordReader.(XPathRecordReader.java:50)
at
org.apache.solr.handler.dataimport.XPathEntityProcessor.initXpathReader(XPathEntityProcessor.java:121)
... 9 more


My data config now looks like this:


























Thanks in advance, again :-)

Andrew.

--
View this message in context: 
http://www.nabble.com/NullPointerException-in-DataImportHandler-tp24739580p24741292.html
Sent from the Solr - User mailing list archive at Nabble.com.



--
Chantal Ackermann


Re: NullPointerException in DataImportHandler

2009-07-30 Thread Erik Hatcher


On Jul 30, 2009, at 11:54 AM, Andrew Clegg wrote:

   
   xpath="//*[local-name()='structCategory']/*[local-name()='struct']/ 
*[local-name()='title']"

/>


The XPathEntityProcessor doesn't support that fancy of an xpath - it  
supports only a limited subset.  Try /structCategory/struct/title  
perhaps?


Erik



Re: NullPointerException in DataImportHandler

2009-07-30 Thread Andrew Clegg


Chantal Ackermann wrote:
> 
> Hi Andrew,
> 
> your inner entity uses an XML type datasource. The default entity 
> processor is the SQL one, however.
> 
> For your inner entity, you have to specify the correct entity processor 
> explicitly. You do that by adding the attribute "processor", and the 
> value is the classname of the processor you want to use.
> 
> e.g.  processor="XPathEntityProcessor" 
> 

Thanks -- I was also missing a forEach expression -- in my case, just "/"
since each XML file contains the information for no more than one document.

However, I'm now getting a different exception:


30-Jul-2009 16:48:52 org.apache.solr.handler.dataimport.DocBuilder
buildDocument
SEVERE: Exception while processing: domain document :
SolrInputDocument[{id=id(1.0)={1udaA02}, title=title(1.0)={PDB code 1uda,
chain A, domain 02}, pdb_code=pdb_code(1.0)={1uda}, 
doc_type=doc_type(1.0)={domain}, related_ids=related_ids(1.0)={1uda,1udaA}}]
org.apache.solr.handler.dataimport.DataImportHandlerException: Exception
while reading xpaths for fields Processing Document # 1
at
org.apache.solr.handler.dataimport.XPathEntityProcessor.initXpathReader(XPathEntityProcessor.java:135)
at
org.apache.solr.handler.dataimport.XPathEntityProcessor.init(XPathEntityProcessor.java:76)
at
org.apache.solr.handler.dataimport.EntityProcessorWrapper.init(EntityProcessorWrapper.java:71)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:307)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:372)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:225)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:167)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:333)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:393)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:372)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.LinkedList.entry(LinkedList.java:365)
at java.util.LinkedList.get(LinkedList.java:315)
at
org.apache.solr.handler.dataimport.XPathRecordReader.addField0(XPathRecordReader.java:71)
at
org.apache.solr.handler.dataimport.XPathRecordReader.(XPathRecordReader.java:50)
at
org.apache.solr.handler.dataimport.XPathEntityProcessor.initXpathReader(XPathEntityProcessor.java:121)
... 9 more


My data config now looks like this:


























Thanks in advance, again :-)

Andrew.

-- 
View this message in context: 
http://www.nabble.com/NullPointerException-in-DataImportHandler-tp24739580p24741292.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: NullPointerException in DataImportHandler

2009-07-30 Thread Chantal Ackermann

Hi Andrew,

your inner entity uses an XML type datasource. The default entity 
processor is the SQL one, however.


For your inner entity, you have to specify the correct entity processor 
explicitly. You do that by adding the attribute "processor", and the 
value is the classname of the processor you want to use.


e.g. processor="XPathEntityProcessor" 


(See the wikipedia example on the DataImportHandler wiki page.)

Cheers,
Chantal

Andrew Clegg schrieb:

First of all, apologies if you get this twice. I posted it by email an hour
ago but it hasn't appeared in any of the archives, so I'm worried it's got
junked somewhere.

I'm trying to use a DataImportHandler to merge some data from a database
with some other fields from a collection of XML files, rather like the
example in the Architecture section here:

http://wiki.apache.org/solr/DataImportHandler

... so a given document is built from some fields from the database and some
from the XML.

My dataconfig.xml looks like this:



   

   

   

   

   
   
   

   

   



This works if I comment out the inner entity, but when I uncomment it, I get
this error:


30-Jul-2009 14:32:50 org.apache.solr.handler.dataimport.DocBuilder
buildDocument
SEVERE: Exception while processing: domain document :
SolrInputDocument[{id=id(1.0)={1s32D00}, title=title(1.0)={PDB code
1s32, chain D, domain 00}, keywords=keywords(1.0)={some ke
ywords go here}, pdb_code=pdb_code(1.0)={1s32},
doc_type=doc_type(1.0)={domain}, related_ids=related_ids(1.0)={1s32
1s32D}}]
org.apache.solr.handler.dataimport.DataImportHandlerException:
java.lang.NullPointerException
   at
org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:64)
   at
org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:71)
   at
org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:237)
   at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:344)
   at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:372)
   at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:225)
   at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:167)
   at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:333)
   at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:393)
   at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:372)
Caused by: java.lang.NullPointerException
   at java.io.File.(File.java:222)
   at
org.apache.solr.handler.dataimport.FileDataSource.getData(FileDataSource.java:75)
   at
org.apache.solr.handler.dataimport.FileDataSource.getData(FileDataSource.java:44)
   at
org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:58)
   ... 9 more


I have checked that the file
/cath/people/cathdata/v3_3_0/pdb-XML-noatom/1s32-noatom.xml is readable, so
maybe the full path to the file isn't being constructed properly or
something?

I also tried with the full path template for the file in the entity url
attribute, instead of using a basePath in the dataSource, but I get exactly
the same exception.

This is with the 2009-07-30 nightly build. See attached for schema.
http://www.nabble.com/file/p24739580/schema.xml schema.xml

Any ideas? Thanks in advance!

Andrew.


--
:: http://biotext.org.uk/ ::
--
View this message in context: 
http://www.nabble.com/NullPointerException-in-DataImportHandler-tp24739580p24739580.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: NullPointerException while performing Merge

2009-03-30 Thread Michael McCandless
Do you have an index where this exception happens consistently, eg
when you try to optimize?  Can you post that somewhere?

Also, which exact JRE version are you using?

Mike

On Sun, Mar 29, 2009 at 1:28 PM, Sameer Maggon  wrote:
> In our application, we are getting NullPointerExceptions very frequently. It
> seems like it's happening during the merge operation (commit). There are no
> exceptions while adding documents to Solr. We are using Solr 1.3.0. I looked
> around the mailing list, and found that there is a JIRA issue opened for a
> similar bug (Lucene-1374), but it's not exactly the same. Also, my fields
> are not compressed.
>
> Has anyone seem this before?
>
> Below is the stacktrace.
>
> Exception in thread "Lucene Merge Thread #142"
> org.apache.lucene.index.MergePolicy$MergeException:
> java.lang.NullPointerException
>    at
> org.apache.lucene.index.ConcurrentMergeScheduler.handleMergeException(ConcurrentMergeScheduler.java:325)
>    at
> org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:302)
> Caused by: java.lang.NullPointerException
>    at
> org.apache.lucene.index.FieldsWriter.writeField(FieldsWriter.java:179)
>    at
> org.apache.lucene.index.FieldsWriter.addDocument(FieldsWriter.java:268)
>    at
> org.apache.lucene.index.SegmentMerger.mergeFields(SegmentMerger.java:361)
>    at org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:140)
>    at
> org.apache.lucene.index.IndexWriter.mergeMiddle(IndexWriter.java:4485)
>    at org.apache.lucene.index.IndexWriter.merge(IndexWriter.java:4143)
>    at
> org.apache.lucene.index.ConcurrentMergeScheduler.doMerge(ConcurrentMergeScheduler.java:218)
>    at
> org.apache.lucene.index.ConcurrentMergeScheduler$MergeThread.run(ConcurrentMergeScheduler.java:274)
>
> Thanks,
> Sameer.
>


RE: NullPointerException

2008-09-26 Thread Dinesh Gupta

Hi,

Yes, cdt & mdt are the date in MYSQL DB

> Date: Fri, 26 Sep 2008 13:58:24 +0530
> From: [EMAIL PROTECTED]
> To: solr-user@lucene.apache.org
> Subject: Re: NullPointerException
> 
> I dunno if the problem is w/ date. are cdt and mdt date fields in the DB?
> 
> On Fri, Sep 26, 2008 at 12:58 AM, Shalin Shekhar Mangar
> <[EMAIL PROTECTED]> wrote:
> > I'm not sure about why the NullPointerException is coming. Is that the whole
> > stack trace?
> >
> > The mdt and cdt are date in schema.xml but the format that is in the log is
> > wrong. Look at the DateFormatTransformer in DataImportHandler which can
> > format strings in your database to the correct date format needed for Solr.
> >
> > On Thu, Sep 25, 2008 at 7:09 PM, Dinesh Gupta <[EMAIL PROTECTED]>wrote:
> >
> >>  Hi All,
> >>
> >> I have attached my file.
> >>
> >> I am getting exception.
> >>
> >> Please suggest me how to short-out this issue.
> >>
> >>
> >>
> >> WARNING: Error creating document : SolrInputDocumnt[{id=id(1.0)={93146},
> >> ttl=ttl(1.0)={Majestic from Pushpams.com}, cdt=cdt(1.0)={2001-09-04
> >> 15:40:40.0}, mdt=mdt(1.0)={2008-09-23 17:47:44.0}, prc=prc(1.0)={600.00}}]
> >> java.lang.NullPointerException
> >> at org.apache.lucene.document.Document.getField(Document.java:140)
> >> at
> >> org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:283)
> >> at
> >> org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:58)
> >> at
> >> org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:69)
> >> at
> >> org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHandler.java:288)
> >> at
> >> org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:319)
> >> at
> >> org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:178)
> >> at
> >> org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:136)
> >> at
> >> org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:334)
> >> at
> >> org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:386)
> >> at
> >> org.apache.solr.handler.dataimport.DataImportHandler.handleRequestBody(DataImportHandler.java:190)
> >> at
> >> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
> >> at org.apache.solr.core.SolrCore.execute(SolrCore.java:1204)
> >> at
> >> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:303)
> >> at
> >> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:232)
> >> at
> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> >> at
> >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> >> at
> >> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
> >> at
> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> >> at
> >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> >> at
> >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> >> at
> >> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> >> at
> >> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
> >> at
> >> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
> >>
> >> --
> >> MSN Technology brings you the latest on gadgets, gizmos and the new hits in
> >> the gaming market. Try it now! <http://computing.in.msn.com/>
> >>
> >
> >
> >
> > --
> > Regards,
> > Shalin Shekhar Mangar.
> >
> 
> 
> 
> -- 
> --Noble Paul

_
Searching for weekend getaways? Try Live.com
http://www.live.com/?scope=video&form=MICOAL

Re: NullPointerException

2008-09-26 Thread Noble Paul നോബിള്‍ नोब्ळ्
I dunno if the problem is w/ date. are cdt and mdt date fields in the DB?

On Fri, Sep 26, 2008 at 12:58 AM, Shalin Shekhar Mangar
<[EMAIL PROTECTED]> wrote:
> I'm not sure about why the NullPointerException is coming. Is that the whole
> stack trace?
>
> The mdt and cdt are date in schema.xml but the format that is in the log is
> wrong. Look at the DateFormatTransformer in DataImportHandler which can
> format strings in your database to the correct date format needed for Solr.
>
> On Thu, Sep 25, 2008 at 7:09 PM, Dinesh Gupta <[EMAIL PROTECTED]>wrote:
>
>>  Hi All,
>>
>> I have attached my file.
>>
>> I am getting exception.
>>
>> Please suggest me how to short-out this issue.
>>
>>
>>
>> WARNING: Error creating document : SolrInputDocumnt[{id=id(1.0)={93146},
>> ttl=ttl(1.0)={Majestic from Pushpams.com}, cdt=cdt(1.0)={2001-09-04
>> 15:40:40.0}, mdt=mdt(1.0)={2008-09-23 17:47:44.0}, prc=prc(1.0)={600.00}}]
>> java.lang.NullPointerException
>> at org.apache.lucene.document.Document.getField(Document.java:140)
>> at
>> org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:283)
>> at
>> org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:58)
>> at
>> org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:69)
>> at
>> org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHandler.java:288)
>> at
>> org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:319)
>> at
>> org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:178)
>> at
>> org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:136)
>> at
>> org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:334)
>> at
>> org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:386)
>> at
>> org.apache.solr.handler.dataimport.DataImportHandler.handleRequestBody(DataImportHandler.java:190)
>> at
>> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
>> at org.apache.solr.core.SolrCore.execute(SolrCore.java:1204)
>> at
>> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:303)
>> at
>> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:232)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>> at
>> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
>> at
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>> at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>> at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>> at
>> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
>> at
>> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
>>
>> --
>> MSN Technology brings you the latest on gadgets, gizmos and the new hits in
>> the gaming market. Try it now! 
>>
>
>
>
> --
> Regards,
> Shalin Shekhar Mangar.
>



-- 
--Noble Paul


Re: NullPointerException

2008-09-25 Thread Shalin Shekhar Mangar
I'm not sure about why the NullPointerException is coming. Is that the whole
stack trace?

The mdt and cdt are date in schema.xml but the format that is in the log is
wrong. Look at the DateFormatTransformer in DataImportHandler which can
format strings in your database to the correct date format needed for Solr.

On Thu, Sep 25, 2008 at 7:09 PM, Dinesh Gupta <[EMAIL PROTECTED]>wrote:

>  Hi All,
>
> I have attached my file.
>
> I am getting exception.
>
> Please suggest me how to short-out this issue.
>
>
>
> WARNING: Error creating document : SolrInputDocumnt[{id=id(1.0)={93146},
> ttl=ttl(1.0)={Majestic from Pushpams.com}, cdt=cdt(1.0)={2001-09-04
> 15:40:40.0}, mdt=mdt(1.0)={2008-09-23 17:47:44.0}, prc=prc(1.0)={600.00}}]
> java.lang.NullPointerException
> at org.apache.lucene.document.Document.getField(Document.java:140)
> at
> org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:283)
> at
> org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:58)
> at
> org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:69)
> at
> org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHandler.java:288)
> at
> org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:319)
> at
> org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:178)
> at
> org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:136)
> at
> org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:334)
> at
> org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:386)
> at
> org.apache.solr.handler.dataimport.DataImportHandler.handleRequestBody(DataImportHandler.java:190)
> at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
> at org.apache.solr.core.SolrCore.execute(SolrCore.java:1204)
> at
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:303)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:232)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> at
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
> at
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
>
> --
> MSN Technology brings you the latest on gadgets, gizmos and the new hits in
> the gaming market. Try it now! 
>



-- 
Regards,
Shalin Shekhar Mangar.


Re: NullPointerException at lucene.analysis.StopFilter with 1.3

2008-06-09 Thread Ronald K. Braun
> : I'm just looking into transitioning from solr 1.2 to 1.3 (trunk).  I
> : have some legacy handler code (called "AdvancedRequestHandler") that
> : used to work with 1.2 but now throws an exception using 1.3 (latest
> : nightly build).

> This is an interesting use case that wasn't really considered when we
> switched away from using hte SolrCore singlton ...
> When I have some more time, i'll spin up a thread on solr-dev to discuss
> what we should do about this -- n the mean time feel free to file a bug
> that StopFilter isn't backwards compatible.

Created SOLR-594 for this issue.

> FWIW: constructing a new TokenizerChain inside your RequestHandlers
> handeRequest method seems  unneccessary.   if nothing else, you could
> do this in your init method and reuse the TokenizerChain on every request.
> but if it were me, I'd just use the schema.xml to declare a fieldtype that
> had the behavior i want, and then use
> schema.getFieldType("specialType").getQueryAnalyzer().tokenStream(...)

I actually had a single reusable version, but flattened it back out in
the code snippet for clarity.  But thanks for the tactful suggestion.
:-)  I didn't know that you could fetch the tokenizer chain directly
from the schema (how cool), which was what was originally desired --
the constructed tokenizer was just mirroring an existing field.  I
appreciate the tip, Hoss -- much cleaner!

r


Re: NullPointerException at lucene.analysis.StopFilter with 1.3

2008-06-02 Thread Chris Hostetter

: I'm just looking into transitioning from solr 1.2 to 1.3 (trunk).  I
: have some legacy handler code (called "AdvancedRequestHandler") that
: used to work with 1.2 but now throws an exception using 1.3 (latest
: nightly build). The exception is this:

The short answer is: right after you call "stopFilter.init(args)" call 
"stopFilter.inform(solrCore.getSolrConfig().getResourceLoader());"

This is an interesting use case that wasn't really considered when we 
switched away from using hte SolrCore singlton and the the 
ResourceLoaderAware interface was added.  we made sure things would still 
work for people who had their own custom Analysis Factories, but some of 
the functionality in *existing* Factories was moved from the init() method 
to inform() ... which means the classes aren't technically backwards 
compatibly for people doing what you're doing: constructing them directly.

When I have some more time, i'll spin up a thread on solr-dev to discuss 
what we should do about this -- n the mean time feel free to file a bug 
that StopFilter isn't backwards compatible.

FWIW: constructing a new TokenizerChain inside your RequestHandlers 
handeRequest method seems  unneccessary.   if nothing else, you could 
do this in your init method and reuse the TokenizerChain on every request.  
but if it were me, I'd just use the schema.xml to declare a fieldtype that 
had the behavior i want, and then use 
schema.getFieldType("specialType").getQueryAnalyzer().tokenStream(...)



-Hoss



RE: NullPointerException (not schema related)

2007-05-02 Thread Charlie Jackson
Otis,

Thanks for the response, that list should be very useful!

Charlie

-Original Message-
From: Otis Gospodnetic [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 02, 2007 11:13 AM
To: solr-user@lucene.apache.org
Subject: Re: NullPointerException (not schema related)

Charlie,

There is nothing built into Solr for that.  But you can use any of the
numerous free proxies/load balancers.  Here is a collection that I've
got:
http://www.simpy.com/user/otis/search/load%2Bbalance+OR+proxy

Otis 
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Simpy -- http://www.simpy.com/  -  Tag  -  Search  -  Share

- Original Message 
From: Charlie Jackson <[EMAIL PROTECTED]>
To: solr-user@lucene.apache.org
Sent: Tuesday, May 1, 2007 5:31:13 PM
Subject: RE: NullPointerException (not schema related)

I went with the first approach which got me up and running. Your other
example config (using ./snapshooter) made me realize how foolish my
original problem was!

Anyway, I've got the whole thing up and running and it looks pretty
awesome! 

One quick question, though. As stated in the wiki, one of the benefits
of distributing the indexes is load balance the queries. Is there a
built-in solr mechanism for performing this query load balancing? I'm
suspecting there is not, and I haven't seen anything about it in the
wiki, but I wanted to check because I know I'm going to be asked.

Thanks,
Charlie

-Original Message-
From: Chris Hostetter [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 01, 2007 3:20 PM
To: solr-user@lucene.apache.org
Subject: RE: NullPointerException (not schema related)


: 
:   snapshooter
:   /usr/local/Production/solr/solr/bin/
:   true
: 

: the directory. However, when I committed data to the index, I was
: getting "No such file or directory" errors from the Runtime.exec call.
I
: verified all of the permissions, etc, with the user I was trying to
use.
: In the end, I wrote up a little test program to see if it was a
problem
: with the Runtime.exec call and I think it is. I'm running this on
CentOS
: 4.4 and Runtime.exec seems to have a hard time directly executing bash
: scripts. For example, if I called Runtime.exec with a command of
: "test_program" (which is a bash script), it failed. If I called
: Runtime.exec with a command of "/bin/bash test_program" it worked.

this initial problem you were having may be a result of path issues.
dir
doesn't need to be the directory where your script lives, it's the
directory where you wnat your script to run (the "cwd" of the process).
it's possible that the error you were getting was because "." isn't in
the
PATH that was being used, you should try something like this...

 
   /usr/local/Production/solr/solr/bin/snapshooter
   /usr/local/Production/solr/solr/bin/
   true
 

...or maybe even...

 
   ./snapshooter 
   /usr/local/Production/solr/solr/bin/
   true
 

-Hoss






Re: NullPointerException (not schema related)

2007-05-02 Thread Otis Gospodnetic
Charlie,

There is nothing built into Solr for that.  But you can use any of the numerous 
free proxies/load balancers.  Here is a collection that I've got:
http://www.simpy.com/user/otis/search/load%2Bbalance+OR+proxy

Otis 
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Simpy -- http://www.simpy.com/  -  Tag  -  Search  -  Share

- Original Message 
From: Charlie Jackson <[EMAIL PROTECTED]>
To: solr-user@lucene.apache.org
Sent: Tuesday, May 1, 2007 5:31:13 PM
Subject: RE: NullPointerException (not schema related)

I went with the first approach which got me up and running. Your other
example config (using ./snapshooter) made me realize how foolish my
original problem was!

Anyway, I've got the whole thing up and running and it looks pretty
awesome! 

One quick question, though. As stated in the wiki, one of the benefits
of distributing the indexes is load balance the queries. Is there a
built-in solr mechanism for performing this query load balancing? I'm
suspecting there is not, and I haven't seen anything about it in the
wiki, but I wanted to check because I know I'm going to be asked.

Thanks,
Charlie

-Original Message-
From: Chris Hostetter [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 01, 2007 3:20 PM
To: solr-user@lucene.apache.org
Subject: RE: NullPointerException (not schema related)


: 
:   snapshooter
:   /usr/local/Production/solr/solr/bin/
:   true
: 

: the directory. However, when I committed data to the index, I was
: getting "No such file or directory" errors from the Runtime.exec call.
I
: verified all of the permissions, etc, with the user I was trying to
use.
: In the end, I wrote up a little test program to see if it was a
problem
: with the Runtime.exec call and I think it is. I'm running this on
CentOS
: 4.4 and Runtime.exec seems to have a hard time directly executing bash
: scripts. For example, if I called Runtime.exec with a command of
: "test_program" (which is a bash script), it failed. If I called
: Runtime.exec with a command of "/bin/bash test_program" it worked.

this initial problem you were having may be a result of path issues.
dir
doesn't need to be the directory where your script lives, it's the
directory where you wnat your script to run (the "cwd" of the process).
it's possible that the error you were getting was because "." isn't in
the
PATH that was being used, you should try something like this...

 
   /usr/local/Production/solr/solr/bin/snapshooter
   /usr/local/Production/solr/solr/bin/
   true
 

...or maybe even...

 
   ./snapshooter 
   /usr/local/Production/solr/solr/bin/
   true
 

-Hoss






RE: NullPointerException (not schema related)

2007-05-01 Thread Charlie Jackson
I went with the first approach which got me up and running. Your other
example config (using ./snapshooter) made me realize how foolish my
original problem was!

Anyway, I've got the whole thing up and running and it looks pretty
awesome! 

One quick question, though. As stated in the wiki, one of the benefits
of distributing the indexes is load balance the queries. Is there a
built-in solr mechanism for performing this query load balancing? I'm
suspecting there is not, and I haven't seen anything about it in the
wiki, but I wanted to check because I know I'm going to be asked.

Thanks,
Charlie

-Original Message-
From: Chris Hostetter [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 01, 2007 3:20 PM
To: solr-user@lucene.apache.org
Subject: RE: NullPointerException (not schema related)


: 
:   snapshooter
:   /usr/local/Production/solr/solr/bin/
:   true
: 

: the directory. However, when I committed data to the index, I was
: getting "No such file or directory" errors from the Runtime.exec call.
I
: verified all of the permissions, etc, with the user I was trying to
use.
: In the end, I wrote up a little test program to see if it was a
problem
: with the Runtime.exec call and I think it is. I'm running this on
CentOS
: 4.4 and Runtime.exec seems to have a hard time directly executing bash
: scripts. For example, if I called Runtime.exec with a command of
: "test_program" (which is a bash script), it failed. If I called
: Runtime.exec with a command of "/bin/bash test_program" it worked.

this initial problem you were having may be a result of path issues.
dir
doesn't need to be the directory where your script lives, it's the
directory where you wnat your script to run (the "cwd" of the process).
it's possible that the error you were getting was because "." isn't in
the
PATH that was being used, you should try something like this...

 
   /usr/local/Production/solr/solr/bin/snapshooter
   /usr/local/Production/solr/solr/bin/
   true
 

...or maybe even...

 
   ./snapshooter 
   /usr/local/Production/solr/solr/bin/
   true
 

-Hoss



Re: NullPointerException (not schema related)

2007-05-01 Thread Mike Klaas

On 5/1/07, Charlie Jackson <[EMAIL PROTECTED]> wrote:

This is what came in the solrconfig.xml file with just a minor tweak to
the directory. However, when I committed data to the index, I was
getting "No such file or directory" errors from the Runtime.exec call. I
verified all of the permissions, etc, with the user I was trying to use.
In the end, I wrote up a little test program to see if it was a problem
with the Runtime.exec call and I think it is. I'm running this on CentOS
4.4 and Runtime.exec seems to have a hard time directly executing bash
scripts. For example, if I called Runtime.exec with a command of
"test_program" (which is a bash script), it failed. If I called
Runtime.exec with a command of "/bin/bash test_program" it worked.


Yes, Runtime.exec does not invoke a shell automatically, so shebang
lines, shell built-ins, io redirection, etc. cannot be used directly.

-Mike


RE: NullPointerException (not schema related)

2007-05-01 Thread Chris Hostetter

: 
:   snapshooter
:   /usr/local/Production/solr/solr/bin/
:   true
: 

: the directory. However, when I committed data to the index, I was
: getting "No such file or directory" errors from the Runtime.exec call. I
: verified all of the permissions, etc, with the user I was trying to use.
: In the end, I wrote up a little test program to see if it was a problem
: with the Runtime.exec call and I think it is. I'm running this on CentOS
: 4.4 and Runtime.exec seems to have a hard time directly executing bash
: scripts. For example, if I called Runtime.exec with a command of
: "test_program" (which is a bash script), it failed. If I called
: Runtime.exec with a command of "/bin/bash test_program" it worked.

this initial problem you were having may be a result of path issues.  dir
doesn't need to be the directory where your script lives, it's the
directory where you wnat your script to run (the "cwd" of the process).
it's possible that the error you were getting was because "." isn't in the
PATH that was being used, you should try something like this...

 
   /usr/local/Production/solr/solr/bin/snapshooter
   /usr/local/Production/solr/solr/bin/
   true
 

...or maybe even...

 
   ./snapshooter 
   /usr/local/Production/solr/solr/bin/
   true
 

-Hoss



RE: NullPointerException (not schema related)

2007-05-01 Thread Charlie Jackson
Nevermind this...looks like my problem was tagging the "args" as an
 node instead of an  node. Thanks anyway!

Charlie

-Original Message-
From: Charlie Jackson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 01, 2007 12:02 PM
To: solr-user@lucene.apache.org
Subject: NullPointerException (not schema related)

Hello,

 

I'm evaluating solr for potential use in an application I'm working on,
and it sounds like a really great fit. I'm having trouble getting the
Collection Distribution part set up, though. Initially, I had problems
setting up the postCommit listener. I first used this xml to configure
the listener:

 



  snapshooter

  /usr/local/Production/solr/solr/bin/

  true



 

This is what came in the solrconfig.xml file with just a minor tweak to
the directory. However, when I committed data to the index, I was
getting "No such file or directory" errors from the Runtime.exec call. I
verified all of the permissions, etc, with the user I was trying to use.
In the end, I wrote up a little test program to see if it was a problem
with the Runtime.exec call and I think it is. I'm running this on CentOS
4.4 and Runtime.exec seems to have a hard time directly executing bash
scripts. For example, if I called Runtime.exec with a command of
"test_program" (which is a bash script), it failed. If I called
Runtime.exec with a command of "/bin/bash test_program" it worked. 

 

So, with this knowledge in hand, I modified the solrconfig.xml file
again to this:



  /bin/bash

  /usr/local/Production/solr/solr/bin/

  true

   snapshooter 



 

When I commit data now, however, I get a NullPointerException. I'm
including the stack trace here:

SEVERE: java.lang.NullPointerException

at org.apache.solr.core.SolrCore.update(SolrCore.java:716)

at
org.apache.solr.servlet.SolrUpdateServlet.doPost(SolrUpdateServlet.java:
53)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:269)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:188)

at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:210)

at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:174)

at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:127)

at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)

at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:108)

at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
51)

at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
0)

at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:665)

at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:528)

at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:81)

at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:685)

at java.lang.Thread.run(Thread.java:619)

 

I know this has something to do with my config change (the problem goes
away if I turn off the postCommit listener) but I don't know what!

 

BTW I'm using solr-1.1.0-incubating. 

 

Thanks in advance for any help!

 

Charlie