RE: SolrJ App Engine Client

2016-09-22 Thread Jay Parashar
I am on java 7. As the GAE states, the SocketChannel is not on Google's white 
list.

Stackoverflow (the 2nd link you sent) suggests to re-invent the class. I will 
see if I come up with anything. 
Thanks John.

-Original Message-
From: John Bickerstaff [mailto:j...@johnbickerstaff.com]
Sent: Thursday, September 22, 2016 2:51 PM
To: solr-user@lucene.apache.org
Subject: [Ext] Re: SolrJ App Engine Client

Two possibilities from a quick search on the error message - both point to GAE 
NOT fully supporting Java 8

https://urldefense.proofpoint.com/v2/url?u=http-3A__stackoverflow.com_questions_29528580_how-2Dto-2Ddeal-2Dwith-2Dapp-2Dengine-2Ddevserver-2Dexception-2Ddue-2Dto-2Dformatstyle-2Drestricted-2Dcl=CwIBaQ=uGuXJ43KPkPWEl2imVFDmZQlhQUET7pVRA2PDIOxgqw=bRfqJEeedEKG5nkp5748YxbNMFrUYT3YiNl0Ni2vUBQ=FjaUoU-i-tiL8deMoKceLKxX-kgXBObYvgMAjZnac8A=5lMIyl1JJEfNqZSe80DnJ4PwWt_tpBoq3l6ZjM2EQBM=
https://urldefense.proofpoint.com/v2/url?u=http-3A__stackoverflow.com_questions_29543131_beancreationexception-2Dthrowed-2Dwhen-2Dtrying-2Dto-2Drun-2Dmy-2Dproject=CwIBaQ=uGuXJ43KPkPWEl2imVFDmZQlhQUET7pVRA2PDIOxgqw=bRfqJEeedEKG5nkp5748YxbNMFrUYT3YiNl0Ni2vUBQ=FjaUoU-i-tiL8deMoKceLKxX-kgXBObYvgMAjZnac8A=EkfJOFmbVi4fwdp1mBAnpIXC1XHnT8_eN6Jsz1PvDhw=
 


On Thu, Sep 22, 2016 at 1:38 PM, Jay Parashar <bparas...@slb.com> wrote:

> I sent a similar message earlier but do not see it. Apologize if its 
> duplicated.
>
> I am unable to connect to Solr Cloud zkhost (using CloudSolrClient) 
> from a SolrJ client running on Google App Engine.
> The error message is "java.nio.channels.SocketChannel is a restricted 
> class. Please see the Google  App Engine developer's guide for more 
> details."
>
> Is there a workaround? Its required that the client is SolrJ and 
> running on App Engine.
>
> Any feedback is much appreciated. Thanks
>


Re: SolrJ App Engine Client

2016-09-22 Thread Jay Parashar
No, it does not.

The error is (instead of SocketChannel) is now

Caused by: java.lang.NoClassDefFoundError: java.net.ProxySelector is a 
restricted class

And it's during an actual query (solrClient.query(query);)


-Original Message-
From: Mikhail Khludnev [mailto:m...@apache.org]
Sent: Thursday, September 22, 2016 2:59 PM
To: solr-user <solr-user@lucene.apache.org>
Subject: [Ext] Re: SolrJ App Engine Client

Does it work with plain HttpSolrClient?

On Thu, Sep 22, 2016 at 10:50 PM, John Bickerstaff <j...@johnbickerstaff.com
> wrote:

> Two possibilities from a quick search on the error message - both 
> point to GAE NOT fully supporting Java 8
>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__stackoverflow.com_
> questions_29528580_how-2Dto-2Ddeal-2Dwith-2Dapp-2Dengine-2D=CwIBaQ
> =uGuXJ43KPkPWEl2imVFDmZQlhQUET7pVRA2PDIOxgqw=bRfqJEeedEKG5nkp5748Yxb
> NMFrUYT3YiNl0Ni2vUBQ=HDJS4ElFF2X939U2LWfIfRIdBJNLvm9q4mvpNmZp7kU=i
> 8WIpnKStYPvIRJTBTjBtqguv_nriuZMnLdBlB7pUWo=
> devserver-exception-due-to-formatstyle-restricted-cl
> https://urldefense.proofpoint.com/v2/url?u=http-3A__stackoverflow.com_
> questions_29543131_beancreationexception-2Dthrowed-2D=CwIBaQ=uGuXJ
> 43KPkPWEl2imVFDmZQlhQUET7pVRA2PDIOxgqw=bRfqJEeedEKG5nkp5748YxbNMFrUY
> T3YiNl0Ni2vUBQ=HDJS4ElFF2X939U2LWfIfRIdBJNLvm9q4mvpNmZp7kU=kGg4rdS
> 7eJoNjVzljzxek-nIUeMnjxRhjETSDJzdaXY=
> when-trying-to-run-my-project
>
>
> On Thu, Sep 22, 2016 at 1:38 PM, Jay Parashar <bparas...@slb.com> wrote:
>
> > I sent a similar message earlier but do not see it. Apologize if its 
> > duplicated.
> >
> > I am unable to connect to Solr Cloud zkhost (using CloudSolrClient) 
> > from
> a
> > SolrJ client running on Google App Engine.
> > The error message is "java.nio.channels.SocketChannel is a 
> > restricted class. Please see the Google  App Engine developer's 
> > guide for more details."
> >
> > Is there a workaround? Its required that the client is SolrJ and 
> > running on App Engine.
> >
> > Any feedback is much appreciated. Thanks
> >
>



--
Sincerely yours
Mikhail Khludnev


RE: [Ext] Re: SolrJ App Engine Client

2016-09-22 Thread Jay Parashar
I am on java 7. As the GAE states, the SocketChannel is not on Google's white 
list.

Stackoverflow (the 2nd link you sent) suggests to re-invent the class. I will 
see if I come up with anything. 
Thanks John.

-Original Message-
From: John Bickerstaff [mailto:j...@johnbickerstaff.com] 
Sent: Thursday, September 22, 2016 2:51 PM
To: solr-user@lucene.apache.org
Subject: [Ext] Re: SolrJ App Engine Client

Two possibilities from a quick search on the error message - both point to GAE 
NOT fully supporting Java 8

https://urldefense.proofpoint.com/v2/url?u=http-3A__stackoverflow.com_questions_29528580_how-2Dto-2Ddeal-2Dwith-2Dapp-2Dengine-2Ddevserver-2Dexception-2Ddue-2Dto-2Dformatstyle-2Drestricted-2Dcl=CwIBaQ=uGuXJ43KPkPWEl2imVFDmZQlhQUET7pVRA2PDIOxgqw=bRfqJEeedEKG5nkp5748YxbNMFrUYT3YiNl0Ni2vUBQ=FjaUoU-i-tiL8deMoKceLKxX-kgXBObYvgMAjZnac8A=5lMIyl1JJEfNqZSe80DnJ4PwWt_tpBoq3l6ZjM2EQBM=
https://urldefense.proofpoint.com/v2/url?u=http-3A__stackoverflow.com_questions_29543131_beancreationexception-2Dthrowed-2Dwhen-2Dtrying-2Dto-2Drun-2Dmy-2Dproject=CwIBaQ=uGuXJ43KPkPWEl2imVFDmZQlhQUET7pVRA2PDIOxgqw=bRfqJEeedEKG5nkp5748YxbNMFrUYT3YiNl0Ni2vUBQ=FjaUoU-i-tiL8deMoKceLKxX-kgXBObYvgMAjZnac8A=EkfJOFmbVi4fwdp1mBAnpIXC1XHnT8_eN6Jsz1PvDhw=
 


