increase connections on tomcat

2015-03-11 Thread SolrUser1543
Client application which queries solr needs to increase a number of
simultaneously connections in order to improve performance ( in additional
to get solr results, it needs to get an internal resources like images. ) 
But this increment has improved client performance, but caused degradation
in solr  .

what I think is that I need to increase a number of connection in order to
allow to more requests run between solr shards. 

How can I prove that I need?
How can I increase it on tomcat? ( on each shard )



--
View this message in context: 
http://lucene.472066.n3.nabble.com/increase-connections-on-tomcat-tp4192405.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Where is schema.xml and solrconfig.xml in solr 5.0.0

2015-03-11 Thread Erick Erickson
The configs are in Zookeeper. So you have to switch your thinking,
it's rather confusing at first.

When you create a collection, you specify a config set, these are usually in

./server/solr/configsets/data_driven_schema,
./server/solr/configsets/techproducts and the like.

The entire conf directory under one of these is copied to Zookeeper
(which you can see
from the admin screen cloudtree, then in the right hand side you'll
be able to find the config sets
you uploaded.

But, you cannot edit them there directly. You edit them on disk, then
push them to Zookeeper,
then reload the collection (or restart everything). See the reference
guide here:
https://cwiki.apache.org/confluence/display/solr/Command+Line+Utilities

Best,
Erick

On Wed, Mar 11, 2015 at 6:01 AM, Nitin Solanki nitinml...@gmail.com wrote:
 Hi, alexandre..

 Thanks for responding...
 When I created new collection(wikingram) using solrCloud. It gets create
 into example/cloud/node*(node1, node2) like that.
 I have used *schema.xml and solrconfig.xml of sample_techproducts_configs*
 configuration.

 Now, The problem is that.
 If I change the configuration of *solrconfig.xml of *
 *sample_techproducts_configs*. Its configuration doesn't reflect on
 *wikingram* collection.
 How to reflect the changes of configuration in the collection?

 On Wed, Mar 11, 2015 at 5:42 PM, Alexandre Rafalovitch arafa...@gmail.com
 wrote:

 Which example are you using? Or how are you creating your collection?

 If you are using your example, it creates a new directory under
 example. If you are creating a new collection with -c, it creates
 a new directory under the server/solr. The actual files are a bit
 deeper than usual to allow for a log folder next to the collection
 folder. So, for example:
 example/schemaless/solr/gettingstarted/conf/solrconfig.xml

 If it's a dynamic schema configuration, you don't actually have
 schema.xml, but managed-schema, as you should be mostly using REST
 calls to configure it.

 If you want to see the configuration files before the collection
 actually created, they are under server/solr/configsets, though they
 are not configsets in Solr sense, as they do get copied when you
 create your collections (sharing them causes issues).

 Regards,
Alex.
 
 Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
 http://www.solr-start.com/


 On 11 March 2015 at 07:50, Nitin Solanki nitinml...@gmail.com wrote:
  Hello,
 I have switched from solr 4.10.2 to solr 5.0.0. In solr
  4-10.2, schema.xml and solrconfig.xml were in example/solr/conf/ folder.
  Where is schema.xml and solrconfig.xml in solr 5.0.0 ? and also want to
  know how to configure in solrcloud ?



Re: increase connections on tomcat

2015-03-11 Thread SolrUser1543
does it apply to solr 4.10 ? or only to  solr 5 ? 







--
View this message in context: 
http://lucene.472066.n3.nabble.com/increase-connections-on-tomcat-tp4192405p4192436.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr 5: data_driven_schema_config's solrconfig causing error

2015-03-11 Thread Aman Tandon
I removed/commented as it was not understood able and not for our use.

With Regards
Aman Tandon

On Tue, Mar 10, 2015 at 8:04 PM, Steve Rowe sar...@gmail.com wrote:

 Hi Aman,

 The stack trace shows that the AddSchemaFieldsUpdateProcessorFactory
 specified in data_driven_schema_configs’s solrconfig.xml expects the
 “booleans” field type to exist.

 Solr 5’s data_driven_schema_configs includes the “booleans” field type:

 
 http://svn.apache.org/viewvc/lucene/dev/tags/lucene_solr_5_0_0/solr/server/solr/configsets/data_driven_schema_configs/conf/managed-schema?view=markup#l249
 

 So you must have removed it when you modified the schema?  Did you do this
 intentionally?  If so, why?

 Steve

  On Mar 10, 2015, at 5:25 AM, Aman Tandon amantandon...@gmail.com
 wrote:
 
  Hi,
 
  For the sake of using the new schema.xml and solrconfig.xml with solr 5,
 I
  put my old required field type  fields names (being used with solr
 4.8.1)
  in the schema.xml given in *basic_configs*  configurations setting given
  in solrconfig.xml present in *data_driven_schema_configs* and put I put
  these configuration files in the configs of zookeeper.
 
  But when i am creating the core it is giving the error as booleans
  fieldType is not found in schema. So correct me if i am doing something
  wrong.
 
  ERROR - 2015-03-10 08:20:16.788; org.apache.solr.core.CoreContainer;
 Error
  creating core [core1]: fieldType 'booleans' not found in the schema
  org.apache.solr.common.SolrException: fieldType 'booleans' not found in
  the schema
  at org.apache.solr.core.SolrCore.init(SolrCore.java:896)
  at org.apache.solr.core.SolrCore.init(SolrCore.java:662)
  at org.apache.solr.core.CoreContainer.create(CoreContainer.java:513)
  at org.apache.solr.core.CoreContainer.create(CoreContainer.java:488)
  at
 
 org.apache.solr.handler.admin.CoreAdminHandler.handleCreateAction(CoreAdminHandler.java:573)
  at
 
 org.apache.solr.handler.admin.CoreAdminHandler.handleRequestInternal(CoreAdminHandler.java:197)
  at
 
 org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:186)
  at
 
 org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:144)
  at
 
 org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:736)
  at
 
 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:261)
  at
 
 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:204)
  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(Thread.java:745)
  Caused by: org.apache.solr.common.SolrException: fieldType 'booleans'
 not
  found in the schema
  at
 
 org.apache.solr.update.processor.AddSchemaFieldsUpdateProcessorFactory$TypeMapping.populateValueClasses(AddSchemaFieldsUpdateProcessorFactory.java:244)
  at
 
 

RE: Delimited payloads input issue

2015-03-11 Thread Markus Jelsma
Thanks David for sharing! The custom attribute approach sounds interesting 
indeed. 
Markus

 
 
-Original message-
 From:david.w.smi...@gmail.com david.w.smi...@gmail.com
 Sent: Tuesday 10th March 2015 16:53
 To: solr-user@lucene.apache.org
 Subject: Re: Delimited payloads input issue
 
 Hi Markus,
 
 I’ve found this problem too. I’ve worked around it:
 * write a custom attribute that has the data you want to carry-forward, one
 with a no-op clear().  The no-op clear defeats WDF and other ill-behaved
 filters (e.g. common-grams).
 * Use a custom tokenizer that populates the attribute, and which can truly
 clear the custom attribute
 * Write a custom filter at the end of the chain that actually encodes the
 attribute data into the payload.
 
 This scheme has worked for me for sentence/paragraph IDs, which effectively
 hold constant throughout the sentence.  It may be more complicated when the
 data varies word-by-word since some Filters won’t work well.
 
 I suppose the real solution is better Filters that use captureState and/or
 an improved tokenStream design to clone attributes.  It’s better to clone a
 state when introducing a new token than to clear it!
 
 ~ David Smiley
 Freelance Apache Lucene/Solr Search Consultant/Developer
 http://www.linkedin.com/in/davidwsmiley
 
 On Fri, Mar 6, 2015 at 1:16 PM, Markus Jelsma markus.jel...@openindex.io
 wrote:
 
  Well, the only work-around we found to actually work properly is to
  override the problem causing tokenizer implementations on by one. Regarding
  the WordDelimiterFilter, the quickest fix is enabling keepOriginal, if you
  don't want the original to stick around, the filter implementation must be
  modified to carry the original PayloadAttribute to its descendants.
 
  Markus
 
 
  -Original message-
   From:Markus Jelsma markus.jel...@openindex.io
   Sent: Friday 27th February 2015 17:28
   To: solr-user solr-user@lucene.apache.org
   Subject: Delimited payloads input issue
  
   Hi - we attempt to use payloads to identify different parts of extracted
  HTML pages and use the DelimitedPayloadTokenFilter to assign the correct
  payload to the tokens. However, we are having issues for some language
  analyzers and issues with some types of content for most regular analyzers.
  
   If we, for example, want to assign payloads to the text within an H1
  field that contains non-alphanumerics such as `Hello, i am a heading!`, and
  use |5 as delimiter and payload, we send the following to Solr, `Hello,|5
  i|5 am|5 a|5 heading!|5`.
   This is not going to work because due to a WordDelimiterFilter, the
  tokens Hello and heading obviously loose their payload. We also cannot put
  the payload between the last alphanumeric and the following comma or
  exlamation mark because then those characters would become part of the
  payload if we use identity encoder, or it should fail if we use another
  encoder. We could solve this using a custom encoder that only takes the
  first character and ignores the rest, but this seems rather ugly.
  
   On the other hand, we have issues using language specific tokenizers
  such as Kuromoji, i will immediately dump the delimited payload so it never
  reaches the DelimitedPayloadTokenFilter. And if we try chinese and have the
  StandardTokenizer enabled, we also loose the delimited payload.
  
   Any of you have dealt with this before? Hints to share?
  
   Many thanks,
   Markus
  
 
 


