class="solr.UpdateRequestHandler" on solr 5.2.1

2016-02-21 Thread Ilan Schwarts
Hi, we had a running solr 4.3.1 with 1 core and no replication.
We are migrating to solrcloud 5.2.1 with 2 shards, on each shard we have 1
leader and 1 replica, total 4, The replication is not working.
I have updated solrconfig.xml and schema.xml, And when i add document i can
retreive it, It is being added.
But it is not being replicated to the replica node.
[image: Inline image 1]

This is the cluster, and this is what i see in cloud state.json under
collection1:

{"collection1":{
"replicationFactor":"2",
"shards":{
  "shard1":{
"range":"8000-",
"state":"active",
"replicas":{
  "core_node3":{
"core":"collection1_shard1_replica2",
"base_url":"http://10.171.3.106:8984/solr";,
"node_name":"10.171.3.106:8984_solr",
"state":"active",
"leader":"true"},
  "core_node4":{
"core":"collection1_shard1_replica1",
"base_url":"http://10.171.3.106:8986/solr";,
"node_name":"10.171.3.106:8986_solr",
"state":"active"}}},
  "shard2":{
"range":"0-7fff",
"state":"active",
"replicas":{
  "core_node1":{
"core":"collection1_shard2_replica1",
"base_url":"http://10.171.3.106:8983/solr";,
"node_name":"10.171.3.106:8983_solr",
"state":"active",
"leader":"true"},
  "core_node2":{
"core":"collection1_shard2_replica2",
"base_url":"http://10.171.3.106:8985/solr";,
"node_name":"10.171.3.106:8985_solr",
"state":"active",
"router":{"name":"compositeId"},
"maxShardsPerNode":"1",
"autoAddReplicas":"false"}}



What is weird, if i stop all solr cores, and then start, it will be synced,
the documents will be on both nodes.

I am using a custom update handler, maybe the problem is there ? i have set
it as before:


*Custom update handler:*
   
  
  WitStandardUpdater
 
 
 
  
   url
   batchStatus
   0 
   1 
   true
 
 
 
 
 
  host
  port
  queryId
 

-- 


-
Ilan Schwarts


strange error on closing server

2016-02-21 Thread Ziqi Zhang
Hi all

I am having a strange error whenever I close my index (calling server.close()
The error is shown below. I am not sure where I should look - the configuration 
file? The code? Or index fragments? Or else? The code causing the error is very 
simple, just the “close()” method.

Many thanks!


CachingDirectoryFactory:184 - Timeout waiting for all directory ref counts to 
be released - gave up waiting on CachedDir<>
2016-02-21 11:09:33 ERROR CachingDirectoryFactory:150 - Error closing 
directory:org.apache.solr.common.SolrException: Timeout waiting for all 
directory ref counts to be released - gave up waiting on 
CachedDir<>
at 
org.apache.solr.core.CachingDirectoryFactory.close(CachingDirectoryFactory.java:187)
at org.apache.solr.core.SolrCore.close(SolrCore.java:1257)
at org.apache.solr.core.SolrCores.close(SolrCores.java:124)
at org.apache.solr.core.CoreContainer.shutdown(CoreContainer.java:562)
at 
org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.shutdown(EmbeddedSolrServer.java:263)
at 
org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.close(EmbeddedSolrServer.java:268)
at uk.ac.shef.dcs.jate.app.App.extract(App.java:276)
at uk.ac.shef.dcs.jate.app.AppTermEx.main(AppTermEx.java:35)


Line 276 of App class is:

solrServer.close();





Solr - Field value nested boosting.

2016-02-21 Thread mihir8...@yahoo.com
Team,

We wanted to do a nested boosting in solr at field value but we are not sure
how to form this query.

e.g We are trying to write following query.

q:interviewee:(google^1.2 facebook^1.1)^10.0 OR interviewee:(yahoo)^15

We expect that data should come in following order. but "google facebook" is
coming first. We are not able to identify the reason.

yahoo (15)
google facebook (10)(document having single word like "google facebook")
google (
facebook





--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-Field-value-nested-boosting-tp4258661.html
Sent from the Solr - User mailing list archive at Nabble.com.


set 'root' contextPath in Solr 5.4.1?

2016-02-21 Thread matthew grisius
I have migrated my app that used tomee plus 1.6.0.1, Solr (war) 4.7.2, and 
Nutch 1.8 to Solr 5.4.1 (w/ jetty),
Nutch 1.11, and Solrj on openSUSE 13.1.

With Solr 5.4.1 I can happily:

- add static content
- add servlets (java, clojure)
- import crawl data via Nutch 1.11, to a single core solr/tdfield, and then 
solr/tdfield/browse, solr/admin, etc.

I want to re-assign  the "root context", e.g. contextPath ="/", instead of to 
"/solr",  to another servlet, or display
a "/" splash page with links to solr/admin, solr/tdfield/browse, and other 
static content/servlets, etc. while
preserving solr uri behavior/functionality.

My unsuccessful attempts included:

- edit contexts/solr-jetty-context.xml (contextPath, add resourceBase, etc.)
- unmap solr rewrite rule to pass thru . . .
- edit other '/contexts/' . . .
- edit etc/webdefault.xml . . .
- bin/solr does not appear to affect "/"
- org.apache.solr.util.SolrCLI does not appear to affect "/"

I am not yet familiar enough with jetty or the Solr 5.x design intent and would 
appreciate any suggestions
on how to properly (idiomatically) reassign the contextPath="/" and preserve 
upward compatibility with
Solr 5.x & 6.x.

Thank you very much, any suggestions would be appreciated!

-matt.



Re: class="solr.UpdateRequestHandler" on solr 5.2.1

2016-02-21 Thread Erick Erickson
Why are you using old-style replication with solr cloud? I suggest you turn
it off and just let solr cloud do all the work.  The reason (probably) that
restarting catches things up is it may be doing a full replication. Mixing
solr cloud with old-style replication is tricky, so please explain what the
reasoning is...

Best
Erick
On Feb 21, 2016 21:24, "Ilan Schwarts"  wrote:

> Hi, we had a running solr 4.3.1 with 1 core and no replication.
> We are migrating to solrcloud 5.2.1 with 2 shards, on each shard we have 1
> leader and 1 replica, total 4, The replication is not working.
> I have updated solrconfig.xml and schema.xml, And when i add document i
> can retreive it, It is being added.
> But it is not being replicated to the replica node.
> [image: Inline image 1]
>
> This is the cluster, and this is what i see in cloud state.json under
> collection1:
>
> {"collection1":{
> "replicationFactor":"2",
> "shards":{
>   "shard1":{
> "range":"8000-",
> "state":"active",
> "replicas":{
>   "core_node3":{
> "core":"collection1_shard1_replica2",
> "base_url":"http://10.171.3.106:8984/solr";,
> "node_name":"10.171.3.106:8984_solr",
> "state":"active",
> "leader":"true"},
>   "core_node4":{
> "core":"collection1_shard1_replica1",
> "base_url":"http://10.171.3.106:8986/solr";,
> "node_name":"10.171.3.106:8986_solr",
> "state":"active"}}},
>   "shard2":{
> "range":"0-7fff",
> "state":"active",
> "replicas":{
>   "core_node1":{
> "core":"collection1_shard2_replica1",
> "base_url":"http://10.171.3.106:8983/solr";,
> "node_name":"10.171.3.106:8983_solr",
> "state":"active",
> "leader":"true"},
>   "core_node2":{
> "core":"collection1_shard2_replica2",
> "base_url":"http://10.171.3.106:8985/solr";,
> "node_name":"10.171.3.106:8985_solr",
> "state":"active",
> "router":{"name":"compositeId"},
> "maxShardsPerNode":"1",
> "autoAddReplicas":"false"}}
>
>
>
> What is weird, if i stop all solr cores, and then start, it will be
> synced, the documents will be on both nodes.
>
> I am using a custom update handler, maybe the problem is there ? i have
> set it as before:
>
>
> *Custom update handler:*
>
>   
>   WitStandardUpdater
>  
>  
>  
>class="WiT.ir.solrcomponents.WitStandardUpdateProcessorFactory">
>url
>batchStatus
>0 
>1 
>true
>  
>  
>  
>  
>   class="WiT.ir.solrcomponents.TcpResponseWriter">
>   host
>   port
>   queryId
>  
>
> --
>
>
> -
> Ilan Schwarts
>


Re: class="solr.UpdateRequestHandler" on solr 5.2.1

2016-02-21 Thread Erik Hatcher
I think the issue is that the distributed update processor isn't configured.  
That's necessary for SolrCloud to forward docs. 

   Erik 

> On Feb 21, 2016, at 15:20, Erick Erickson  wrote:
> 
> Why are you using old-style replication with solr cloud? I suggest you turn
> it off and just let solr cloud do all the work.  The reason (probably) that
> restarting catches things up is it may be doing a full replication. Mixing
> solr cloud with old-style replication is tricky, so please explain what the
> reasoning is...
> 
> Best
> Erick
>> On Feb 21, 2016 21:24, "Ilan Schwarts"  wrote:
>> 
>> Hi, we had a running solr 4.3.1 with 1 core and no replication.
>> We are migrating to solrcloud 5.2.1 with 2 shards, on each shard we have 1
>> leader and 1 replica, total 4, The replication is not working.
>> I have updated solrconfig.xml and schema.xml, And when i add document i
>> can retreive it, It is being added.
>> But it is not being replicated to the replica node.
>> [image: Inline image 1]
>> 
>> This is the cluster, and this is what i see in cloud state.json under
>> collection1:
>> 
>> {"collection1":{
>>"replicationFactor":"2",
>>"shards":{
>>  "shard1":{
>>"range":"8000-",
>>"state":"active",
>>"replicas":{
>>  "core_node3":{
>>"core":"collection1_shard1_replica2",
>>"base_url":"http://10.171.3.106:8984/solr";,
>>"node_name":"10.171.3.106:8984_solr",
>>"state":"active",
>>"leader":"true"},
>>  "core_node4":{
>>"core":"collection1_shard1_replica1",
>>"base_url":"http://10.171.3.106:8986/solr";,
>>"node_name":"10.171.3.106:8986_solr",
>>"state":"active"}}},
>>  "shard2":{
>>"range":"0-7fff",
>>"state":"active",
>>"replicas":{
>>  "core_node1":{
>>"core":"collection1_shard2_replica1",
>>"base_url":"http://10.171.3.106:8983/solr";,
>>"node_name":"10.171.3.106:8983_solr",
>>"state":"active",
>>"leader":"true"},
>>  "core_node2":{
>>"core":"collection1_shard2_replica2",
>>"base_url":"http://10.171.3.106:8985/solr";,
>>"node_name":"10.171.3.106:8985_solr",
>>"state":"active",
>>"router":{"name":"compositeId"},
>>"maxShardsPerNode":"1",
>>"autoAddReplicas":"false"}}
>> 
>> 
>> 
>> What is weird, if i stop all solr cores, and then start, it will be
>> synced, the documents will be on both nodes.
>> 
>> I am using a custom update handler, maybe the problem is there ? i have
>> set it as before:
>> 
>> 
>> *Custom update handler:*
>>   
>>  
>>  WitStandardUpdater
>> 
>> 
>> 
>>  > class="WiT.ir.solrcomponents.WitStandardUpdateProcessorFactory">
>>   url
>>   batchStatus
>>   0 
>>   1 
>>   true
>> 
>> 
>> 
>> 
>> > class="WiT.ir.solrcomponents.TcpResponseWriter">
>>  host
>>  port
>>  queryId
>> 
>> 
>> --
>> 
>> 
>> -
>> Ilan Schwarts
>> 


Re: class="solr.UpdateRequestHandler" on solr 5.2.1

2016-02-21 Thread Ilan Schwarts
Hi Erick, First of all, thank you very much for answering i really
appreciate it, i've being reading alot of articles (some by you) in the
past 2 weeks.
Its very confusing the replication process and i didnt find articles about
this, The main differences in solrcloud 5. From what I thought, by stating
a  in solrconfig, i can over-ride the existing
solrcloud ReplicationHandler behavior, I have not stated any
ReplicationHandler node in my config yet.
 How do you know solr is using the old replication style ? What i did wrong
in configuration ?
I Downloaded 5.2.1 package, and followed a simple guide, I dont declare the
master/slave anywhere, it is all done automaitcally (and happening just
fine). I am using the basic config set that is supplised with solr
installation, Then I added my custom update request handler and changed the
schema.

*Important:*
Today I saw in Basic config set (provided in installation) they use
distributed update processor as you mentioned, So in my custom update
request handler, I have added  just before
RunUpdateProcessorFactory, But it throw exception that i have 2
DistributedUpdateProcessorFactory in WitStandardUpdater
How could that be ??



On Sun, Feb 21, 2016 at 10:20 PM, Erick Erickson 
wrote:

> Why are you using old-style replication with solr cloud? I suggest you turn
> it off and just let solr cloud do all the work.  The reason (probably) that
> restarting catches things up is it may be doing a full replication. Mixing
> solr cloud with old-style replication is tricky, so please explain what the
> reasoning is...
>
> Best
> Erick
> On Feb 21, 2016 21:24, "Ilan Schwarts"  wrote:
>
> > Hi, we had a running solr 4.3.1 with 1 core and no replication.
> > We are migrating to solrcloud 5.2.1 with 2 shards, on each shard we have
> 1
> > leader and 1 replica, total 4, The replication is not working.
> > I have updated solrconfig.xml and schema.xml, And when i add document i
> > can retreive it, It is being added.
> > But it is not being replicated to the replica node.
> > [image: Inline image 1]
> >
> > This is the cluster, and this is what i see in cloud state.json under
> > collection1:
> >
> > {"collection1":{
> > "replicationFactor":"2",
> > "shards":{
> >   "shard1":{
> > "range":"8000-",
> > "state":"active",
> > "replicas":{
> >   "core_node3":{
> > "core":"collection1_shard1_replica2",
> > "base_url":"http://10.171.3.106:8984/solr";,
> > "node_name":"10.171.3.106:8984_solr",
> > "state":"active",
> > "leader":"true"},
> >   "core_node4":{
> > "core":"collection1_shard1_replica1",
> > "base_url":"http://10.171.3.106:8986/solr";,
> > "node_name":"10.171.3.106:8986_solr",
> > "state":"active"}}},
> >   "shard2":{
> > "range":"0-7fff",
> > "state":"active",
> > "replicas":{
> >   "core_node1":{
> > "core":"collection1_shard2_replica1",
> > "base_url":"http://10.171.3.106:8983/solr";,
> > "node_name":"10.171.3.106:8983_solr",
> > "state":"active",
> > "leader":"true"},
> >   "core_node2":{
> > "core":"collection1_shard2_replica2",
> > "base_url":"http://10.171.3.106:8985/solr";,
> > "node_name":"10.171.3.106:8985_solr",
> > "state":"active",
> > "router":{"name":"compositeId"},
> > "maxShardsPerNode":"1",
> > "autoAddReplicas":"false"}}
> >
> >
> >
> > What is weird, if i stop all solr cores, and then start, it will be
> > synced, the documents will be on both nodes.
> >
> > I am using a custom update handler, maybe the problem is there ? i have
> > set it as before:
> >
> >
> > *Custom update handler:*
> > >
> >   
> >   WitStandardUpdater
> >  
> >  
> >  
> >> class="WiT.ir.solrcomponents.WitStandardUpdateProcessorFactory">
> >url
> >batchStatus
> >0 
> >1 
> >true
> >  
> >  
> >  
> >  
> >   > class="WiT.ir.solrcomponents.TcpResponseWriter">
> >   host
> >   port
> >   queryId
> >  
> >
> > --
> >
> >
> > -
> > Ilan Schwarts
> >
>



-- 


-
Ilan Schwarts


Re: class="solr.UpdateRequestHandler" on solr 5.2.1

2016-02-21 Thread Ilan Schwarts
my typo, I have added DistributedUpdateProcessorFactory before
solr.RunUpdateProcessorFactory and not solr.RunUpdateProcessorFactory..
Then i received exception stating wrote there are 2 declared
solr.DistributedUpdateProcessorFactory

On Sun, Feb 21, 2016 at 11:01 PM, Ilan Schwarts  wrote:

> Hi Erick, First of all, thank you very much for answering i really
> appreciate it, i've being reading alot of articles (some by you) in the
> past 2 weeks.
> Its very confusing the replication process and i didnt find articles about
> this, The main differences in solrcloud 5. From what I thought, by stating
> a  in solrconfig, i can over-ride the existing
> solrcloud ReplicationHandler behavior, I have not stated any
> ReplicationHandler node in my config yet.
>  How do you know solr is using the old replication style ? What i did
> wrong in configuration ?
> I Downloaded 5.2.1 package, and followed a simple guide, I dont declare
> the master/slave anywhere, it is all done automaitcally (and happening just
> fine). I am using the basic config set that is supplised with solr
> installation, Then I added my custom update request handler and changed the
> schema.
>
> *Important:*
> Today I saw in Basic config set (provided in installation) they use
> distributed update processor as you mentioned, So in my custom update
> request handler, I have added  class="solr.RunUpdateProcessorFactory" /> just before
> RunUpdateProcessorFactory, But it throw exception that i have 2
> DistributedUpdateProcessorFactory in WitStandardUpdater
> How could that be ??
>
>
>
> On Sun, Feb 21, 2016 at 10:20 PM, Erick Erickson 
> wrote:
>
>> Why are you using old-style replication with solr cloud? I suggest you
>> turn
>> it off and just let solr cloud do all the work.  The reason (probably)
>> that
>> restarting catches things up is it may be doing a full replication. Mixing
>> solr cloud with old-style replication is tricky, so please explain what
>> the
>> reasoning is...
>>
>> Best
>> Erick
>> On Feb 21, 2016 21:24, "Ilan Schwarts"  wrote:
>>
>> > Hi, we had a running solr 4.3.1 with 1 core and no replication.
>> > We are migrating to solrcloud 5.2.1 with 2 shards, on each shard we
>> have 1
>> > leader and 1 replica, total 4, The replication is not working.
>> > I have updated solrconfig.xml and schema.xml, And when i add document i
>> > can retreive it, It is being added.
>> > But it is not being replicated to the replica node.
>> > [image: Inline image 1]
>> >
>> > This is the cluster, and this is what i see in cloud state.json under
>> > collection1:
>> >
>> > {"collection1":{
>> > "replicationFactor":"2",
>> > "shards":{
>> >   "shard1":{
>> > "range":"8000-",
>> > "state":"active",
>> > "replicas":{
>> >   "core_node3":{
>> > "core":"collection1_shard1_replica2",
>> > "base_url":"http://10.171.3.106:8984/solr";,
>> > "node_name":"10.171.3.106:8984_solr",
>> > "state":"active",
>> > "leader":"true"},
>> >   "core_node4":{
>> > "core":"collection1_shard1_replica1",
>> > "base_url":"http://10.171.3.106:8986/solr";,
>> > "node_name":"10.171.3.106:8986_solr",
>> > "state":"active"}}},
>> >   "shard2":{
>> > "range":"0-7fff",
>> > "state":"active",
>> > "replicas":{
>> >   "core_node1":{
>> > "core":"collection1_shard2_replica1",
>> > "base_url":"http://10.171.3.106:8983/solr";,
>> > "node_name":"10.171.3.106:8983_solr",
>> > "state":"active",
>> > "leader":"true"},
>> >   "core_node2":{
>> > "core":"collection1_shard2_replica2",
>> > "base_url":"http://10.171.3.106:8985/solr";,
>> > "node_name":"10.171.3.106:8985_solr",
>> > "state":"active",
>> > "router":{"name":"compositeId"},
>> > "maxShardsPerNode":"1",
>> > "autoAddReplicas":"false"}}
>> >
>> >
>> >
>> > What is weird, if i stop all solr cores, and then start, it will be
>> > synced, the documents will be on both nodes.
>> >
>> > I am using a custom update handler, maybe the problem is there ? i have
>> > set it as before:
>> >
>> >
>> > *Custom update handler:*
>> >>  class="solr.UpdateRequestHandler" >
>> >   
>> >   WitStandardUpdater
>> >  
>> >  
>> >  
>> >   > > class="WiT.ir.solrcomponents.WitStandardUpdateProcessorFactory">
>> >url
>> >batchStatus
>> >0 
>> >1 
>> >true
>> >  
>> >  
>> >  
>> >  
>> >  > > class="WiT.ir.solrcomponents.TcpResponseWriter">
>> >   host
>> >   port
>> >   queryId
>> >  
>> >
>> > --
>> >
>> >
>> > -
>> > Ilan Schwarts
>> >
>>
>
>
>
> --
>
>
> -
> Ilan Schwarts
>



-- 


-
Ilan Schwarts


RE: Delay in replication between cloud servers

2016-02-21 Thread Cool Techi
Hi,
Can someone point in the right direction to check this.
Regards,Rohit 

> From: cooltec...@outlook.com
> To: solr-user@lucene.apache.org
> Subject: RE: Delay in replication between cloud servers
> Date: Tue, 16 Feb 2016 22:16:23 +0530
> 
> Further we have noticed that the delay increase a couple of hours after 
> restart. Details related to sorlconfig.xml are given below,
>   
>15000 
>25000
>false 
>  
> 
>  
>  1000 
>Regards,Rohit 
> 
> > From: cooltec...@outlook.com
> > To: solr-user@lucene.apache.org
> > Subject: Delay in replication between cloud servers
> > Date: Tue, 16 Feb 2016 20:20:04 +0530
> > 
> > We are using solr cloud with 1 shard and replication factor as 3. We are 
> > noticing that the time for data to become available across all replicas 
> > from the leader is very high.
> > The data rate is not very high, is there anyway to control this. In 
> > master-slave setup with give a replication time.
> > Regards,Rohit  
> >   
> 
  

Re: Facet Filter

2016-02-21 Thread Anil
HI Shawn,

solr Documentation says docValues=true/false works for only few fields.
will that work on Text field ?

Copy from the reference guide -

DocValues are only available for specific field types. The types chosen
determine the underlying Lucene
docValue type that will be used. The available Solr field types are:
StrField and UUIDField.
If the field is single-valued (i.e., multi-valued is false), Lucene will
use the SORTED type.
If the field is multi-valued, Lucene will use the SORTED_SET type.
If you have already indexed data into your Solr index, you will need to
completely re-index your content
after changing your field definitions in schema.xml in order to
successfully use docValues.

Any Trie* numeric fields and EnumField.
If the field is single-valued (i.e., multi-valued is false), Lucene will
use the NUMERIC type.
If the field is multi-valued, Lucene will use the SORTED_SET type.


Regards,
Anil

On 19 February 2016 at 08:49, Anil  wrote:

> Thanks Shawn. This really helps. we are using 4.10.3 now.. will look into
> 5.4.1. Thanks.
>
> Regards,
> Anil
>
> On 18 February 2016 at 20:04, Shawn Heisey  wrote:
>
>> On 2/18/2016 7:12 AM, Anil wrote:
>> > Thank you, i just checked in 5.1.
>> >
>> > as facet fields has to be Strings and cannot be tockenized. is there any
>> > way to search on case insensitive search on this field (not in a facet
>> > filter scenario).
>>
>> If you configure docValues on the field in schema.xml and reindex, then
>> the returned facets will be the original input values even if the field
>> is tokenized, just as if you had used a string type without docValues.
>> This should allow you to use one field for queries *and* facets.
>>
>> The reindex *is* required after adding docValues, and the index will be
>> larger.
>>
>> Note that using 5.1 isn't recommended at this point.  You should use the
>> latest version available.  Currently that's 5.4.1, but soon it will be
>> 5.5.
>>
>> Thanks,
>> Shawn
>>
>>
>


Index writer addIndexes method not working

2016-02-21 Thread jeba earnest
My requirement is to add the index folder to the solr data directory. I am
generating a lucene index by mapreduce program. And later I would like to
merge the index with the solr index without bringing the solr down.

I actually tried index merger tool but this tool works when the solr is
down.

Is there a possibility to merge the segments. Will that solve my problem?


What is this API does?

https://lucene.apache.org/core/4_6_0/core/org/apache/lucene/index/IndexWriter.html#addIndexes(org.apache.lucene.store.Directory..
.)

Jeba


Solr Problems

2016-02-21 Thread Pavan Kumar
Hi Sir,

How to pass stored procedure input parameters in solr data-config.xml.

Data-config.xml



Thanks in advance.

Thanks & Regards,
Pavan Kumar


numFound in facet results

2016-02-21 Thread Anil
HI ,

can we get numFound of the number of face results for a query like in main
results ?

Please advice.

Regards,
Anil