On Thu, Sep 22, 2016 at 1:38 PM, Jay Parashar <bparas...@slb.com> wrote:

> I sent a similar message earlier but do not see it. Apologize if its
> duplicated.
>
> I am unable to connect to Solr Cloud zkhost (using CloudSolrClient) from a
> SolrJ client running on Google App Engine.
> The error message is "java.nio.channels.SocketChannel is a restricted
> class. Please see the Google  App Engine developer's guide for more
> details."
>
> Is there a workaround? Its required that the client is SolrJ and running
> on App Engine.
>
> Any feedback is much appreciated. Thanks
>


RE: [Ext] Re: SolrJ App Engine Client

2016-09-22 Thread Jay Parashar
No, it does not.

The error is (instead of SocketChannel) is now

Caused by: java.lang.NoClassDefFoundError: java.net.ProxySelector is a 
restricted class

And it's during an actual query (solrClient.query(query);)


-Original Message-
From: Mikhail Khludnev [mailto:m...@apache.org] 
Sent: Thursday, September 22, 2016 2:59 PM
To: solr-user <solr-user@lucene.apache.org>
Subject: [Ext] Re: SolrJ App Engine Client

Does it work with plain HttpSolrClient?

On Thu, Sep 22, 2016 at 10:50 PM, John Bickerstaff <j...@johnbickerstaff.com
> wrote:

> Two possibilities from a quick search on the error message - both 
> point to GAE NOT fully supporting Java 8
>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__stackoverflow.com_
> questions_29528580_how-2Dto-2Ddeal-2Dwith-2Dapp-2Dengine-2D=CwIBaQ
> =uGuXJ43KPkPWEl2imVFDmZQlhQUET7pVRA2PDIOxgqw=bRfqJEeedEKG5nkp5748Yxb
> NMFrUYT3YiNl0Ni2vUBQ=HDJS4ElFF2X939U2LWfIfRIdBJNLvm9q4mvpNmZp7kU=i
> 8WIpnKStYPvIRJTBTjBtqguv_nriuZMnLdBlB7pUWo=
> devserver-exception-due-to-formatstyle-restricted-cl
> https://urldefense.proofpoint.com/v2/url?u=http-3A__stackoverflow.com_
> questions_29543131_beancreationexception-2Dthrowed-2D=CwIBaQ=uGuXJ
> 43KPkPWEl2imVFDmZQlhQUET7pVRA2PDIOxgqw=bRfqJEeedEKG5nkp5748YxbNMFrUY
> T3YiNl0Ni2vUBQ=HDJS4ElFF2X939U2LWfIfRIdBJNLvm9q4mvpNmZp7kU=kGg4rdS
> 7eJoNjVzljzxek-nIUeMnjxRhjETSDJzdaXY=
> when-trying-to-run-my-project
>
>
> On Thu, Sep 22, 2016 at 1:38 PM, Jay Parashar <bparas...@slb.com> wrote:
>
> > I sent a similar message earlier but do not see it. Apologize if its 
> > duplicated.
> >
> > I am unable to connect to Solr Cloud zkhost (using CloudSolrClient) 
> > from
> a
> > SolrJ client running on Google App Engine.
> > The error message is "java.nio.channels.SocketChannel is a 
> > restricted class. Please see the Google  App Engine developer's 
> > guide for more details."
> >
> > Is there a workaround? Its required that the client is SolrJ and 
> > running on App Engine.
> >
> > Any feedback is much appreciated. Thanks
> >
>



--
Sincerely yours
Mikhail Khludnev


SolrJ App Engine Client

2016-09-22 Thread Jay Parashar
I sent a similar message earlier but do not see it. Apologize if its duplicated.

I am unable to connect to Solr Cloud zkhost (using CloudSolrClient) from a 
SolrJ client running on Google App Engine.
The error message is "java.nio.channels.SocketChannel is a restricted class. 
Please see the Google  App Engine developer's guide for more details."

Is there a workaround? Its required that the client is SolrJ and running on App 
Engine.

Any feedback is much appreciated. Thanks


Solr on GCE

2016-09-22 Thread Jay Parashar
Hi,

Is it possible to have SolrJ client running on Google App Engine to talk to a 
Solr instance hosted on a compute engine? The solr version is 6.2.0

There is also a similar question on Stack Overflow but no answers
http://stackoverflow.com/questions/37390072/httpsolrclient-on-google-app-engine


I am getting the following error

at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1003) 
~[zookeeper-3.4.6.jar:3.4.6-1569965]
[INFO] 09:46:56.419 [main-SendThread(nlxs5139.best-nl0114.slb.com:2181)] INFO  
org.apache.zookeeper.ClientCnxn - Opening socket connection to server 
nlxs5139.best-nl0114.slb.com/199.6.212.77:2181. Will not attempt to 
authenticate using SASL (unknown error)
[INFO] 09:46:56.419 [main-SendThread(nlxs5139.best-nl0114.slb.com:2181)] WARN  
org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected 
error, closing socket connection and attempting reconnect
[INFO] java.lang.NoClassDefFoundError: java.nio.channels.SocketChannel is a 
restricted class. Please see the Google  App Engine developer's guide for more 
details.
[INFO]  at 
com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:52)
 ~[appengine-agentruntime.jar:na]


Thanks
Jay


RE: [Ext] Influence ranking based on document committed date

2016-08-17 Thread Jay Parashar
This is correct: " I index it and feed it the timestamp at index time".
You can sort desc on that field (can be a TrieDateField)


-Original Message-
From: Steven White [mailto:swhite4...@gmail.com] 
Sent: Wednesday, August 17, 2016 9:01 AM
To: solr-user@lucene.apache.org
Subject: [Ext] Influence ranking based on document committed date

Hi everyone

Let's say I search for the word "Olympic" and I get a hit on 10 documents that 
have similar content (let us assume the content is at least 80%
identical) how can I have Solr rank them so that the ones with most recently 
updated doc gets ranked higher?  Is this something I have to do at index time 
or search time?

Is the trick to have a field that holds the committed timestamp and boost on 
that field during search?  If so, is this field something I can configure in 
Solr's schema.xml or must I index it and feed it the timestamp at index time?  
If I'm on the right track, does this mean I have to always append this field 
base boost to each query a user issues?

If there is a wiki or article written on this topic, that would be a good start.

In case it matters, I'm using Solr 5.2 and my searches are utilizing edismax.

Thanks in advanced!

Steve


RE: Solr Support for BM25F

2016-04-14 Thread Jay Parashar
To use per-field similarity you have to add  to your schema.xml file:
And then in individual fields you can use the BM25 with different k1 and b.

-Original Message-
From: David Cawley [mailto:david.cawl...@mail.dcu.ie] 
Sent: Thursday, April 14, 2016 11:42 AM
To: solr-user@lucene.apache.org
Subject: Solr Support for BM25F

Hello,
I am developing an enterprise search engine for a project and I was hoping to 
implement BM25F ranking algorithm to configure the tuning parameters on a per 
field basis. I understand BM25 similarity is now supported in Solr but I was 
hoping to be able to configure k1 and b for different fields such as title, 
description, anchor etc, as they are structured documents.
I am fairly new to Solr so any help would be appreciated. If this is possible 
or any steps as to how I can go about implementing this it would be greatly 
appreciated.

Regards,

David

Current Solr Version 5.4.1


RE: Multiple data-config.xml in one collection?

2016-04-14 Thread Jay Parashar
Thanks a lot Daniel.