Re: default heap size for solr 5.0? (-Xmx param)

2015-03-11 Thread Karl Kildén
Thanks!

I am using the old way and I see no reason to switch really?

cheers

On 11 March 2015 at 20:18, Shawn Heisey apa...@elyograg.org wrote:

 On 3/11/2015 12:25 PM, Karl Kildén wrote:
  I am a solr beginner. Anyone knows how solr 5.0 determines the max heap
  size? I can't find it anywhere.
 
  Also, where whould you activate jmx? Would like to be able to use
 visualvm
  in the future I imagine.
 
  I have a custom nssm thing going that installs it as a window service
 that
  simply calls java -jar start.jar

 The default heap size is 512m.  This is hardcoded in the bin/solr
 script.  You can override that with the -m parameter.

 If you are not using the bin/solr script and are instead doing the old
 java -jar start.jar startup, the default heap size is determined by
 the version of Java you are running.

 Thanks,
 Shawn




Re: Where is schema.xml and solrconfig.xml in solr 5.0.0

2015-03-11 Thread Nitin Solanki
Thanks a lot Erick.. It will be helpful.

On Wed, Mar 11, 2015 at 9:27 PM, Erick Erickson erickerick...@gmail.com
wrote:

 The configs are in Zookeeper. So you have to switch your thinking,
 it's rather confusing at first.

 When you create a collection, you specify a config set, these are
 usually in

 ./server/solr/configsets/data_driven_schema,
 ./server/solr/configsets/techproducts and the like.

 The entire conf directory under one of these is copied to Zookeeper
 (which you can see
 from the admin screen cloudtree, then in the right hand side you'll
 be able to find the config sets
 you uploaded.

 But, you cannot edit them there directly. You edit them on disk, then
 push them to Zookeeper,
 then reload the collection (or restart everything). See the reference
 guide here:
 https://cwiki.apache.org/confluence/display/solr/Command+Line+Utilities

 Best,
 Erick

 On Wed, Mar 11, 2015 at 6:01 AM, Nitin Solanki nitinml...@gmail.com
 wrote:
  Hi, alexandre..
 
  Thanks for responding...
  When I created new collection(wikingram) using solrCloud. It gets create
  into example/cloud/node*(node1, node2) like that.
  I have used *schema.xml and solrconfig.xml of
 sample_techproducts_configs*
  configuration.
 
  Now, The problem is that.
  If I change the configuration of *solrconfig.xml of *
  *sample_techproducts_configs*. Its configuration doesn't reflect on
  *wikingram* collection.
  How to reflect the changes of configuration in the collection?
 
  On Wed, Mar 11, 2015 at 5:42 PM, Alexandre Rafalovitch 
 arafa...@gmail.com
  wrote:
 
  Which example are you using? Or how are you creating your collection?
 
  If you are using your example, it creates a new directory under
  example. If you are creating a new collection with -c, it creates
  a new directory under the server/solr. The actual files are a bit
  deeper than usual to allow for a log folder next to the collection
  folder. So, for example:
  example/schemaless/solr/gettingstarted/conf/solrconfig.xml
 
  If it's a dynamic schema configuration, you don't actually have
  schema.xml, but managed-schema, as you should be mostly using REST
  calls to configure it.
 
  If you want to see the configuration files before the collection
  actually created, they are under server/solr/configsets, though they
  are not configsets in Solr sense, as they do get copied when you
  create your collections (sharing them causes issues).
 
  Regards,
 Alex.
  
  Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
  http://www.solr-start.com/
 
 
  On 11 March 2015 at 07:50, Nitin Solanki nitinml...@gmail.com wrote:
   Hello,
  I have switched from solr 4.10.2 to solr 5.0.0. In solr
   4-10.2, schema.xml and solrconfig.xml were in example/solr/conf/
 folder.
   Where is schema.xml and solrconfig.xml in solr 5.0.0 ? and also want
 to
   know how to configure in solrcloud ?
 



Re: Can a single SolrServer instance update multiple collections?

2015-03-11 Thread tuxedomoon
@Shawn,

I can definitely upgrade to SolrJ 4.x and would prefer that so as to target
4.x cores as well.  I'm already on Java 7. 

One attempt I made was this

UpdateRequest updateRequest = new UpdateRequest();
updateRequest.setParam(collection, collectionName);
updateRequest.setMethod(SolrRequest.METHOD.POST);
updateRequest.add(solrdoc);
UpdateResponse updateResponse = updateRequest.process(solrServer);

but I kept getting Bad Request which I suspect was a SOLR/SolrJ version
conflict.  

I'm all ears!

Dan






--
View this message in context: 
http://lucene.472066.n3.nabble.com/Can-a-single-SolrServer-instance-update-multiple-collections-tp4192480p4192520.html
Sent from the Solr - User mailing list archive at Nabble.com.


default heap size for solr 5.0? (-Xmx param)

2015-03-11 Thread Karl Kildén
Hello,

I am a solr beginner. Anyone knows how solr 5.0 determines the max heap
size? I can't find it anywhere.

Also, where whould you activate jmx? Would like to be able to use visualvm
in the future I imagine.

I have a custom nssm thing going that installs it as a window service that
simply calls java -jar start.jar

cheers


Can a single SolrServer instance update multiple collections?

2015-03-11 Thread tuxedomoon
I have a SolrJ application that reads from a Redis queue and updates
different collections based on the message content.  New collections are
added without my knowledge, so I am creating SolrServer objects on the fly
as follows:

def solrHost = http://myhost/solr/; (defined at startup)

def solrTarget = solrHost + collectionName
SolrServer solrServer = new CommonsHttpSolrServer(solrTarget)
updateResponse = solrServer.add(solrdoc)


This does work but obviously creates a new CommonsHttpSolrServer instance
for each message.  I assume GC will eliminate these but is there a way to do
this with a single SolrServer object?  

The SOLR host is version 3.5 and I am using the 3.5 jars for my application
(not sure if that is necessary). 





--
View this message in context: 
http://lucene.472066.n3.nabble.com/Can-a-single-SolrServer-instance-update-multiple-collections-tp4192480.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Can a single SolrServer instance update multiple collections?

2015-03-11 Thread Shawn Heisey
On 3/11/2015 12:23 PM, tuxedomoon wrote:
 I have a SolrJ application that reads from a Redis queue and updates
 different collections based on the message content.  New collections are
 added without my knowledge, so I am creating SolrServer objects on the fly
 as follows:

 def solrHost = http://myhost/solr/; (defined at startup)

 def solrTarget = solrHost + collectionName
 SolrServer solrServer = new CommonsHttpSolrServer(solrTarget)
 updateResponse = solrServer.add(solrdoc)


 This does work but obviously creates a new CommonsHttpSolrServer instance
 for each message.  I assume GC will eliminate these but is there a way to do
 this with a single SolrServer object?  

 The SOLR host is version 3.5 and I am using the 3.5 jars for my application
 (not sure if that is necessary). 

What you want to accomplish should be possible, with some attention to
how SolrJ code is used.

We won't talk about SolrCloud, since you're not running Solr 4.x or
5.0.  Upgrading the server side is generally more involved than
upgrading the client side, and switching to SolrCloud can be a fairly
major conceptual leap.

To do what I'm thinking about, you will need to ugprade SolrJ.  When
SolrCloud is not involved, cross-version compatibility between Solr and
SolrJ is pretty good, although there can be some hiccups when crossing
the 3.x/4.x barrier relating to the update handlers.  Those hiccups are
normally easy to fix, but they are something you need to be aware of.

Once you've decided on whether you're upgrading Solr and which version
of SolrJ you will upgrade to, we can get down to the actual Java code
you'll need.  Note that recent 4.x and 5.0 versions require Java 7, so
if you're still on Java 6, you'll be limited to version 4.7.2.

It might even be possible to do this with SolrJ 3.5, but I am already
pretty familiar with how you can do it using new features in 4.x, and
since you're going to need to change the source code anyway, you might
as well take advantage of more modern client functionality that will
make the code easier to understand.

Just FYI, there are changes coming (currently planned for SolrJ 5.1)
that will make this VERY easy.

Thanks,
Shawn



Re: Solr 5: data_driven_schema_config's solrconfig causing error

2015-03-11 Thread Aman Tandon

 AFAICT, what you’re trying to do is take a configset you’ve used in the
 past with an older version of Solr and get it to work with a newer Solr
 version.  If that’s so, perhaps you should start with a configset like
 sample_techproducts_configs?


This is exactly i want to do. Thanks for advice Okay i will use this
schema.


With Regards
Aman Tandon

On Wed, Mar 11, 2015 at 10:54 PM, Steve Rowe sar...@gmail.com wrote:

 Hi Aman,

 So you (randomly?) chose an example configset, commented out parts you
 didn’t understand, and now things don’t work?

 … Maybe you should review the process you’re using?

 Like, don’t start with a configset that will auto-populate the schema for
 you with guessed field types if you don’t want to do that.  (That’s the
 focus of the data_driven_schema_configs configset.)

 AFAICT, what you’re trying to do is take a configset you’ve used in the
 past with an older version of Solr and get it to work with a newer Solr
 version.  If that’s so, perhaps you should start with a configset like
 sample_techproducts_configs?

 Steve

  On Mar 11, 2015, at 1:05 PM, Aman Tandon amantandon...@gmail.com
 wrote:
 
  I removed/commented as it was not understood able and not for our use.
 
  With Regards
  Aman Tandon
 
  On Tue, Mar 10, 2015 at 8:04 PM, Steve Rowe sar...@gmail.com wrote:
 
  Hi Aman,
 
  The stack trace shows that the AddSchemaFieldsUpdateProcessorFactory
  specified in data_driven_schema_configs’s solrconfig.xml expects the
  “booleans” field type to exist.
 
  Solr 5’s data_driven_schema_configs includes the “booleans” field type:
 
  
 
 http://svn.apache.org/viewvc/lucene/dev/tags/lucene_solr_5_0_0/solr/server/solr/configsets/data_driven_schema_configs/conf/managed-schema?view=markup#l249
 
 
  So you must have removed it when you modified the schema?  Did you do
 this
  intentionally?  If so, why?
 
  Steve
 
  On Mar 10, 2015, at 5:25 AM, Aman Tandon amantandon...@gmail.com
  wrote:
 
  Hi,
 
  For the sake of using the new schema.xml and solrconfig.xml with solr
 5,
  I
  put my old required field type  fields names (being used with solr
  4.8.1)
  in the schema.xml given in *basic_configs*  configurations setting
 given
  in solrconfig.xml present in *data_driven_schema_configs* and put I put
  these configuration files in the configs of zookeeper.
 
  But when i am creating the core it is giving the error as booleans
  fieldType is not found in schema. So correct me if i am doing something
  wrong.
 
  ERROR - 2015-03-10 08:20:16.788; org.apache.solr.core.CoreContainer;
  Error
  creating core [core1]: fieldType 'booleans' not found in the schema
  org.apache.solr.common.SolrException: fieldType 'booleans' not found
 in
  the schema
  at org.apache.solr.core.SolrCore.init(SolrCore.java:896)
  at org.apache.solr.core.SolrCore.init(SolrCore.java:662)
  at org.apache.solr.core.CoreContainer.create(CoreContainer.java:513)
  at org.apache.solr.core.CoreContainer.create(CoreContainer.java:488)
  at
 
 
 org.apache.solr.handler.admin.CoreAdminHandler.handleCreateAction(CoreAdminHandler.java:573)
  at
 
 
 org.apache.solr.handler.admin.CoreAdminHandler.handleRequestInternal(CoreAdminHandler.java:197)
  at
 
 
 org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:186)
  at
 
 
 org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:144)
  at
 
 
 org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:736)
  at
 
 
 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:261)
  at
 
 
 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:204)
  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
 
 
 