-Original Message-
From: Davis, Daniel (NIH/NLM) [C] [mailto:daniel.da...@nih.gov] 
Sent: Thursday, April 14, 2016 11:41 AM
To: solr-user@lucene.apache.org
Subject: RE: Multiple data-config.xml in one collection?

Jay Parashar wrote:
> One thing, and please correct if wrong, I have noticed running 
> DataImport for a particular config overwrites the existing data  for a 
> document...that is, there is no way to preserve the existing data.
> 
> For example if you have a schema of 5 fields and running the 
> health-topics-conf.xml DIH  loads 3 of those fields of a document 
> (id=XYZ) And then running the encyclopedia-conf.xml DIH will overwrite those 
> 3 fields for the same  document id = XYZ.

Not quite so.   You're right that each RequestHandler has a *default* data 
config, 
specified in solrconfig.xml.   As most things Solr, this can be overridden.   
But it is still a 
good best practice.   You are right that if one DataImport imports the same ID 
as another, 
it will overwrite the older copy completely.   However, you can control the 
overlap so that
indexing is independent even into the same collection.

Suppose you have two configured request handlers:

/dataimport/healthtopics - this uses health-topics-conf.xml
/dataimport/encyclopedia - this uses encyclopedia-conf.xml

These two files can load *completely separate records* with different ids, and 
they can 
have different delete queries configured.   An excerpt from my 
health-topics-conf.xml:





   




  
  
  

  

Hope this helps,

Dan Davis, Systems/Applications Architect (Contractor), Office of Computer and 
Communications Systems, National Library of Medicine, NIH



-Original Message-
From: Jay Parashar [mailto:bparas...@slb.com]
Sent: Thursday, April 14, 2016 11:43 AM
To: solr-user@lucene.apache.org
Subject: RE: Multiple data-config.xml in one collection?

You have to specify which one to run. Each DIH will run only one XML (e.g. 
health-topics-conf.xml)


-Original Message-
From: Yangrui Guo [mailto:guoyang...@gmail.com]
Sent: Tuesday, April 05, 2016 2:16 PM
To: solr-user@lucene.apache.org
Subject: Re: Multiple data-config.xml in one collection?

Hi Daniel,

So if I implement multiple dataimporthandler and do a full import, does Solr 
perform import of all handlers at once or can just specify which handler to 
import? Thank you

Yangrui

On Tuesday, April 5, 2016, Davis, Daniel (NIH/NLM) [C] <daniel.da...@nih.gov>
wrote:

> If Shawn is correct, and you are using DIH, then I have done this by 
> implementing multiple requestHandlers each of them using Data Import 
> Handler, and have each specify a different XML file for the data config.
> Instead of using data-config.xml, I've used a large number of files such as:
> health-topics-conf.xml
> encyclopedia-conf.xml
> ...
> I tend to index a single valued, required field named "source" that I 
> can use in the delete query, and I use the TemplateTranformer to make this 
> easy:
>
>  ...
>transformer="TemplateTransformer">
>
>...
>
> Hope this helps,
>
> -Dan
>
> -Original Message-
> From: Shawn Heisey [mailto:apa...@elyograg.org <javascript:;>]
> Sent: Tuesday, April 05, 2016 10:50 AM
> To: solr-user@lucene.apache.org <javascript:;>
> Subject: Re: Multiple data-config.xml in one collection?
>
> On 4/5/2016 8:12 AM, Yangrui Guo wrote:
> > I'm using Solr Cloud to index a number of databases. The problem is 
> > there is unknown number of databases and each database has its own
> configuration.
> > If I create a single collection for every database the query would 
> > eventually become insanely long. Is it possible to upload different 
> > config to zookeeper for each node in a single collection?
>
> Every shard replica (core) in a collection shares the same 
> configuration, which it gets from zookeeper.  This is one of 
> SolrCloud's guarantees, to prevent problems found with old-style 
> sharding when the configuration is different on each machine.
>
> If you're using the dataimport handler, which you probably are since 
> you mentioned databases, you can parameterize pretty much everything 
> in the DIH config file so it comes from URL parameters on the 
> full-import or delta-import command.
>
> Below is a link to the DIH config that I'm using, redacted slightly.
> I'm not running SolrCloud, but the same thing should work in cloud.  
> It should give you some idea of how to use variables in your config, 
> set by parameters on the URL.
>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__apaste.info_jtq=
> CwIBaQ=uGuXJ43KPkPWEl2imVFDmZQlhQUET7pVRA2PDIOxgqw=bRfqJEeedEKG5nk
> p5748YxbNMFrUYT3YiNl0Ni2vUBQ=ps8KnPZhgym3oVyuWub8JT0eZI39W0FLsBW4fx5
> 61NY=k7H8l9XT7yyH_KHFtnIi793EtkLZnUvOz3lZA1mV01s=
>
> Thanks,
> Shawn
>
>


RE: Multiple data-config.xml in one collection?

2016-04-14 Thread Jay Parashar
You have to specify which one to run. Each DIH will run only one XML (e.g. 
health-topics-conf.xml)

One thing, and please correct if wrong, I have noticed running DataImport for a 
particular config overwrites the existing data  for a document...that is, there 
is no way to preserve the existing data.
For example if you have a schema of 5 fields and running the 
health-topics-conf.xml  DIH  loads 3 of those fields of a document (id=XYZ)
And then running the encyclopedia-conf.xml DIH will overwrite those 3 fields 
for the same  document id = XYZ.

-Original Message-
From: Yangrui Guo [mailto:guoyang...@gmail.com] 
Sent: Tuesday, April 05, 2016 2:16 PM
To: solr-user@lucene.apache.org
Subject: Re: Multiple data-config.xml in one collection?

Hi Daniel,

So if I implement multiple dataimporthandler and do a full import, does Solr 
perform import of all handlers at once or can just specify which handler to 
import? Thank you

Yangrui

On Tuesday, April 5, 2016, Davis, Daniel (NIH/NLM) [C] 
wrote:

> If Shawn is correct, and you are using DIH, then I have done this by 
> implementing multiple requestHandlers each of them using Data Import 
> Handler, and have each specify a different XML file for the data config.
> Instead of using data-config.xml, I've used a large number of files such as:
> health-topics-conf.xml
> encyclopedia-conf.xml
> ...
> I tend to index a single valued, required field named "source" that I 
> can use in the delete query, and I use the TemplateTranformer to make this 
> easy:
>
>  ...
>transformer="TemplateTransformer">
>
>...
>
> Hope this helps,
>
> -Dan
>
> -Original Message-
> From: Shawn Heisey [mailto:apa...@elyograg.org ]
> Sent: Tuesday, April 05, 2016 10:50 AM
> To: solr-user@lucene.apache.org 
> Subject: Re: Multiple data-config.xml in one collection?
>
> On 4/5/2016 8:12 AM, Yangrui Guo wrote:
> > I'm using Solr Cloud to index a number of databases. The problem is 
> > there is unknown number of databases and each database has its own
> configuration.
> > If I create a single collection for every database the query would 
> > eventually become insanely long. Is it possible to upload different 
> > config to zookeeper for each node in a single collection?
>
> Every shard replica (core) in a collection shares the same 
> configuration, which it gets from zookeeper.  This is one of 
> SolrCloud's guarantees, to prevent problems found with old-style 
> sharding when the configuration is different on each machine.
>
> If you're using the dataimport handler, which you probably are since 
> you mentioned databases, you can parameterize pretty much everything 
> in the DIH config file so it comes from URL parameters on the 
> full-import or delta-import command.
>
> Below is a link to the DIH config that I'm using, redacted slightly.
> I'm not running SolrCloud, but the same thing should work in cloud.  
> It should give you some idea of how to use variables in your config, 
> set by parameters on the URL.
>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__apaste.info_jtq=
> CwIBaQ=uGuXJ43KPkPWEl2imVFDmZQlhQUET7pVRA2PDIOxgqw=bRfqJEeedEKG5nk
> p5748YxbNMFrUYT3YiNl0Ni2vUBQ=ps8KnPZhgym3oVyuWub8JT0eZI39W0FLsBW4fx5
> 61NY=k7H8l9XT7yyH_KHFtnIi793EtkLZnUvOz3lZA1mV01s=
>
> Thanks,
> Shawn
>
>


RE: Indexing multiple pdf's and partial update of pdf

2016-03-24 Thread Jay Parashar


Thanks Reth,



Yes I am using Apache Tike and went by the instructions given in

https://cwiki.apache.org/confluence/display/solr/Uploading+Data+with+Solr+Cell+using+Apache+Tika



Here I see we can index a pdf " solr-word.pdf" to a document with unique key = 
"doc1" as below



curl 
'http://localhost:8983/solr/techproducts/update/extract?literal.id=doc1=true'
 -F 
"myfile=@example/exampledocs/solr-word.pdf<mailto:myfile=@example/exampledocs/solr-word.pdf>"



My requirement is to index another separate pdf to this document with key = 
doc1. Basically I need the contents of both pdfs to be searchable and related 
to the id=doc1.



What comes to my mind is to perform an 'extractOnly' as below on both pdf's and 
then index the concatenation of the contents. Is there another less invasive 
way?



curl "http://localhost:8983/solr/techproducts/update/extract?=true; 
--data-binary @example/exampledocs/sample.html -H 'Content-type:text/html'



Thanks

Jay



-Original Message-
From: Reth RM [mailto:reth.ik...@gmail.com]
Sent: Thursday, March 24, 2016 12:24 AM
To: solr-user@lucene.apache.org
Subject: Re: Indexing multiple pdf's and partial update of pdf



Are you using apache tika parser to parse pdf files?



1) Solr support parent-child block join using which you can index more than one 
file data within document object(if that is what you are looking for) 
https://urldefense.proofpoint.com/v2/url?u=https-3A__cwiki.apache.org_confluence_display_solr_Other-2BParsers-23OtherParsers-2DBlockJoinQueryParsers=CwIFaQ=uGuXJ43KPkPWEl2imVFDmZQlhQUET7pVRA2PDIOxgqw=bRfqJEeedEKG5nkp5748YxbNMFrUYT3YiNl0Ni2vUBQ=mjl8EQIh28bi_at9AocrELmHdF6oGMDz4_-rPAaBWrI=83RBCYuuwc7iI4KAzkPMsyNThtsMqr9Bp9QOk1lr_fU=



2) If the unique key of the document that exists in index is equal to new 
document that you are reindexing, it will be overwritten. If you'd like to do 
partial updates via curl, here are some examples listed :

https://urldefense.proofpoint.com/v2/url?u=http-3A__yonik.com_solr_atomic-2Dupdates_=CwIFaQ=uGuXJ43KPkPWEl2imVFDmZQlhQUET7pVRA2PDIOxgqw=bRfqJEeedEKG5nkp5748YxbNMFrUYT3YiNl0Ni2vUBQ=mjl8EQIh28bi_at9AocrELmHdF6oGMDz4_-rPAaBWrI=RnLUMlzU69Qr6D2NPbCH9wig6JLekcfwfGu9kC9l9DA=











On Thu, Mar 24, 2016 at 3:43 AM, Jay Parashar 
<bparas...@slb.com<mailto:bparas...@slb.com>> wrote:



> Hi,

>

> I have couple of questions regarding indexing files (say pdf).

>

> 1)  Is there any way to index more than one file to one document with

> a unique id?

>

> One way I think is to do a “extractOnly” of all the documents and then

> index that extract separately. Is there an easier way?

>

> 2)  If my Solr document has existing fields populated and then I index

> a pdf, it seems it overwrites the document with the end result being

> just the contents of the pdf. I know we can do partial updates using

> SolrJ but is it possible to do partial updates of pdf using curl?

>

>

> Thanks

> Jay

>


Indexing multiple pdf's and partial update of pdf

2016-03-23 Thread Jay Parashar
Hi,

I have couple of questions regarding indexing files (say pdf).

1)  Is there any way to index more than one file to one document with a 
unique id?

One way I think is to do a “extractOnly” of all the documents and then index 
that extract separately. Is there an easier way?

2)  If my Solr document has existing fields populated and then I index a 
pdf, it seems it overwrites the document with the end result being just the 
contents of the pdf. I know we can do partial updates using SolrJ but is it 
possible to do partial updates of pdf using curl?


Thanks
Jay


RE: Is Solr Cloud will be helpful in case of Load balancing

2013-02-01 Thread Jay Parashar
Do you just have one instance of Solr then? Because with Solr Cloud,
replication is automatic and the zk will handle which node (leader) the data
is retrieved from.
For Load Balancing, Solr Cloud has a basic Round Robin LB Server which is
wrapped by the CloudSolrServer. So if you use the CloudSolrServer, you will
get some basic OOB load balancing.

-Original Message-
From: dharmendra jaiswal [mailto:dharmendra.jais...@gmail.com] 
Sent: Friday, February 01, 2013 4:35 AM
To: solr-user@lucene.apache.org
Subject: Is Solr Cloud will be helpful in case of Load balancing

Hello,

I am using multi-core mechnism with Solr. And each core is dedicated to a
particular client.

Like If we search data from SiteA, it will provide search result from CoreA
And if we search data from SiteB, it will provide search result from CoreB

and similar case with other client.

We have created N number of core on Single node of Solr server.
My query is that does solr cloud will be helpful in case of load balancing.
As in my case all request for different-different client came to single node
of server.
Any pointer and link will be helpfull.
Note: I am Using Windows machine for deplyment of Solr.

Thanks,
Dharmendra jaiswal



Sor Cloud Autosuggest not working

2013-01-08 Thread Jay Parashar
I recently migrated to Solr Cloud (4.0.0 from 3.6.0) and my auto suggest
feature does not seem to be working. It is a typical implementation with a
/suggest searchHandler defined on the config.
Are there any changes I need to incorporate?

Regards
Jay



RE: Sor Cloud Autosuggest not working

2013-01-08 Thread Jay Parashar
Thanks Mark!

-Original Message-
From: Mark Miller [mailto:markrmil...@gmail.com] 
Sent: Tuesday, January 08, 2013 10:16 AM
To: solr-user@lucene.apache.org
Subject: Re: Sor Cloud Autosuggest not working

I think distrib with components has to be setup a little differently - you
might need to use shards.qt to point back to the same request handler for
the sub searches. Just a guess - been a while since I've looked at
spellcheck distrib support and I'm not 100% positive the suggest stuff is
all distrib capable - though I think it should be.

- Mark

On Jan 8, 2013, at 10:06 AM, Jay Parashar jparas...@itscape.com wrote:

 I recently migrated to Solr Cloud (4.0.0 from 3.6.0) and my auto 
 suggest feature does not seem to be working. It is a typical 
 implementation with a /suggest searchHandler defined on the config.
 Are there any changes I need to incorporate?
 
 Regards
 Jay
 



RE: Max number of core in Solr multi-core

2013-01-07 Thread Jay Parashar
This is the exact approach we use in our multithreaded env. One server per
core. I think this is the recommended approach.

-Original Message-
From: Parvin Gasimzade [mailto:parvin.gasimz...@gmail.com] 
Sent: Monday, January 07, 2013 7:00 AM
To: solr-user@lucene.apache.org
Subject: Re: Max number of core in Solr multi-core