Re: Solr 5: data_driven_schema_config's solrconfig causing error

2015-03-11 Thread Steve Rowe
Hi Aman,

So you (randomly?) chose an example configset, commented out parts you didn’t 
understand, and now things don’t work?

… Maybe you should review the process you’re using?

Like, don’t start with a configset that will auto-populate the schema for you 
with guessed field types if you don’t want to do that.  (That’s the focus of 
the data_driven_schema_configs configset.)

AFAICT, what you’re trying to do is take a configset you’ve used in the past 
with an older version of Solr and get it to work with a newer Solr version.  If 
that’s so, perhaps you should start with a configset like 
sample_techproducts_configs?

Steve

 On Mar 11, 2015, at 1:05 PM, Aman Tandon amantandon...@gmail.com wrote:
 
 I removed/commented as it was not understood able and not for our use.
 
 With Regards
 Aman Tandon
 
 On Tue, Mar 10, 2015 at 8:04 PM, Steve Rowe sar...@gmail.com wrote:
 
 Hi Aman,
 
 The stack trace shows that the AddSchemaFieldsUpdateProcessorFactory
 specified in data_driven_schema_configs’s solrconfig.xml expects the
 “booleans” field type to exist.
 
 Solr 5’s data_driven_schema_configs includes the “booleans” field type:
 
 
 http://svn.apache.org/viewvc/lucene/dev/tags/lucene_solr_5_0_0/solr/server/solr/configsets/data_driven_schema_configs/conf/managed-schema?view=markup#l249
 
 
 So you must have removed it when you modified the schema?  Did you do this
 intentionally?  If so, why?
 
 Steve
 
 On Mar 10, 2015, at 5:25 AM, Aman Tandon amantandon...@gmail.com
 wrote:
 
 Hi,
 
 For the sake of using the new schema.xml and solrconfig.xml with solr 5,
 I
 put my old required field type  fields names (being used with solr
 4.8.1)
 in the schema.xml given in *basic_configs*  configurations setting given
 in solrconfig.xml present in *data_driven_schema_configs* and put I put
 these configuration files in the configs of zookeeper.
 
 But when i am creating the core it is giving the error as booleans
 fieldType is not found in schema. So correct me if i am doing something
 wrong.
 
 ERROR - 2015-03-10 08:20:16.788; org.apache.solr.core.CoreContainer;
 Error
 creating core [core1]: fieldType 'booleans' not found in the schema
 org.apache.solr.common.SolrException: fieldType 'booleans' not found in
 the schema
 at org.apache.solr.core.SolrCore.init(SolrCore.java:896)
 at org.apache.solr.core.SolrCore.init(SolrCore.java:662)
 at org.apache.solr.core.CoreContainer.create(CoreContainer.java:513)
 at org.apache.solr.core.CoreContainer.create(CoreContainer.java:488)
 at
 
 org.apache.solr.handler.admin.CoreAdminHandler.handleCreateAction(CoreAdminHandler.java:573)
 at
 
 org.apache.solr.handler.admin.CoreAdminHandler.handleRequestInternal(CoreAdminHandler.java:197)
 at
 
 org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:186)
 at
 
 org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:144)
 at
 
 org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(SolrDispatchFilter.java:736)
 at
 
 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:261)
 at
 
 org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:204)
 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
 
 

Re: default heap size for solr 5.0? (-Xmx param)

2015-03-11 Thread Shawn Heisey
On 3/11/2015 12:25 PM, Karl Kildén wrote:
 I am a solr beginner. Anyone knows how solr 5.0 determines the max heap
 size? I can't find it anywhere.

 Also, where whould you activate jmx? Would like to be able to use visualvm
 in the future I imagine.

 I have a custom nssm thing going that installs it as a window service that
 simply calls java -jar start.jar

The default heap size is 512m.  This is hardcoded in the bin/solr
script.  You can override that with the -m parameter.

If you are not using the bin/solr script and are instead doing the old
java -jar start.jar startup, the default heap size is determined by
the version of Java you are running.

Thanks,
Shawn



Re: Solr 5.0 -- IllegalStateException: unexpected docvalues type NONE on result grouping

2015-03-11 Thread shamik
Looks like it's happening for any field which is using docvalues.

java.lang.IllegalStateException: unexpected docvalues type NONE for field
'title_sort' (expected=SORTED). Use UninvertingReader or index with
docvalues.

Any idea ? 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-5-0-IllegalStateException-unexpected-docvalues-type-NONE-on-result-grouping-tp4192477p4192529.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Can a single SolrServer instance update multiple collections?

2015-03-11 Thread Shawn Heisey
On 3/11/2015 3:35 PM, tuxedomoon wrote:
 I can definitely upgrade to SolrJ 4.x and would prefer that so as to target
 4.x cores as well.  I'm already on Java 7. 
 
 One attempt I made was this
 
 UpdateRequest updateRequest = new UpdateRequest();
 updateRequest.setParam(collection, collectionName);
 updateRequest.setMethod(SolrRequest.METHOD.POST);
 updateRequest.add(solrdoc);
 UpdateResponse updateResponse = updateRequest.process(solrServer);
 
 but I kept getting Bad Request which I suspect was a SOLR/SolrJ version
 conflict.  
 
 I'm all ears!

Can you share the full stacktrace?  If you can't see it on the client,
grab it from the server log.

The collection request parameter is only useful if you're running
SolrCloud.  The 3.x version and 4.x/5.x in non-cloud mode should ignore it.

UpdateRequest objects are created by default with a POST method, you
don't need to include that.

When I have some time to actually work on the code, I'm going to write
it using 4.x classes because that's what I have immediate access to, but
if you do 5.x, SolrServer becomes SolrClient, and HttpSolrServer becomes
HttpSolrClient.  I think everything else will be the same.  If I'm wrong
about that, it very likely will not be very hard to fix.

Thanks,
Shawn



Re: Solr 5.0 -- IllegalStateException: unexpected docvalues type NONE on result grouping

2015-03-11 Thread Chris Hostetter