I know that but my question is different. Let me ask it in this way.

I have a solr with base url localhost:8998/solr and two solr core as
localhost:8998/solr/core1 and localhost:8998/solr/core2.

I have one baseSolr instance initialized as :
SolrServer server = new HttpSolrServer( url );

I have also create SolrServer's for each core as :
SolrServer core1 = new HttpSolrServer( url + /core1 ); SolrServer core2 =
new HttpSolrServer( url + /core2 );

Since there are many cores, I have to initialize SolrServer as shown above.
Is there a way to create only one SolrServer with the base url and access
each core using it? If it is possible, then I don't need to create new
SolrServer for each core.

On Mon, Jan 7, 2013 at 2:39 PM, Erick Erickson
erickerick...@gmail.comwrote:

 This might help:
 https://wiki.apache.org/solr/Solrj#HttpSolrServer

 Note that the associated SolrRequest takes the path, I presume 
 relative to the base URL you initialized the HttpSolrServer with.

 Best
 Erick


 On Mon, Jan 7, 2013 at 7:02 AM, Parvin Gasimzade  
 parvin.gasimz...@gmail.com
  wrote:

  Thank you for your responses. I have one more question related to 
  Solr multi-core.
  By using SolrJ I create new core for each application. When user 
  wants to add data or make query on his application, I create new 
  HttpSolrServer
 for
  this core. In this scenario there will be many running 
  HttpSolrServer instances.
 
  Is there a better solution? Does it cause a problem to run many 
  instances at the same time?
 
  On Wed, Jan 2, 2013 at 5:35 PM, Per Steffensen st...@designware.dk
  wrote:
 
   g a collection per application instead of a core
 




No live SolrServers Solr 4 exceptions on trying to create a collection

2013-01-07 Thread Jay Parashar
Any clue to why this is happening will be greatly appreciated. This has become 
a blocker for me.
I can use the HTTPSolrServer to create a core/make requests etc, but then it 
behaves like Solr 3.6
http://host:port/solr/admin/cores and not 
http://host:port/solr/admin/collections

With my setup (4 servers running at localhost 8983, 8900, 7574 and 7500) when I 
manually do a 
http://127.0.0.1:7500/solr/admin/cores?action=CREATEname=myColl1instanceDir=defaultdataDir=myColl1Datacollection=myColl1numShards=2
it creates the collection only at the 7500 server. This is similar to when I 
use HttpSolrServer (Solr 3.6 behavior).

And of course when I initiate a 
http://127.0.0.1:7500/solr/admin/collections?action=CREATEname=myColl2instanceDir=defaultdataDir=myColl2Datacollection=myColl2numShards=2
as expected it creates the collection spread on 2 servers. I am failing to 
achieve the same with SolrJ. As in the code at the bottom of the mail, I use 
CloudSolrServer and get the No live SolrServers exception.

Any help or direction will of how to create collections (using the collections 
API) using SolrJ will be highly appreciated.

Regards
Jay


-Original Message-
From: Jay Parashar [mailto:jparas...@itscape.com] 
Sent: Sunday, January 06, 2013 7:42 PM
To: solr-user@lucene.apache.org
Subject: RE: Solr 4 exceptions on trying to create a collection

The exception No live SolrServers is being thrown when trying to create a new 
Collection ( code at end of this mail). On the CloudSolrServer request method, 
we have this line ClientUtils.appendMap(coll, slices, 
clusterState.getSlices(coll)); where coll is the new collection I am trying 
to create and hence clusterState.getSlices(coll)); is returning null.
And then the loop of the slices which adds to the urlList never happens and 
hence the LBHttpSolrServer created in the CloudSolrServer has a null url list 
in the constructor.
This is giving the No live SolrServers exception.

What I am missing?

Instead of passing the CloudSolrServer to the create.process, if I pass the 
LBHttpSolrServer  (server.getLbServer()), the collection gets created but only 
on one server.

My code to create a new Cloud Server and new Collection:-

String[] urls = 
{http://127.0.0.1:8983/solr/,http://127.0.0.1:8900/solr/,http://127.0.0.1:7500/solr/,http://127.0.0.1:7574/solr/};
CloudSolrServer server = new CloudSolrServer(127.0.0.1:2181, new 
LBHttpSolrServer(urls)); 
server.getLbServer().getHttpClient().getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT,
 5000); 
server.getLbServer().getHttpClient().getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT,
 2); server.setDefaultCollection(collectionName);
server.connect();
CoreAdminRequest.Create create = new CoreAdminRequest.Create(); 
create.setCoreName(myColl); create.setCollection(myColl); 
create.setInstanceDir(defaultDir);
create.setDataDir(myCollData);
create.setNumShards(2);
create.process(server); //Exception No live SolrServers  is thrown here


Thanks
Jay


-Original Message-
From: Alexandre Rafalovitch [mailto:arafa...@gmail.com]
Sent: Friday, January 04, 2013 6:08 PM
To: solr-user@lucene.apache.org
Subject: Re: Solr 4 exceptions on trying to create a collection

Tried Wireshark yet to see what host/port it is trying to connect and why it 
fails? It is a complex tool, but well worth learning.

Regards,
  Alex.

Personal blog: http://blog.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all at once. 
Lately, it doesn't seem to be working.  (Anonymous  - via GTD book)


On Fri, Jan 4, 2013 at 6:58 PM, Jay Parashar jparas...@itscape.com wrote:

 Thanks! I had a different version of httpclient in the classpath. So 
 the 2nd exception is gone but now I am  back to the first one 
 org.apache.solr.client.solrj.SolrServerException: No live SolrServers 
 available to handle this request

 -Original Message-
 From: Alexandre Rafalovitch [mailto:arafa...@gmail.com]
 Sent: Friday, January 04, 2013 4:21 PM
 To: solr-user@lucene.apache.org
 Subject: Re: Solr 4 exceptions on trying to create a collection

 For the second one:

 Wrong version of library on a classpath or multiple versions of 
 library on the classpath which causes wrong classes with missing 
 fields/variables? Or library interface baked in and the implementation 
 is newer. Some sort of mismatch basically. Most probably in Apache http 
 library.

 Regards,
Alex.

 Personal blog: http://blog.outerthoughts.com/
 LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
 - Time is the quality of nature that keeps events from happening all 
 at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD
 book)


 On Fri, Jan 4, 2013 at 4:34 PM, Jay Parashar jparas...@itscape.com
 wrote:

 
  Hi All,
 
  I am getting exceptions on trying to create a collection. Any help 
  is appreciated.
 
  While trying to create a collection, I got

RE: No live SolrServers Solr 4 exceptions on trying to create a collection

2013-01-07 Thread Jay Parashar
Hi Rafat,

The following are scripts started in the same order (external zk, 1 instance 
running at localhost:2181). I also tried with the embedded zk with the same 
result

#Start of Server 1
export SOLR_HOME=/home/apache-solr-4.0.0
cd shard1A
java \
 -Djetty.port=8983 \
 -Djetty.home=$SOLR_HOME/example/ \
 -Dsolr.solr.home=multicore \
 -Dbootstrap_confdir=./multicore/defaultCore/conf \
 -Dcollection.configName=defaultConfig \
 -DzkHost=localhost:2181 \
 -DnumShards=2 \
 -jar $SOLR_HOME/example/start.jar

#Start of Server 2
export SOLR_HOME=/home/apache-solr-4.0.0
cd shard2A
java \
 -Djetty.port=8900 \
 -Djetty.home=$SOLR_HOME/example/ \
 -Dsolr.solr.home=multicore \
 -DzkHost=localhost:2181 \
 -jar $SOLR_HOME/example/start.jar