1) the error message you posted doesn't appear to have been copied 
verbatim (note: ...or dex...) ... please proivde the *exact* error you 
are getting -- ideally with full stack trace from the solr logs.

2) the field/ you posted doens't match the field name in your error 
message

3)providing a field/ w/o the fieldType/ makes it hard to guess 
exactly what settings you are using (ie: is docValuesFormat specified on 
the fieldType?)

4) You said you are using result grouping, but you haven't actually shown 
us an example of what your request (with all params) looks like ... 
there's nohting in your email to even indicate grouping is involved.

Details matter...

https://wiki.apache.org/solr/UsingMailingLists


(PS: assuming no obvious mistakes, it would be helpful to know if you can 
reproduce this problem using your same exact same configs  schema with a 
newly built 5.0 index, or if it *only* affects you when you upgrade and 
use an existing index from 4.7)



: Date: Wed, 11 Mar 2015 11:02:43 -0700
: From: Shamik Bandopadhyay sham...@gmail.com
: Reply-To: solr-user@lucene.apache.org
: To: solr-user@lucene.apache.org
: Subject: Solr 5.0 -- IllegalStateException: unexpected docvalues type NONE
: on result grouping
: 
: Hi,
: 
:I've a field which is being used for result grouping. Here's the field
: definition.
: 
: field name=ADDedup type=string indexed=true stored=true
: multiValued=false required=false omitNorms=true  docValues=true/
: 
: This started once I did a rolling update from 4.7 to 5.0. I started getting
: the error on any group by query -- SolrDispatchFilter null:java.lang.
: IllegalStateException: unexpected docvalues type NONE for field 'ADSKDedup'
: (expected=SORTED). Use UninvertingReader or dex with docvalues.
: 
: Does this mean that I need to re-index documents to get over this error ?
: 
: Regards,
: Shamik
: 

-Hoss
http://www.lucidworks.com/


Re: Can a single SolrServer instance update multiple collections?

2015-03-11 Thread tuxedomoon
@Shawn

I'm getting the Bad Request again, with the original code snippet I posted,
it appears to be an 'illegal' string field.

SOLR log
-
INFO:
{add=[mgid:arc:content:jokers.com:694d5bf8-ecfd-11e0-aca6-0026b9414f30]} 0 7
Mar 12, 2015 12:15:09 AM org.apache.solr.common.SolrException log
SEVERE: org.apache.solr.common.SolrException: ERROR:
[doc=mgid:arc:content:jokers.com:694d5bf8-ecfd-11e0-aca6-0026b9414f30]
multiple values encountered for non multiValued field image_url_s:
[mgid:file:gsp:movie-assets:/movie-assets/cc/images/shows/miami-beach/episode-thumbnails/specials/iamstupid-the-movie_4x3.jpg,
mgid:file:gsp:movie-assets:/movie-assets/cc/images/shows/miami-beach/episode-thumbnails/specials/iamstupid-the-movie_4x3.jpg]
at
org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:246)
at
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:60)
at
org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:115)
at
org.apache.solr.handler.XMLLoader.processUpdate(XMLLoader.java:158)
at org.apache.solr.handler.XMLLoader.load(XMLLoader.java:79)




SolrJ Log shows the doc being sent (this is the offending field only)

 field name=image_url_s/field


I will investigate on the feeds side, the existing SolrJ code is not the
culprit.  But I'd still like a more elegant solution.  If a SolrJ 5 client
can talk to a 3.5 host I'm willing to go there.  I know I'm not the only one
who would like to address collections on the fly.

thx

Dan  



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Can-a-single-SolrServer-instance-update-multiple-collections-tp4192480p4192545.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: how to change configurations in solrcloud setup

2015-03-11 Thread Aman Tandon
Hi,

Thanks Nitin for replying, isn't it will be costly operation to restart all
nodes.

What i am doing in this is uploading the configurations again to zookeeper
and then reloading my core. And it is working well. So am i missing
something?

With Regards
Aman Tandon

On Wed, Mar 11, 2015 at 11:21 AM, Nitin Solanki nitinml...@gmail.com
wrote:

 Hi Aman,
  You can apply configuration on solr cloud by using this
 command -

 sudo
 path_of_solr/solr_folder_name/example/scripts/cloud-scripts/zkcli.sh
 -zkhost localhost:9983 -cmd upconfig -confdir
 path_of_solr/solr_folder_name/example/solr/collection1/conf -confname
 default

 and then restart all nodes of solrcloud.

 On Mon, Mar 9, 2015 at 11:43 AM, Aman Tandon amantandon...@gmail.com
 wrote:

  Please help.
 
  With Regards
  Aman Tandon
 
  On Sat, Mar 7, 2015 at 9:58 PM, Aman Tandon amantandon...@gmail.com
  wrote:
 
   Hi,
  
   Please tell me what is best way to apply configuration changes in solr
   cloud and how to do that.
  
   Thanks in advance.
  
   With Regards
   Aman Tandon
  
 



Re: Missing doc fields

2015-03-11 Thread phiroc
When I run the following query,

http://myserver:8990/solr/archives0/select?q=*:*rows=3wt=jsonft=id,ymd

The response is 

{responseHeader:{status:0,QTime:1,params:{q:*:*,rows:3,wt:json,ft:id,ymd}},response:{numFound:160238,start:0,docs:[{id:10,_version_:1495262519674011648},{id:1,_version_:1495262517261238272},{id:2,_version_:1495262517637677056}]}}


the ymd field does not appear in the list of document fields, although it is 
defined in my schema.xml.

Is there a way to tell SOLR to return that field in responses?


Philippe



- Mail original -
De: phi...@free.fr
À: solr-user@lucene.apache.org
Envoyé: Mercredi 11 Mars 2015 11:06:29
Objet: Missing doc fields



Hello,

when I display one of my core's  schema, lots of fields appear:

fields:[{
name:_root_,
type:string,
indexed:true,
stored:false},
  {
name:_version_,
type:long,
indexed:true,
stored:true},
  {
name:id,
type:string,
multiValued:false,
indexed:true,
required:true,
stored:true},
  {
name:ymd,
type:tdate,
indexed:true,
stored:true}],
   


Yet, when I display $results in the richtext_doc.vm Velocity template, 
documents only contain three fields (id, _version_, score):

SolrDocument{id=3, _version_=1495262517955395584, score=1.0}, 


How can I increase the number of doc fields?

Many thanks.

Philipppe


Re: Missing doc fields

2015-03-11 Thread Dmitry Kan
What is the ft parameter that you are sending?


In order to see all stored fields use the parameter fl=*

Or list the field names you need: fl=id,ymd

On Wed, Mar 11, 2015 at 12:35 PM, phi...@free.fr wrote:

 When I run the following query,

 http://myserver:8990/solr/archives0/select?q=*:*rows=3wt=jsonft=id,ymd

 The response is


 {responseHeader:{status:0,QTime:1,params:{q:*:*,rows:3,wt:json,ft:id,ymd}},response:{numFound:160238,start:0,docs:[{id:10,_version_:1495262519674011648},{id:1,_version_:1495262517261238272},{id:2,_version_:1495262517637677056}]}}


 the ymd field does not appear in the list of document fields, although it
 is defined in my schema.xml.

 Is there a way to tell SOLR to return that field in responses?


 Philippe



 - Mail original -
 De: phi...@free.fr
 À: solr-user@lucene.apache.org
 Envoyé: Mercredi 11 Mars 2015 11:06:29
 Objet: Missing doc fields



 Hello,

 when I display one of my core's  schema, lots of fields appear:

 fields:[{
 name:_root_,
 type:string,
 indexed:true,
 stored:false},
   {
 name:_version_,
 type:long,
 indexed:true,
 stored:true},
   {
 name:id,
 type:string,
 multiValued:false,
 indexed:true,
 required:true,
 stored:true},
   {
 name:ymd,
 type:tdate,
 indexed:true,
 stored:true}],



 Yet, when I display $results in the richtext_doc.vm Velocity template,
 documents only contain three fields (id, _version_, score):

 SolrDocument{id=3, _version_=1495262517955395584, score=1.0},


 How can I increase the number of doc fields?

 Many thanks.

 Philipppe




-- 
Dmitry Kan
Luke Toolbox: http://github.com/DmitryKey/luke
Blog: http://dmitrykan.blogspot.com
Twitter: http://twitter.com/dmitrykan
SemanticAnalyzer: www.semanticanalyzer.info


Re: Missing doc fields

2015-03-11 Thread phiroc
Hello,

I found the reason: the query to store ymds in SOLR was invalid (json and 
literal are concatenated below).

curl -Ss -X POST 
'http://myserver:8990/solr/archives0/update/extract?extractFormat=textwt=jsonliteral.ymd=1944-12-31T00:00:00Aliteral.id=159168


Philippe



- Mail original -
De: phi...@free.fr
À: solr-user@lucene.apache.org
Envoyé: Mercredi 11 Mars 2015 11:44:15
Objet: Re: Missing doc fields

I meant 'fl'.

--

http://myserver:8990/solr/archives0/select?q=*:*rows=3wt=jsonfl=*

--