#Start of Server 3
export SOLR_HOME=/home/apache-solr-4.0.0
cd shard1B
java \
 -Djetty.port=7574 \
 -Djetty.home=$SOLR_HOME/example/ \
 -Dsolr.solr.home=multicore \
 -DzkHost=localhost:2181 \
 -jar $SOLR_HOME/example/start.jar

#Start of Server 4
export SOLR_HOME=/home/apache-solr-4.0.0
cd shard2B
java \
 -Djetty.port=7500 \
 -Djetty.home=$SOLR_HOME/example/ \
 -Dsolr.solr.home=multicore \
 -DzkHost=localhost:2181 \
 -jar $SOLR_HOME/example/start.jar

Regards
Jay

-Original Message-
From: Rafał Kuć [mailto:r@solr.pl] 
Sent: Monday, January 07, 2013 11:44 AM
To: solr-user@lucene.apache.org
Subject: Re: No live SolrServers Solr 4 exceptions on trying to create a 
collection

Hello!

Can you share the command you use to start all four Solr servers ?

-- 
Regards,
 Rafał Kuć
 Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch

 Any clue to why this is happening will be greatly appreciated. This has 
 become a blocker for me.
 I can use the HTTPSolrServer to create a core/make requests etc, but then it 
 behaves like Solr 3.6
 http://host:port/solr/admin/cores and not
 http://host:port/solr/admin/collections

 With my setup (4 servers running at localhost 8983, 8900, 7574 and 7500) when 
 I manually do a
 http://127.0.0.1:7500/solr/admin/cores?action=CREATEname=myColl1instanceDir=defaultdataDir=myColl1Datacollection=myColl1numShards=2
 it creates the collection only at the 7500 server. This is similar
 to when I use HttpSolrServer (Solr 3.6 behavior).

 And of course when I initiate a 
 http://127.0.0.1:7500/solr/admin/collections?action=CREATEname=myColl2instanceDir=defaultdataDir=myColl2Datacollection=myColl2numShards=2
 as expected it creates the collection spread on 2 servers. I am
 failing to achieve the same with SolrJ. As in the code at the bottom
 of the mail, I use CloudSolrServer and get the No live SolrServers exception.

 Any help or direction will of how to create collections (using the
 collections API) using SolrJ will be highly appreciated.

 Regards
 Jay


 -Original Message-
 From: Jay Parashar [mailto:jparas...@itscape.com] 
 Sent: Sunday, January 06, 2013 7:42 PM
 To: solr-user@lucene.apache.org
 Subject: RE: Solr 4 exceptions on trying to create a collection

 The exception No live SolrServers is being thrown when trying to
 create a new Collection ( code at end of this mail). On the
 CloudSolrServer request method, we have this line
 ClientUtils.appendMap(coll, slices, clusterState.getSlices(coll));
 where coll is the new collection I am trying to create and hence
 clusterState.getSlices(coll)); is returning null.
 And then the loop of the slices which adds to the urlList never
 happens and hence the LBHttpSolrServer created in the
 CloudSolrServer has a null url list in the constructor.
 This is giving the No live SolrServers exception.

 What I am missing?

 Instead of passing the CloudSolrServer to the create.process, if I
 pass the LBHttpSolrServer  (server.getLbServer()), the collection
 gets created but only on one server.

 My code to create a new Cloud Server and new Collection:-

 String[] urls =
 {http://127.0.0.1:8983/solr/,http://127.0.0.1:8900/solr/,http://127.0.0.1:7500/solr/,http://127.0.0.1:7574/solr/};
 CloudSolrServer server = new CloudSolrServer(127.0.0.1:2181, new
 LBHttpSolrServer(urls));
 server.getLbServer().getHttpClient().getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT,
 5000);
 server.getLbServer().getHttpClient().getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT,
 2); server.setDefaultCollection(collectionName);
 server.connect();
 CoreAdminRequest.Create create = new CoreAdminRequest.Create();
 create.setCoreName(myColl); create.setCollection(myColl);
 create.setInstanceDir(defaultDir);
 create.setDataDir(myCollData);
 create.setNumShards(2);
 create.process(server); //Exception No live SolrServers  is thrown here


 Thanks
 Jay


 -Original Message-
 From: Alexandre Rafalovitch [mailto:arafa...@gmail.com]
 Sent: Friday, January 04, 2013 6:08 PM
 To: solr-user@lucene.apache.org
 Subject: Re: Solr 4 exceptions on trying to create

RE: No live SolrServers Solr 4 exceptions on trying to create a collection

2013-01-07 Thread Jay Parashar
Right Mark,

I am accessing the Collections API using Solrj. This is where I am stuck. If
I just use the Collections API using http thru the browser, the behavior is
as expected. Is there an example of using the Collections API using SolrJ?
My code looks like

String[] urls =
{http://127.0.0.1:8983/solr/,http://127.0.0.1:8900/solr/,http://127.0.0
.1:7500/solr/,http://127.0.0.1:7574/solr/};
CloudSolrServer server = new CloudSolrServer(127.0.0.1:2181, new
LBHttpSolrServer(urls));
server.getLbServer().getHttpClient().getParams().setParameter(CoreConnection
PNames.CONNECTION_TIMEOUT, 5000);
server.getLbServer().getHttpClient().getParams().setParameter(CoreConnection
PNames.SO_TIMEOUT, 2); server.setDefaultCollection(collectionName);
server.connect();
CoreAdminRequest.Create create = new CoreAdminRequest.Create();
create.setCoreName(myColl); create.setCollection(myColl);
create.setInstanceDir(defaultDir);
create.setDataDir(myCollData);
create.setNumShards(2);
create.process(server); //Exception No live SolrServers  is thrown here

Regards
Jay

-Original Message-
From: Mark Miller [mailto:markrmil...@gmail.com] 
Sent: Monday, January 07, 2013 11:57 AM
To: solr-user@lucene.apache.org
Subject: Re: No live SolrServers Solr 4 exceptions on trying to create a
collection


On Jan 7, 2013, at 12:33 PM, Jay Parashar jparas...@itscape.com wrote:

 With my setup (4 servers running at localhost 8983, 8900, 7574 and 7500)
when I manually do a 

http://127.0.0.1:7500/solr/admin/cores?action=CREATEname=myColl1instanceDi
r=defaultdataDir=myColl1Datacollection=myColl1numShards=2
 it creates the collection only at the 7500 server. This is similar to when
I use HttpSolrServer (Solr 3.6 behavior).

This only starts one core. If you want to use the CoreAdmin API you would
need to make four calls, one to each server.

If you want this done for you, you must use the Collections API - see the
wiki:
http://wiki.apache.org/solr/SolrCloud#Managing_collections_via_the_Collectio
ns_API

- Mark



RE: No live SolrServers Solr 4 exceptions on trying to create a collection

2013-01-07 Thread Jay Parashar
Thanks Mark! I will wait for 4.1 then.

Actually I pasted both /admin/cores and /admin/collections to highlight that
the problem was only with SolrJ and both  admin/collections and
admin/collections were working as expected.

Sorry for the confusion.

Regards
Jay

-Original Message-
From: Mark Miller [mailto:markrmil...@gmail.com] 
Sent: Monday, January 07, 2013 1:14 PM
To: solr-user@lucene.apache.org
Subject: Re: No live SolrServers Solr 4 exceptions on trying to create a
collection

 http://127.0.0.1:7500/solr/admin/cores?

Why did you paste that as the example then :) ?