{responseHeader:{status:0,QTime:3,params:{q:*:*,fl:*,rows:3,wt:json}},response:{numFound:160238,start:0,docs:[{id:10,_version_:1495262519674011648},{id:1,_version_:1495262517261238272},{id:2,_version_:1495262517637677056}]}}


-- schema.xml 



 field name=_version_ type=long indexed=true stored=true/
   
   !-- points to the root document of a block of nested documents. Required 
for nested
  document support, may be removed otherwise
   --
   field name=_root_ type=string indexed=true stored=false/

   !-- Only remove the id field if you have a very good reason to. While not 
strictly
 required, it is highly recommended. A uniqueKey is present in almost all 
Solr 
 installations. See the uniqueKey declaration below where uniqueKey is 
set to id.
   --   
   field name=id type=string indexed=true stored=true required=true 
multiValued=false / 


   field name=ymd type=tdate indexed=true stored=true/
   


---





- Mail original -
De: Dmitry Kan solrexp...@gmail.com
À: solr-user@lucene.apache.org
Envoyé: Mercredi 11 Mars 2015 11:38:26
Objet: Re: Missing doc fields

What is the ft parameter that you are sending?


In order to see all stored fields use the parameter fl=*

Or list the field names you need: fl=id,ymd

On Wed, Mar 11, 2015 at 12:35 PM, phi...@free.fr wrote:

 When I run the following query,

 http://myserver:8990/solr/archives0/select?q=*:*rows=3wt=jsonft=id,ymd

 The response is


 {responseHeader:{status:0,QTime:1,params:{q:*:*,rows:3,wt:json,ft:id,ymd}},response:{numFound:160238,start:0,docs:[{id:10,_version_:1495262519674011648},{id:1,_version_:1495262517261238272},{id:2,_version_:1495262517637677056}]}}


 the ymd field does not appear in the list of document fields, although it
 is defined in my schema.xml.

 Is there a way to tell SOLR to return that field in responses?


 Philippe



 - Mail original -
 De: phi...@free.fr
 À: solr-user@lucene.apache.org
 Envoyé: Mercredi 11 Mars 2015 11:06:29
 Objet: Missing doc fields



 Hello,

 when I display one of my core's  schema, lots of fields appear:

 fields:[{
 name:_root_,
 type:string,
 indexed:true,
 stored:false},
   {
 name:_version_,
 type:long,
 indexed:true,
 stored:true},
   {
 name:id,
 type:string,
 multiValued:false,
 indexed:true,
 required:true,
 stored:true},
   {
 name:ymd,
 type:tdate,
 indexed:true,
 stored:true}],



 Yet, when I display $results in the richtext_doc.vm Velocity template,
 documents only contain three fields (id, _version_, score):

 SolrDocument{id=3, _version_=1495262517955395584, score=1.0},


 How can I increase the number of doc fields?

 Many thanks.

 Philipppe




-- 
Dmitry Kan
Luke Toolbox: http://github.com/DmitryKey/luke
Blog: http://dmitrykan.blogspot.com
Twitter: http://twitter.com/dmitrykan
SemanticAnalyzer: www.semanticanalyzer.info


Re: Missing doc fields

2015-03-11 Thread phiroc
I meant 'fl'.

--

http://myserver:8990/solr/archives0/select?q=*:*rows=3wt=jsonfl=*

--

{responseHeader:{status:0,QTime:3,params:{q:*:*,fl:*,rows:3,wt:json}},response:{numFound:160238,start:0,docs:[{id:10,_version_:1495262519674011648},{id:1,_version_:1495262517261238272},{id:2,_version_:1495262517637677056}]}}


-- schema.xml 



 field name=_version_ type=long indexed=true stored=true/
   
   !-- points to the root document of a block of nested documents. Required 
for nested
  document support, may be removed otherwise
   --
   field name=_root_ type=string indexed=true stored=false/

   !-- Only remove the id field if you have a very good reason to. While not 
strictly
 required, it is highly recommended. A uniqueKey is present in almost all 
Solr 
 installations. See the uniqueKey declaration below where uniqueKey is 
set to id.
   --   
   field name=id type=string indexed=true stored=true required=true 
multiValued=false / 


   field name=ymd type=tdate indexed=true stored=true/
   


---





- Mail original -
De: Dmitry Kan solrexp...@gmail.com
À: solr-user@lucene.apache.org
Envoyé: Mercredi 11 Mars 2015 11:38:26
Objet: Re: Missing doc fields

What is the ft parameter that you are sending?


In order to see all stored fields use the parameter fl=*

Or list the field names you need: fl=id,ymd

On Wed, Mar 11, 2015 at 12:35 PM, phi...@free.fr wrote:

 When I run the following query,

 http://myserver:8990/solr/archives0/select?q=*:*rows=3wt=jsonft=id,ymd

 The response is


 {responseHeader:{status:0,QTime:1,params:{q:*:*,rows:3,wt:json,ft:id,ymd}},response:{numFound:160238,start:0,docs:[{id:10,_version_:1495262519674011648},{id:1,_version_:1495262517261238272},{id:2,_version_:1495262517637677056}]}}


 the ymd field does not appear in the list of document fields, although it
 is defined in my schema.xml.

 Is there a way to tell SOLR to return that field in responses?


 Philippe



 - Mail original -
 De: phi...@free.fr
 À: solr-user@lucene.apache.org
 Envoyé: Mercredi 11 Mars 2015 11:06:29
 Objet: Missing doc fields



 Hello,

 when I display one of my core's  schema, lots of fields appear:

 fields:[{
 name:_root_,
 type:string,
 indexed:true,
 stored:false},
   {
 name:_version_,
 type:long,
 indexed:true,
 stored:true},
   {
 name:id,
 type:string,
 multiValued:false,
 indexed:true,
 required:true,
 stored:true},
   {
 name:ymd,
 type:tdate,
 indexed:true,
 stored:true}],



 Yet, when I display $results in the richtext_doc.vm Velocity template,
 documents only contain three fields (id, _version_, score):

 SolrDocument{id=3, _version_=1495262517955395584, score=1.0},


 How can I increase the number of doc fields?

 Many thanks.

 Philipppe




-- 
Dmitry Kan
Luke Toolbox: http://github.com/DmitryKey/luke
Blog: http://dmitrykan.blogspot.com
Twitter: http://twitter.com/dmitrykan
SemanticAnalyzer: www.semanticanalyzer.info


Re: Invalid Date String:'1992-07-10T17'

2015-03-11 Thread Mirko Torrisi
Thanks very much for each of your replies. These resolved my problem and 
teach me something important.
I have just discovered that I have another problem but I guess that I 
have to open another discussion.


Cheers,

Mirko

On 10/03/15 20:30, Chris Hostetter wrote:

: is a syntactically significant character to the query parser, so it's
getting confused by it in the text of your query.

you're seeing the same problem as if you tried to search for foo:bar in
the yak field using q=yak:foo:bar

you either need to backslash escape the : characters, or wrap the date
in quotes, or use a diff parser that doesn't treat colons as special
characters (but remember that since you are building this up as a java
string, you have to deal with *java* string escaping as well...

String a = speechDate:1992-07-10T17\\:33\\:18Z;
String a = speechDate:\1992-07-10T17:33:18Z\;
String a = speechDate: + 
ClientUtils.escapeQueryChars(1992-07-10T17:33:18Z);
String a = {!field f=speechDate}1992-07-10T17:33:18Z;

: My goal is to group these speeches (hopefully using date math syntax). I would

Unless you are truely seraching for only documents that have an *exact*
date value matching your input (down to the millisecond) then seraching or
a single date value is almost certainly not what you want -- you most
likely want to do a range search...

   String a = speechDate:[1992-07-10T00:00:00Z TO 1992-07-11T00:00:00Z];

(which doesn't require special escaping, because the query parser is smart
enough to know that : aren't special inside of the [..])

: like to know if you suggest me to use date or tdate or other because I have
: not understood the difference.

the difference between date and tdate has to do with how you wnat to trade
index size (on disk  in ram) with search speed for range queries like
these -- tdate takes up a little more room in the index, but came make
range queries faster.


-Hoss
http://www.lucidworks.com/




Re: how to change configurations in solrcloud setup

2015-03-11 Thread Shawn Heisey
On 3/11/2015 12:43 AM, Aman Tandon wrote:
 Thanks Nitin for replying, isn't it will be costly operation to restart all
 nodes.
 
 What i am doing in this is uploading the configurations again to zookeeper
 and then reloading my core. And it is working well. So am i missing
 something?

Yes, that is enough, except that you should reload the collection, which
will reload all cores for that collection.  Fully restarting all Solr
instances is not required for most changes to a collection config.

There is an exception - when you are adding config that uses new jars
added to ${solr.solr.home}/lib after Solr startup.  In that situation, a
restart would be required so that the new jars get loaded.  It is
strongly recommended that you use an external zookeeper and that you do
a rolling restart, where you restart one node, wait for the cloud graph
in the admin UI to show 100% green, then restart the next node.

Nitin's suggestion shows the zkcli.sh script starting with sudo which
runs the command as root.  This is not necessary.  As long as the
contents of the example directory (or server directory in 5.0) is
accessible to a normal user and the script is marked executable for that
user, no special permissions are required.

Thanks,
Shawn



Re: how to change configurations in solrcloud setup

2015-03-11 Thread Aman Tandon
Thanks Shawn.


  except that you should reload the collection, which
 will reload all cores for that collection


So i could  reload a collection via Collection API's

http://localhost:8983/solr/admin/collections?action=RELOADname=newCollection

right?

With Regards
Aman Tandon

On Wed, Mar 11, 2015 at 1:48 PM, Shawn Heisey apa...@elyograg.org wrote:

 On 3/11/2015 12:43 AM, Aman Tandon wrote:
  Thanks Nitin for replying, isn't it will be costly operation to restart
 all
  nodes.
 
  What i am doing in this is uploading the configurations again to
 zookeeper
  and then reloading my core. And it is working well. So am i missing
  something?

 Yes, that is enough, except that you should reload the collection, which
 will reload all cores for that collection.  Fully restarting all Solr
 instances is not required for most changes to a collection config.

 There is an exception - when you are adding config that uses new jars
 added to ${solr.solr.home}/lib after Solr startup.  In that situation, a
 restart would be required so that the new jars get loaded.  It is
 strongly recommended that you use an external zookeeper and that you do
 a rolling restart, where you restart one node, wait for the cloud graph
 in the admin UI to show 100% green, then restart the next node.

 Nitin's suggestion shows the zkcli.sh script starting with sudo which
 runs the command as root.  This is not necessary.  As long as the
 contents of the example directory (or server directory in 5.0) is
 accessible to a normal user and the script is marked executable for that
 user, no special permissions are required.

 Thanks,
 Shawn




Creating a directory resource in solr-jetty

2015-03-11 Thread phiroc
Hello,

does anyone if it is possible to create a directory resource in the solr-jetty 
configuration files?

In Tomcat 8, you can do the following:


PostResources

className=org.apache.catalina.webresources.DirResourceSet
base=/mnt/archive_pdf/PDF/IHT
webAppMount=/arcpdf0
/

many thanks.

Philippe


Re: Where is schema.xml and solrconfig.xml in solr 5.0.0

2015-03-11 Thread Nitin Solanki
Hi, alexandre..

Thanks for responding...
When I created new collection(wikingram) using solrCloud. It gets create
into example/cloud/node*(node1, node2) like that.
I have used *schema.xml and solrconfig.xml of sample_techproducts_configs*
configuration.

Now, The problem is that.
If I change the configuration of *solrconfig.xml of *
*sample_techproducts_configs*. Its configuration doesn't reflect on
*wikingram* collection.
How to reflect the changes of configuration in the collection?

On Wed, Mar 11, 2015 at 5:42 PM, Alexandre Rafalovitch arafa...@gmail.com
wrote:

 Which example are you using? Or how are you creating your collection?

 If you are using your example, it creates a new directory under
 example. If you are creating a new collection with -c, it creates
 a new directory under the server/solr. The actual files are a bit
 deeper than usual to allow for a log folder next to the collection
 folder. So, for example:
 example/schemaless/solr/gettingstarted/conf/solrconfig.xml

 If it's a dynamic schema configuration, you don't actually have
 schema.xml, but managed-schema, as you should be mostly using REST
 calls to configure it.

 If you want to see the configuration files before the collection
 actually created, they are under server/solr/configsets, though they
 are not configsets in Solr sense, as they do get copied when you
 create your collections (sharing them causes issues).

 Regards,
Alex.
 
 Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
 http://www.solr-start.com/


 On 11 March 2015 at 07:50, Nitin Solanki nitinml...@gmail.com wrote:
  Hello,
 I have switched from solr 4.10.2 to solr 5.0.0. In solr
  4-10.2, schema.xml and solrconfig.xml were in example/solr/conf/ folder.
  Where is schema.xml and solrconfig.xml in solr 5.0.0 ? and also want to
  know how to configure in solrcloud ?



Re: Cores and and ranking (search quality)

2015-03-11 Thread johnmunir
Thanks Walter.  This explains a lot.

- MJ

-Original Message-
From: Walter Underwood [mailto:wun...@wunderwood.org] 
Sent: Tuesday, March 10, 2015 4:41 PM
To: solr-user@lucene.apache.org
Subject: Re: Cores and and ranking (search quality)

If the documents are distributed randomly across shards/cores, then the 
statistics will be similar in each core and the results will be similar.

If the documents are distributed semantically (say, by topic or type), the 
statistics of each core will be skewed towards that set of documents and the 
results could be quite different.

Assume I have tech support documents and I put all the LaserJet docs in one 
core. That term is very common in that core (poor idf) and rare in other cores 
(strong idf). But for the query “laserjet”, all the good answers are in the 
LaserJet-specific core, where they will be scored low.

An identical document that mentions “LaserJet” once will score fairly low in 
the LaserJet-specific collection and fairly high in the other collection.

Global IDF fixes this, by using corpus-wide statistics. That’s how we ran 
Infoseek and Ultraseek in the late 1990’s.

Random allocation to cores avoids it.

If you have significant traffic directed to one object type AND you need peak 
performance, you may want to segregate your cores by object type. Otherwise, 
I’d let SolrCloud spread them around randomly and filter based on an object 
type field. That should work well for most purposes.

Any core with less than 1000 records is likely to give somewhat mysterious 
results. A word that is common in English, like “next”, will only be in one 
document and will score too high. A less-common word, like “unreasonably”, will 
be in 20 and will score low. You need lots of docs for the language statistics 
to even out.

wunder
Walter Underwood
wun...@wunderwood.org
http://observer.wunderwood.org/  (my blog)


On Mar 10, 2015, at 1:23 PM, johnmu...@aol.com wrote:

 Thanks Walter.
 
 The design decision I'm trying to solve is this: using multiple cores, will 
 my ranking be impacted vs. using single core?
 
 I have records to index and each record can be grouped into object-types, 
 such as object-A, object-B, object-C, etc.  I have a total of 30 (maybe more) 
 object-types.  There may be only 10 records of object-A, but 10 million 
 records of object-B or 1 million of object-C, etc.  I need to be able to 
 search against a single object-type and / or across all object-types.
 
 From my past experience, in a single core setup, if I have two identical 
 records, and I search on the term  XYZ that matches one of the records, the 
 second record ranks right next to the other (because it too contains XYZ).  
 This is good and is the expected behavior.  If I want to limit my search to 
 an object-type, I AND XYZ with that object-type.  So all is well.
 
 What I'm considering to do for my new design is use multi-cores and 
 distributed search.  I am considering to create a core for each object-type: 
 core-A will hold records from object-A, core-B will hold records from 
 object-B, etc.  Before I can make a decision on this design, I need to know 
 how ranking will be impacted.
 
 Going back to my earlier example: if I have 2 identical records, one of them 
 went to core-A which has 10 records, and the other went to core-B which has 
 10 million records, using distributed search, if I now search across all 
 cores on the term  XYZ (just like in the single core case), it will match 
 both of those records all right, but will those two records be ranked next to 
 each other just like in the single core case?  If not, which will rank 
 higher, the one from core-A or the one from core-B?
 
 My concern is, using multi-cores and distributed search means I will give up 
 on rank quality when records are not distributed across cores evenly.  If so, 
 than maybe this is not a design I can use.
 
 - MJ
 
 -Original Message-
 From: Walter Underwood [mailto:wun...@wunderwood.org] 
 Sent: Tuesday, March 10, 2015 2:39 PM
 To: solr-user@lucene.apache.org
 Subject: Re: Cores and and ranking (search quality)
 
 On Mar 10, 2015, at 10:17 AM, johnmu...@aol.com wrote:
 
 If I have two cores, one core has 10 docs another has 100,000 docs.  I then 
 submit two docs that are 100% identical (with the exception of the unique-ID 
 fields, which is stored but not indexed) one to each core.  The question is, 
 during search, will both of those docs rank near each other or not? […]
 
 Put another way: are docs from the smaller core (the one has 10 docs only) 
 rank higher or lower compared to docs from the larger core (the one with 
 100,000) docs?
 
 These are not quite the same question.
 
 tf.idf ranking depends on the other documents in the collection (the idf 
 term). With 10 docs, the document frequency statistics are effectively random 
 noise, so the ranking is unpredictable.
 
 Identical documents should rank identically, but whether they are higher or 
 lower in the two 

Re: Where is schema.xml and solrconfig.xml in solr 5.0.0

2015-03-11 Thread Alexandre Rafalovitch
Which example are you using? Or how are you creating your collection?

If you are using your example, it creates a new directory under
example. If you are creating a new collection with -c, it creates
a new directory under the server/solr. The actual files are a bit
deeper than usual to allow for a log folder next to the collection
folder. So, for example:
example/schemaless/solr/gettingstarted/conf/solrconfig.xml

If it's a dynamic schema configuration, you don't actually have
schema.xml, but managed-schema, as you should be mostly using REST
calls to configure it.

If you want to see the configuration files before the collection
actually created, they are under server/solr/configsets, though they
are not configsets in Solr sense, as they do get copied when you
create your collections (sharing them causes issues).

Regards,
   Alex.

Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
http://www.solr-start.com/


On 11 March 2015 at 07:50, Nitin Solanki nitinml...@gmail.com wrote:
 Hello,
I have switched from solr 4.10.2 to solr 5.0.0. In solr
 4-10.2, schema.xml and solrconfig.xml were in example/solr/conf/ folder.
 Where is schema.xml and solrconfig.xml in solr 5.0.0 ? and also want to
 know how to configure in solrcloud ?


count documents using stored fields only in Apache solr

2015-03-11 Thread Hafiz Shafiq
I am using solr 4.10.3. Documents are indexed using apache nutch 2.3. There
is a field in schema.xml that is tstamp that contains informas when
documents was indexed. This field is not indexed and stored only in solr. I
want to count no of documents indexed by nutch in solr. It is clear that I
have to use tstamp field. Now how I can do it?


Re: how to change configurations in solrcloud setup

2015-03-11 Thread Aman Tandon
Hi Shawn,

I make the changes in my schema.xml  uploaded the configuration from one
of my server, which is now visible in all other servers (I confirmed it by
checking from admin interface).

*My Solr Cloud arch is :*

I have two collections, mcat  intent in my external zookeeper ensemble of
3.

*On Machine1*

I created the mcat_shard1 of mcat in core 1  intent_shard1 of intent in
core 2.

*On Machine2*

I created the mcat_shard2  of mcat in core 1  intent_shard2 of intent in
core 2.

*On Machine 3*

I created the replica  of mcat_shard1 in core 1
I created the replica  of mcat_shard2 in core 2
I created the replica  of intent_shard1 in core 3
I created the replica  of intent_shard2 in core 4

So to apply the changes i reloaded my collection using the url:

http://localhost:4567/solr/admin/collections?action=RELOADname=intent

Due to which the two shard present on one of my machine (Machine 2) goes in
recovery mode and i am not able to understand what's wrong here.

*Please see the solr logs of that machine:*

INFO  - 2015-03-11 12:12:41.630;
 org.apache.solr.servlet.SolrDispatchFilter; [admin] webapp=null
 path=/admin/cores
 params={coreNodeName=core_node2onlyIfLeaderActive=truestate=recoveringnodeName=192.168.5.81:4567_solraction=PREPRECOVERYcheckLive=truecore=mcat_shard2_replica_corewt=javabinonlyIfLeader=trueversion=2}
 status=400 QTime=1
 ERROR - 2015-03-11 12:12:41.643; org.apache.solr.common.SolrException;
 Error while trying to recover.
 core=mcat_core:java.util.concurrent.ExecutionException:
 org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error
 from server at http://127.0.1.1:4567/solr: I was asked to wait on state
 recovering for null in null on 192.168.5.81:4567_solr but I still do not
 see the requested state. I see state: null live:false leader from ZK: Not
 available due to: java.lang.NullPointerException
 at java.util.concurrent.FutureTask.report(FutureTask.java:122)
 at java.util.concurrent.FutureTask.get(FutureTask.java:188)
 at
 org.apache.solr.cloud.RecoveryStrategy.sendPrepRecoveryCmd(RecoveryStrategy.java:597)
 at
 org.apache.solr.cloud.RecoveryStrategy.doRecovery(RecoveryStrategy.java:369)
 at org.apache.solr.cloud.RecoveryStrategy.run(RecoveryStrategy.java:235)
 Caused by:
 org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error
 from server at http://127.0.1.1:4567/solr: I was asked to wait on state
 recovering for null in null on 192.168.5.81:4567_solr but I still do not
 see the requested state. I see state: null live:false leader from ZK: Not
 available due to: java.lang.NullPointerException
 at
 org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:558)
 at
 org.apache.solr.client.solrj.impl.HttpSolrClient$1.call(HttpSolrClient.java:249)
 at
 org.apache.solr.client.solrj.impl.HttpSolrClient$1.call(HttpSolrClient.java:245)
 at java.util.concurrent.FutureTask.run(FutureTask.java:262)
 at
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:745)
 ERROR - 2015-03-11 12:12:41.644; org.apache.solr.cloud.RecoveryStrategy;
 Recovery failed - trying again... (6) core=mcat_core
 INFO  - 2015-03-11 12:12:41.644; org.apache.solr.cloud.RecoveryStrategy;
 Wait 60.0 seconds before trying to recover again (7)
 INFO  - 2015-03-11 12:12:42.665;
 org.apache.solr.common.cloud.ZkStateReader$2; A cluster state change:
 WatchedEvent state:SyncConnected type:NodeDataChanged
 path:/clusterstate.json, has occurred - updating... (live nodes size: 3)
 INFO  - 2015-03-11 12:12:43.355;
 org.apache.solr.common.cloud.ZkStateReader$2; A cluster state change:
 WatchedEvent state:SyncConnected type:NodeDataChanged
 path:/clusterstate.json, has occurred - updating... (live nodes size: 3)