4.0 has problems using the collections api with the CloudSolrServer. You
will be able to do it for 4.1, but for 4.0 you have to use an HttpSolrServer
and pick a node to talk to. For 4.0, CloudSolrServer is just good for
querying and updating.

- Mark

On Jan 7, 2013, at 1:20 PM, Jay Parashar jparas...@itscape.com wrote:

 Right Mark,
 
 I am accessing the Collections API using Solrj. This is where I am stuck.
If
 I just use the Collections API using http thru the browser, the behavior
is
 as expected. Is there an example of using the Collections API using SolrJ?
 My code looks like
 
 String[] urls =

{http://127.0.0.1:8983/solr/,http://127.0.0.1:8900/solr/,http://127.0.0
 .1:7500/solr/,http://127.0.0.1:7574/solr/};
 CloudSolrServer server = new CloudSolrServer(127.0.0.1:2181, new
 LBHttpSolrServer(urls));

server.getLbServer().getHttpClient().getParams().setParameter(CoreConnection
 PNames.CONNECTION_TIMEOUT, 5000);

server.getLbServer().getHttpClient().getParams().setParameter(CoreConnection
 PNames.SO_TIMEOUT, 2); server.setDefaultCollection(collectionName);
 server.connect();
 CoreAdminRequest.Create create = new CoreAdminRequest.Create();
 create.setCoreName(myColl); create.setCollection(myColl);
 create.setInstanceDir(defaultDir);
 create.setDataDir(myCollData);
 create.setNumShards(2);
 create.process(server); //Exception No live SolrServers  is thrown here
 
 Regards
 Jay
 
 -Original Message-
 From: Mark Miller [mailto:markrmil...@gmail.com] 
 Sent: Monday, January 07, 2013 11:57 AM
 To: solr-user@lucene.apache.org
 Subject: Re: No live SolrServers Solr 4 exceptions on trying to create a
 collection
 
 
 On Jan 7, 2013, at 12:33 PM, Jay Parashar jparas...@itscape.com wrote:
 
 With my setup (4 servers running at localhost 8983, 8900, 7574 and 7500)
 when I manually do a 
 

http://127.0.0.1:7500/solr/admin/cores?action=CREATEname=myColl1instanceDi
 r=defaultdataDir=myColl1Datacollection=myColl1numShards=2
 it creates the collection only at the 7500 server. This is similar to
when
 I use HttpSolrServer (Solr 3.6 behavior).
 
 This only starts one core. If you want to use the CoreAdmin API you would
 need to make four calls, one to each server.
 
 If you want this done for you, you must use the Collections API - see the
 wiki:

http://wiki.apache.org/solr/SolrCloud#Managing_collections_via_the_Collectio
 ns_API
 
 - Mark
 



RE: Solr 4 exceptions on trying to create a collection

2013-01-06 Thread Jay Parashar
The exception No live SolrServers is being thrown when trying to create a new 
Collection ( code at end of this mail). On the CloudSolrServer request method, 
we have this line
ClientUtils.appendMap(coll, slices, clusterState.getSlices(coll)); where 
coll is the new collection I am trying to create and hence 
clusterState.getSlices(coll)); is returning null.
And then the loop of the slices which adds to the urlList never happens and 
hence the LBHttpSolrServer created in the CloudSolrServer has a null url list 
in the constructor.
This is giving the No live SolrServers exception.

What I am missing?

Instead of passing the CloudSolrServer to the create.process, if I pass the 
LBHttpSolrServer  (server.getLbServer()), the collection gets created but only 
on one server.

My code to create a new Cloud Server and new Collection:-

String[] urls = 
{http://127.0.0.1:8983/solr/,http://127.0.0.1:8900/solr/,http://127.0.0.1:7500/solr/,http://127.0.0.1:7574/solr/};
CloudSolrServer server = new CloudSolrServer(127.0.0.1:2181, new 
LBHttpSolrServer(urls));
server.getLbServer().getHttpClient().getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT,
 5000);
server.getLbServer().getHttpClient().getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT,
 2);
server.setDefaultCollection(collectionName);
server.connect();
CoreAdminRequest.Create create = new CoreAdminRequest.Create();
create.setCoreName(myColl);
create.setCollection(myColl);
create.setInstanceDir(defaultDir);
create.setDataDir(myCollData);
create.setNumShards(2);
create.process(server); //Exception No live SolrServers  is thrown here


Thanks
Jay


-Original Message-
From: Alexandre Rafalovitch [mailto:arafa...@gmail.com] 
Sent: Friday, January 04, 2013 6:08 PM
To: solr-user@lucene.apache.org
Subject: Re: Solr 4 exceptions on trying to create a collection

Tried Wireshark yet to see what host/port it is trying to connect and why it 
fails? It is a complex tool, but well worth learning.

Regards,
  Alex.

Personal blog: http://blog.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all at once. 
Lately, it doesn't seem to be working.  (Anonymous  - via GTD book)


On Fri, Jan 4, 2013 at 6:58 PM, Jay Parashar jparas...@itscape.com wrote:

 Thanks! I had a different version of httpclient in the classpath. So 
 the 2nd exception is gone but now I am  back to the first one  
 org.apache.solr.client.solrj.SolrServerException: No live SolrServers  
 available to handle this request

 -Original Message-
 From: Alexandre Rafalovitch [mailto:arafa...@gmail.com]
 Sent: Friday, January 04, 2013 4:21 PM
 To: solr-user@lucene.apache.org
 Subject: Re: Solr 4 exceptions on trying to create a collection

 For the second one:

 Wrong version of library on a classpath or multiple versions of 
 library on the classpath which causes wrong classes with missing 
 fields/variables? Or library interface baked in and the implementation 
 is newer. Some sort of mismatch basically. Most probably in Apache http 
 library.

 Regards,
Alex.

 Personal blog: http://blog.outerthoughts.com/
 LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
 - Time is the quality of nature that keeps events from happening all 
 at once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD 
 book)


 On Fri, Jan 4, 2013 at 4:34 PM, Jay Parashar jparas...@itscape.com
 wrote:

 
  Hi All,
 
  I am getting exceptions on trying to create a collection. Any help 
  is appreciated.
 
  While trying to create a collection, I got this error Caused by:
  org.apache.solr.client.solrj.SolrServerException: No live 
  SolrServers available to handle this request
  at
 
 
 org.apache.solr.client.solrj.impl.LBHttpSolrServer.request(LBHttpSolrServer.
  java:322)
  at
 
  org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrS
  er
  ver.ja
  va:257)
  at
 
  org.apache.solr.client.solrj.request.CoreAdminRequest.process(CoreAd
  mi
  nReque
  st.java:423)
 
 
  On trying to increase the server timeout by
 
  server.getLbServer().getHttpClient().getParams().setParameter(CoreCo
  nn
  ection
  PNames.CONNECTION_TIMEOUT, 5000);
 
  server.getLbServer().getHttpClient().getParams().setParameter(CoreCo
  nn
  ection
  PNames.SO_TIMEOUT, 2);
 
  I get this...
 
  SEVERE: The exception contained within MappableContainerException 
  could not be mapped to a response, re-throwing to the HTTP container
  java.lang.NoSuchFieldError: DEF_CONTENT_CHARSET
  at
 
  org.apache.http.impl.client.DefaultHttpClient.setDefaultHttpParams(D
  ef
  aultHt
  tpClient.java:175)
  at
 
  org.apache.http.impl.client.DefaultHttpClient.createHttpParams(Defau
  lt
  HttpCl
  ient.java:158)
  at
 
 
 org.apache.http.impl.client.AbstractHttpClient.getParams(AbstractHttpClient.
  java:448)
 
  Thanks
  Jay
 
 





Solr 4 (CloudSolrServer and LBHttpSolrServer question)

2013-01-04 Thread Jay Parashar
Hi,

I am trying to migrate to Solr 4 (from 3.6)  for a 
multithreaded/multicollection environment using the Solrj java client. I need 
some clarification of when to use the
Cloud Solr Server vs LBHttpSolrServer. Any help is appreciated.

Which one do I use?  The CloudSolrServer uses the LB server internally so 
should this be the one for both searching and indexing? The documentation says 
the LB server must not be used for indexing. As the CloudSolrServer uses the LB 
server internally, so I guess we should not use it for indexing. Is this 
correct?
So if the ConcurrentUpdateSolrServer is used for indexing, how do I load 
balance that?

Reusing:
Should I create multiple Cloud Solr Servers, one for each collection? Simply 
put, what is the best practice for reusing a server in a 
multithreaded/multicollection scenario and what server do I use for indexing 
and querying? The CloudSolrServer instantiates a new LB server per request. 
Isn't that expensive? 

On Solr 3.6, I used the ConcurrentUpdateSolrServer for indexing and the 
HttpSolrServer for searching. In each case, I had a new server per core and 
reused (I used a MAP with the corename as key and the server as the value). So 
for 5 cores, I had 5 servers identified by the core and re-used. I did this as 
I understood instantiating a new server for every request was expensive

Thanks
Jay



RE: Solr 4 (CloudSolrServer and LBHttpSolrServer question)

2013-01-04 Thread Jay Parashar
Thanks Mark.

-Original Message-
From: Mark Miller [mailto:markrmil...@gmail.com] 
Sent: Friday, January 04, 2013 9:51 AM
To: solr-user@lucene.apache.org
Subject: Re: Solr 4 (CloudSolrServer and LBHttpSolrServer question)

CloudSolrServer can be used for indexing and is smart about indexing since
it knows the current cluster state.

For 4.0 I'd use one per collection because there is a bug around this fixed
in the upcoming 4.1 (using one for more than one collection).

In fact, if you are moving to 4, it's a good idea to get your feet wet with
4.0, but I'd hold off for 4.1 for production if you can. Huge number of bug
fixes and improvements.

- Mark

On Jan 4, 2013, at 10:06 AM, Jay Parashar jparas...@itscape.com wrote:

 Hi,
 
 I am trying to migrate to Solr 4 (from 3.6)  for a 
 multithreaded/multicollection environment using the Solrj java client. I
need some clarification of when to use the Cloud Solr Server vs
LBHttpSolrServer. Any help is appreciated.
 
 Which one do I use?  The CloudSolrServer uses the LB server internally so
should this be the one for both searching and indexing? The documentation
says the LB server must not be used for indexing. As the CloudSolrServer
uses the LB server internally, so I guess we should not use it for indexing.
Is this correct?
 So if the ConcurrentUpdateSolrServer is used for indexing, how do I load
balance that?
 
 Reusing:
 Should I create multiple Cloud Solr Servers, one for each collection?
Simply put, what is the best practice for reusing a server in a
multithreaded/multicollection scenario and what server do I use for indexing
and querying? The CloudSolrServer instantiates a new LB server per request.
Isn't that expensive? 
 
 On Solr 3.6, I used the ConcurrentUpdateSolrServer for indexing and 
 the HttpSolrServer for searching. In each case, I had a new server per 
 core and reused (I used a MAP with the corename as key and the server 
 as the value). So for 5 cores, I had 5 servers identified by the core 
 and re-used. I did this as I understood instantiating a new server for 
 every request was expensive
 
 Thanks
 Jay
 



Solr 4 exceptions on trying to create a collection

2013-01-04 Thread Jay Parashar

Hi All,

I am getting exceptions on trying to create a collection. Any help is
appreciated.

While trying to create a collection, I got this error
Caused by: org.apache.solr.client.solrj.SolrServerException: No live
SolrServers available to handle this request
at
org.apache.solr.client.solrj.impl.LBHttpSolrServer.request(LBHttpSolrServer.
java:322)
at
org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrServer.ja
va:257)
at
org.apache.solr.client.solrj.request.CoreAdminRequest.process(CoreAdminReque
st.java:423)


On trying to increase the server timeout by
server.getLbServer().getHttpClient().getParams().setParameter(CoreConnection
PNames.CONNECTION_TIMEOUT, 5000);
server.getLbServer().getHttpClient().getParams().setParameter(CoreConnection
PNames.SO_TIMEOUT, 2);

I get this...

SEVERE: The exception contained within MappableContainerException could not
be mapped to a response, re-throwing to the HTTP container
java.lang.NoSuchFieldError: DEF_CONTENT_CHARSET
at
org.apache.http.impl.client.DefaultHttpClient.setDefaultHttpParams(DefaultHt
tpClient.java:175)
at
org.apache.http.impl.client.DefaultHttpClient.createHttpParams(DefaultHttpCl
ient.java:158)
at
org.apache.http.impl.client.AbstractHttpClient.getParams(AbstractHttpClient.
java:448)

Thanks 
Jay



RE: Solr 4 exceptions on trying to create a collection

2013-01-04 Thread Jay Parashar
Thanks! I had a different version of httpclient in the classpath. So the 2nd 
exception is gone but now I am  back to the first one 
 org.apache.solr.client.solrj.SolrServerException: No live SolrServers  
available to handle this request

-Original Message-
From: Alexandre Rafalovitch [mailto:arafa...@gmail.com] 
Sent: Friday, January 04, 2013 4:21 PM
To: solr-user@lucene.apache.org
Subject: Re: Solr 4 exceptions on trying to create a collection

For the second one:

Wrong version of library on a classpath or multiple versions of library on the 
classpath which causes wrong classes with missing fields/variables? Or library 
interface baked in and the implementation is newer. Some sort of mismatch 
basically. Most probably in Apache http library.

Regards,
   Alex.

Personal blog: http://blog.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all at once. 
Lately, it doesn't seem to be working.  (Anonymous  - via GTD book)


On Fri, Jan 4, 2013 at 4:34 PM, Jay Parashar jparas...@itscape.com wrote:


 Hi All,

 I am getting exceptions on trying to create a collection. Any help is 
 appreciated.

 While trying to create a collection, I got this error Caused by: 
 org.apache.solr.client.solrj.SolrServerException: No live SolrServers 
 available to handle this request
 at

 org.apache.solr.client.solrj.impl.LBHttpSolrServer.request(LBHttpSolrServer.
 java:322)
 at

 org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrSer
 ver.ja
 va:257)
 at

 org.apache.solr.client.solrj.request.CoreAdminRequest.process(CoreAdmi
 nReque
 st.java:423)


 On trying to increase the server timeout by

 server.getLbServer().getHttpClient().getParams().setParameter(CoreConn
 ection
 PNames.CONNECTION_TIMEOUT, 5000);

 server.getLbServer().getHttpClient().getParams().setParameter(CoreConn
 ection
 PNames.SO_TIMEOUT, 2);

 I get this...

 SEVERE: The exception contained within MappableContainerException 
 could not be mapped to a response, re-throwing to the HTTP container
 java.lang.NoSuchFieldError: DEF_CONTENT_CHARSET
 at

 org.apache.http.impl.client.DefaultHttpClient.setDefaultHttpParams(Def
 aultHt
 tpClient.java:175)
 at

 org.apache.http.impl.client.DefaultHttpClient.createHttpParams(Default
 HttpCl
 ient.java:158)
 at

 org.apache.http.impl.client.AbstractHttpClient.getParams(AbstractHttpClient.
 java:448)

 Thanks
 Jay