I restart my complete cluster but the problem still present. Please help.

*Here is the screenshot url:*

*http://i.imgur.com/QFdg89S.png http://i.imgur.com/QFdg89S.png*

http://i.imgur.com/tS0yTNh.png



With Regards
Aman Tandon

On Wed, Mar 11, 2015 at 2:02 PM, Aman Tandon amantandon...@gmail.com
wrote:

 Thanks Shawn.


  except that you should reload the collection, which
 will reload all cores for that collection


 So i could  reload a collection via Collection API's


 http://localhost:8983/solr/admin/collections?action=RELOADname=newCollection

 right?

 With Regards
 Aman Tandon

 On Wed, Mar 11, 2015 at 1:48 PM, Shawn Heisey apa...@elyograg.org wrote:

 On 3/11/2015 12:43 AM, Aman Tandon wrote:
  Thanks Nitin for replying, isn't it will be costly operation to restart
 all
  nodes.
 
  What i am doing in this is uploading the configurations again to
 zookeeper
  and then reloading my core. And it is working well. So am i missing
  something?

 Yes, that is enough, except that you should reload the collection, which
 will reload all cores for that collection.  Fully restarting all Solr
 instances is 

Where is schema.xml and solrconfig.xml in solr 5.0.0

2015-03-11 Thread Nitin Solanki
Hello,
   I have switched from solr 4.10.2 to solr 5.0.0. In solr
4-10.2, schema.xml and solrconfig.xml were in example/solr/conf/ folder.
Where is schema.xml and solrconfig.xml in solr 5.0.0 ? and also want to
know how to configure in solrcloud ?


Re: Solr 5.0 -- IllegalStateException: unexpected docvalues type NONE on result grouping

2015-03-11 Thread shamik
Thanks for your reply. Initially, I was under the impression that the issue
is related to grouping as group queries were failing. Later, when I looked
further, I found that it's happening for any field for which the docvalue
has turned on. The second example I took was from another field. Here's a
full stack trace for another field using docvalues.

Field definition :

field name=DocumentType type=string indexed=true stored=true
multiValued=false required=false omitNorms=true docValues=true /


3/11/2015, 2:14:30 PM   ERROR   SolrDispatchFilter 
null:java.lang.IllegalStateException: unexpected docvalues type NONE for
field 'DocumentType' (expected=SORTED). Use UninvertingReader or index with
docvalues.

null:java.lang.IllegalStateException: unexpected docvalues type NONE for
field 'DocumentType' (expected=SORTED). Use UninvertingReader or index with
docvalues.
at org.apache.lucene.index.DocValues.checkField(DocValues.java:208)
at org.apache.lucene.index.DocValues.getSorted(DocValues.java:264)
at
org.apache.lucene.search.FieldComparator$TermOrdValComparator.getSortedDocValues(FieldComparator.java:757)
at
org.apache.lucene.search.FieldComparator$TermOrdValComparator.getLeafComparator(FieldComparator.java:762)
at
org.apache.lucene.search.FieldValueHitQueue.getComparators(FieldValueHitQueue.java:183)
at
org.apache.lucene.search.TopFieldCollector$NonScoringCollector.getLeafCollector(TopFieldCollector.java:141)
at
org.apache.lucene.search.MultiCollector.getLeafCollector(MultiCollector.java:99)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:583)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:284)
at
org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:231)
at
org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1766)
at
org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1502)
at
org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:586)
at
org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:511)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:227)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:144)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:2006)
at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:777)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:413)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:204)
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.content(AbstractHttpConnection.java:953)
at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
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)
 

Re: solr cloud does not start with many collections

2015-03-11 Thread Damien Kamerman
Didier, I'm starting to look at SOLR-6399
 after the core was unloaded, it was absent from the collection list, as
if it never existed. On the other hand, re-issuing a CREATE call with the
same collection restored the collection, along with its data
The collection is sill in ZK though?

 upon restart Solr tried to reload the previously-unloaded collection.
Looks like CoreContainer.load() uses CoreDescriptor.isTransient() and
CoreDescriptor.isLoadOnStartup() properties on startup.


On 7 March 2015 at 13:10, didier deshommes dfdes...@gmail.com wrote:

 It would be a huge step forward if one could have several hundreds of Solr
 collections, but only have a small portion of them opened/loaded at the
 same time. This is similar to ElasticSearch's close index api, listed here:

 http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-open-close.html
 . I've opened an issue to implement the same in Solr here a few months ago:
 https://issues.apache.org/jira/browse/SOLR-6399

 On Thu, Mar 5, 2015 at 4:42 PM, Damien Kamerman dami...@gmail.com wrote:

  I've tried a few variations, with 3 x ZK, 6 X nodes, solr 4.10.3, solr
 5.0
  without any success and no real difference. There is a tipping point at
  around 3,000-4,000 cores (varies depending on hardware) from where I can
  restart the cloud OK within ~4min, to the cloud not working and
  continuous 'conflicting
  information about the leader of shard' warnings.
 
  On 5 March 2015 at 14:15, Shawn Heisey apa...@elyograg.org wrote:
 
   On 3/4/2015 5:37 PM, Damien Kamerman wrote:
I'm running on Solaris x86, I have plenty of memory and no real
 limits
# plimit 15560
15560:  /opt1/jdk/bin/java -d64 -server -Xss512k -Xms32G -Xmx32G
-XX:MaxMetasp
   resource  current maximum
  time(seconds) unlimited   unlimited
  file(blocks)  unlimited   unlimited
  data(kbytes)  unlimited   unlimited
  stack(kbytes) unlimited   unlimited
  coredump(blocks)  unlimited   unlimited
  nofiles(descriptors)  65536   65536
  vmemory(kbytes)   unlimited   unlimited
   
I've been testing with 3 nodes, and that seems OK up to around 3,000
   cores
total. I'm thinking of testing with more nodes.
  
   I have opened an issue for the problems I encountered while recreating
 a
   config similar to yours, which I have been doing on Linux.
  
   https://issues.apache.org/jira/browse/SOLR-7191
  
   It's possible that the only thing the issue will lead to is
 improvements
   in the documentation, but I'm hopeful that there will be code
   improvements too.
  
   Thanks,
   Shawn
  
  
 
 
  --
  Damien Kamerman
 




-- 
Damien Kamerman


Case Studies , Reference Implementations for SolrCloud

2015-03-11 Thread Pradeep Bhattiprolu
Hi
 am evaluating the SolrCloud Offering for distributed search.
Do we have any case studies are websites which are using these new features
of SolrCloud ?
Any inputs are highly appreciated.

Thanks
Pradeep


Re: Case Studies , Reference Implementations for SolrCloud

2015-03-11 Thread Alexandre Rafalovitch
Something like this:
https://www.youtube.com/watch?v=_Erkln5WWLwlist=PLU6n9Voqu_1FM8nmVwiWWDRtsEjlPqhgP
?

Or are you looking for specific setups? I think those are harder to
get (everybody is different...), but it might be worth looking through
the rest of the Solr Revolution videos, I think there were at least a
couple of talks.

Regards,
   Alex.

Solr Analyzers, Tokenizers, Filters, URPs and even a newsletter:
http://www.solr-start.com/


On 11 March 2015 at 22:52, Pradeep Bhattiprolu pbhatt...@gmail.com wrote:
 Hi
  am evaluating the SolrCloud Offering for distributed search.
 Do we have any case studies are websites which are using these new features
 of SolrCloud ?
 Any inputs are highly appreciated.

 Thanks
 Pradeep


Re: how to change configurations in solrcloud setup

2015-03-11 Thread Shawn Heisey
On 3/11/2015 6:32 AM, Aman Tandon wrote:
 I restart my complete cluster but the problem still present. Please help.

 *Here is the screenshot url:*

 *http://i.imgur.com/QFdg89S.png

 http://i.imgur.com/tS0yTNh.png

The first screenshot actually shows the problem, but it may not be
immediately obvious.  In both cases where the shard leader is on
127.0.1.1, recovery is not able to complete.

The reason for this is extremely simple -- 127.0.1.1 is a loopback
address, not accessible remotely ... so when the machine at
192.168.6.217 tries to contact the other machine, it is only talking to
itself, and is not able to find the leader to initiate recovery.

I don't know why that machine chose to register itself in zookeeper
using a loopback address, unless perhaps the hosts file on that machine
is set up incorrectly so that the local hostname is associated with that
IP address.  If you can't fix the IP lookup problem, you can override
the value that Solr uses with the host property, which you can set on
the java commandline (-Dhost=) or in the solr.xml file.

http://wiki.apache.org/solr/SolrCloud#SolrCloud_Instance_Params

You may need to manually remove the 127.0.1.1 entries from zookeeper
after you fix the IP address problem.

Thanks,
Shawn



Re: count documents using stored fields only in Apache solr

2015-03-11 Thread Shawn Heisey
On 3/11/2015 6:17 AM, Hafiz Shafiq wrote:
 I am using solr 4.10.3. Documents are indexed using apache nutch 2.3. There
 is a field in schema.xml that is tstamp that contains informas when
 documents was indexed. This field is not indexed and stored only in solr. I
 want to count no of documents indexed by nutch in solr. It is clear that I
 have to use tstamp field. Now how I can do it?

If a field is not indexed, then you cannot do *any* searches on it.  Any
attempt to search on that field (without specifying additional valid OR
clauses) will return zero results.  You will not get an error, it will
just return nothing.

If you just need a count of the number of documents in the index, send
*:* as the query, assuming you're using lucene or edismax for the query
parser.  If you're using dismax, you need to set q.alt to *:* and either
send a blank query or leave the q parameter out entirely.  This q.alt
method also works for edismax.

Thanks,
Shawn



Re: how to change configurations in solrcloud setup

2015-03-11 Thread Aman Tandon
Hi Shawn,

As suggested i gave the -Dhost=192.168.5.236 in command line for the server
which was showing 127.0.0.1.

*./solr start -c -z 192.168.6.217:2181
http://192.168.6.217:2181,192.168.5.81:2181
http://192.168.5.81:2181,192.168.5.236:2181 http://192.168.5.236:2181
-p 4567 -Dhost=192.168.5.236 -V*

Now everything is good. Thank you so much.


You may need to manually remove the 127.0.1.1 entries from zookeeper
 after you fix the IP address problem.


How to do that?

With Regards
Aman Tandon

On Wed, Mar 11, 2015 at 8:02 PM, Shawn Heisey apa...@elyograg.org wrote:

 On 3/11/2015 6:32 AM, Aman Tandon wrote:
  I restart my complete cluster but the problem still present. Please help.
 
  *Here is the screenshot url:*
 
  *http://i.imgur.com/QFdg89S.png
 
  http://i.imgur.com/tS0yTNh.png

 The first screenshot actually shows the problem, but it may not be
 immediately obvious.  In both cases where the shard leader is on
 127.0.1.1, recovery is not able to complete.

 The reason for this is extremely simple -- 127.0.1.1 is a loopback
 address, not accessible remotely ... so when the machine at
 192.168.6.217 tries to contact the other machine, it is only talking to
 itself, and is not able to find the leader to initiate recovery.

 I don't know why that machine chose to register itself in zookeeper
 using a loopback address, unless perhaps the hosts file on that machine
 is set up incorrectly so that the local hostname is associated with that
 IP address.  If you can't fix the IP lookup problem, you can override
 the value that Solr uses with the host property, which you can set on
 the java commandline (-Dhost=) or in the solr.xml file.

 http://wiki.apache.org/solr/SolrCloud#SolrCloud_Instance_Params

 You may need to manually remove the 127.0.1.1 entries from zookeeper
 after you fix the IP address problem.

 Thanks,
 Shawn




Re: Can a single SolrServer instance update multiple collections?

2015-03-11 Thread Shawn Heisey
On 3/11/2015 4:28 PM, Shawn Heisey wrote:
 When I have some time to actually work on the code, I'm going to write
 it using 4.x classes because that's what I have immediate access to,
 but if you do 5.x, SolrServer becomes SolrClient, and HttpSolrServer
 becomes HttpSolrClient.

At the URL below is the code I came up with.  It shows how to do an add,
a commit, and a query where the Solr core (collection) is specified as
part of the request, rather than the server connection:

http://apaste.info/lRi

I did test this code successfully, although there was one difference in
that code (/update instead of /update/javabin) because my dev Solr
server is running 4.9.1, not 3.5.  The code I've shared uses SolrJ 4.x,
but is tailored to a server running 3.x with a typical 3.x config.  I
hope this code will work as-is ... and if it doesn't, that it will be
easy for you to figure out what I did wrong.

If you want to figure out how to use SolrRequest to implement a query
with a specific handler path, you could probably implement all of this
in SolrJ 3.5, where SolrQuery#setRequestHandler does not exist.  I'm
sure that if you look at the SolrQuery class and the
CommonsHttpSolrServer#query method from the 3.5 source code, you could
piece together how to do this.

It might be a good idea to abstract these procedures for add, commit,
and query into your own local methods that include the collection
parameter.  If you need it, you can also implement
UpdateRequest.ACTION.OPTIMIZE in a similar manner to the way that I used
UpdateRequest.ACTION.COMMIT.

See the following issue for the recent work that will go into a new 5.x
version (probably 5.1), which adds the capability you are seeking
directly to HttpSolrClient, implementing abstract methods from SolrClient:

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


Thanks,
Shawn