Transforming SolrDocument to SolrInputDocument in Solr 6.0

2016-05-10 Thread Stephan Schubert
In Solr 6.0 the method ClientUtils.toSolrInputDocument() was removed 
(deprecated since 5.5.1, see 
https://issues.apache.org/jira/browse/SOLR-8339). What is the best way now 
to transform a SolrDocument into a SolrInputDocument?
Mit freundlichen Grüßen / Best regards

Stephan Schubert
Senior Web Application Engineer | IT Engineering
Information Oriented Applications

SICK AG | Erwin-Sick-Str. 1 | 79183 Waldkirch | Germany
Phone  +49 7681 202-3751 | Fax  | mailto:stephan.schub...@sick.de | 
http://www.sick.de
 

SICK AG  |  Sitz: Waldkirch i. Br.  |  Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  |  Reinhard Bösl  |  Dr. Mats 
Gökstorp  |  Dr. Martin Krämer  |  Markus Vatter
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende)  |  Klaus M. Bukenberger 
(Vorsitzender)


Transforming SolrDocument to SolrInputDocument in Solr 6.0

2016-05-10 Thread Stephan Schubert
In Solr 6.0 the method ClientUtils.toSolrInputDocument() was removed 
(deprecated since 5.5.1, see 
https://issues.apache.org/jira/browse/SOLR-8339). What is the best way now 
to transform a SolrDocument into a SolrInputDocument?
Mit freundlichen Grüßen / Best regards

Stephan Schubert
Senior Web Application Engineer | IT Engineering
Information Oriented Applications

SICK AG | Erwin-Sick-Str. 1 | 79183 Waldkirch | Germany
Phone  +49 7681 202-3751 | Fax  | mailto:stephan.schub...@sick.de | 
http://www.sick.de
 

SICK AG  |  Sitz: Waldkirch i. Br.  |  Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  |  Reinhard Bösl  |  Dr. Mats 
Gökstorp  |  Dr. Martin Krämer  |  Markus Vatter
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende)  |  Klaus M. Bukenberger 
(Vorsitzender)


Start Solr with multiple external zookeepers on Windows Server?

2015-04-27 Thread Stephan Schubert
Hi everyone,

how is it possible to start solr with an external set of zookeeper 
instances (quorum of 3 servers) on a windows server (2008R2)?

>From the wiki I got (
https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble
)

bin\solr restart -c -p 8983 -z 
samplehost1:9983,samplehost2:9983,samplehost3:9983 -m 6g

But this seems not to work on windows. After I start this command, the 
start skript prints out the help option only. With only one zookeeper 
Instance it works. Any suggestions?

Regards

Stephan

Solr Version: 5.1 
 
 
SICK AG - Sitz: Waldkirch i. Br. - Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  -  Reinhard Bösl  -  Dr. Mats 
Gökstorp  -  Dr. Martin Krämer  -  Markus Vatter 
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende) - Klaus M. Bukenberger 
(Vorsitzender) 


Start Solr with multiple external zookeepers on Windows Server?

2015-04-27 Thread Stephan Schubert
Hi everyone,

how is it possible to start solr with an external set of zookeeper 
instances (quorum of 3 servers) on a windows server (2008R2)?

>From the wiki I got (
https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble
)

bin\solr restart -c -p 8983 -z 
samplehost1:9983,samplehost2:9983,samplehost3:9983 -m 6g

But this seems not to work on windows. After I start this command, the 
start skript prints out the help option only. With only one zookeeper 
Instance it works. Any suggestions?

Regards

Stephan

Solr Version: 5.1 
 
SICK AG - Sitz: Waldkirch i. Br. - Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  -  Reinhard Bösl  -  Dr. Mats 
Gökstorp  -  Dr. Martin Krämer  -  Markus Vatter 
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende) - Klaus M. Bukenberger 
(Vorsitzender) 


Antwort: Start Solr with multiple external zookeepers on Windows Server?

2015-04-28 Thread Stephan Schubert
Hi there,

editing the solr.in.cmd and list the zookeeper hosts there instead of 
passing them via parameter in the console worked. I'm using Solr 5.1 btw.





Von:Stephan Schubert 
An: solr-user@lucene.apache.org, 
Datum:  27.04.2015 19:06
Betreff:Start Solr with multiple external zookeepers on Windows 
Server?



Hi everyone,

how is it possible to start solr with an external set of zookeeper 
instances (quorum of 3 servers) on a windows server (2008R2)?

>From the wiki I got (
https://cwiki.apache.org/confluence/display/solr/Setting+Up+an+External+ZooKeeper+Ensemble

)

bin\solr restart -c -p 8983 -z 
samplehost1:9983,samplehost2:9983,samplehost3:9983 -m 6g

But this seems not to work on windows. After I start this command, the 
start skript prints out the help option only. With only one zookeeper 
Instance it works. Any suggestions?

Regards

Stephan

Solr Version: 5.1 
 
SICK AG - Sitz: Waldkirch i. Br. - Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  -  Reinhard Bösl  -  Dr. Mats 
Gökstorp  -  Dr. Martin Krämer  -  Markus Vatter 
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende) - Klaus M. Bukenberger 
(Vorsitzender) 

 
 
SICK AG - Sitz: Waldkirch i. Br. - Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  -  Reinhard Bösl  -  Dr. Mats 
Gökstorp  -  Dr. Martin Krämer  -  Markus Vatter 
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende) - Klaus M. Bukenberger 
(Vorsitzender) 


RE: Expected mime type application/octet-stream but got text/html

2015-04-28 Thread Stephan Schubert
Hi,

just a wild guess: you are calling /solr/update instead of 
/solr/collection/update

Regards

Stephan



Von:Vijaya Narayana Reddy Bhoomi Reddy 

An: solr-user@lucene.apache.org, 
Datum:  28.04.2015 13:57
Betreff:Expected mime type application/octet-stream but got 
text/html



Hi,

I am suddenly seeing this error message when I try to index documents 
using
SolrJ client. The same piece of code was working fine last time when I
indexed the documents. But now, this is the error message being thrown on
the SolrJ client. Request your urgent help as this is very high priority
for me.


Exception in thread "main"
org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:
Expected mime type application/octet-stream but got text/html. 


Error 404 Not Found


HTTP ERROR: 404
Problem accessing /update. Reason:
Not Found
Powered by Jetty://




at
org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:512)
at
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:210)
at
org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:206)
at
org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:124)
at
com.lgcgroup.solr.indexer.SolrTikaIndexer.indexBinaryDocuments(SolrTikaIndexer.java:154)
at com.lgcgroup.solr.indexer.IndexingDriver.main(IndexingDriver.java:54)


Thanks & Regards
Vijay

-- 
The contents of this e-mail are confidential and for the exclusive use of 
the intended recipient. If you receive this e-mail in error please delete 
it from your system immediately and notify us either by e-mail or 
telephone. You should not copy, forward or otherwise disclose the content 
of the e-mail. The views expressed in this communication may not 
necessarily be the view held by WHISHWORKS.

 
 
SICK AG - Sitz: Waldkirch i. Br. - Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  -  Reinhard Bösl  -  Dr. Mats 
Gökstorp  -  Dr. Martin Krämer  -  Markus Vatter 
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende) - Klaus M. Bukenberger 
(Vorsitzender) 


Antwort: Custom Scoring Question

2015-04-29 Thread Stephan Schubert
Hi Johannes,

did you have a look on Solr edismax and function queries? 
https://cwiki.apache.org/confluence/display/solr/Function+Queries

If I got you right, for the case you just want to ignore fields which have 
not a value set on a specific field you can filter them out with a filter 
query.

Example: 

fieldname: mycustomfield

filterquery to ignore docs with mycustomfield not set: +mycustomfield:*

Regards

Stephan



Von:Johannes Ruscheinski 
An: solr-user@lucene.apache.org, 
Kopie:  Oliver Obenland 
Datum:  29.04.2015 14:10
Betreff:Custom Scoring Question



Hi,

I am entirely new to the world of SOLR programming and I have the 
following questions:

In addition to our regular searches we need to implement a specialised 
form of range search and ranking. We have implemented a CustomScoreQuery 
and a CustomScoreProvider.  I now have a few questions:

1) Where and how do we let SOLR know that it should use this? (I presume 
that will be some XML config file.)
2) How do we "tag" our special queries to switch to the custom 
implementation.

Furthermore, only a small subset of our data will have the database field 
relevant to this type of query set.  A problem that I can see is that we 
want SOLR to prefilter, or suppress, any records that have no data in this 
field and, if the field is non-empty, to call a function provided by us to 
let it know whether to include said record in the result set or not.

Also, any tips on how to develop and debug this?  I am using the Linux 
command-line and Emacs.  I am linking against SOLR by using "javac -cp 
solr-core-4.2.1.jar:. my_code.java".  It is probably not relevant but, I 
might mention it anyway: We are using SOLR as a part of VuFind.

I'd be greatful for any suggestions.

--Johannes

-- 
Dr. Johannes Ruscheinski
Universitätsbibliothek Tübingen - IT-Abteilung -
Wilhelmstr. 32, 72074 Tübingen

Tel: +49 7071 29-72820
FAX: +49 7071 29-5069
Email: johannes.ruschein...@uni-tuebingen.de



 
 
SICK AG - Sitz: Waldkirch i. Br. - Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  -  Reinhard Bösl  -  Dr. Mats 
Gökstorp  -  Dr. Martin Krämer  -  Markus Vatter 
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende) - Klaus M. Bukenberger 
(Vorsitzender) 


Antwort: Re: Transforming SolrDocument to SolrInputDocument in Solr 6.0

2016-05-10 Thread Stephan Schubert
Ouch... thanks a lot ;)

Mit freundlichen Grüßen / Best regards

Stephan Schubert
Senior Web Application Engineer | IT Engineering
Information Oriented Applications

SICK AG | Erwin-Sick-Str. 1 | 79183 Waldkirch | Germany
Phone  +49 7681 202-3751 | Fax  | mailto:stephan.schub...@sick.de | 
http://www.sick.de
 

SICK AG  |  Sitz: Waldkirch i. Br.  |  Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  |  Reinhard Bösl  |  Dr. Mats 
Gökstorp  |  Dr. Martin Krämer  |  Markus Vatter
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende)  |  Klaus M. Bukenberger 
(Vorsitzender)


Antwort: Re: Transforming SolrDocument to SolrInputDocument in Solr 6.0

2016-05-11 Thread Stephan Schubert
I just tried the method. The method is throwing a exception after just 
passing a solr document of a solr response to the method

My source code:

SolrDocument currentDoc = DocumentList.get(f);
DocumentObjectBinder binder = new DocumentObjectBinder();
SolrInputDocument inputDoc = binder.toSolrInputDocument(currentDoc)

Eception:

Exception in thread "main" 
org.apache.solr.client.solrj.beans.BindingException: class: class 
org.apache.solr.common.SolrDocument does not define any fields.
at 
org.apache.solr.client.solrj.beans.DocumentObjectBinder.toSolrInputDocument(DocumentObjectBinder.java:78)


I don't know why this error is coming up, as the fields are definitely 
filled (response directly from Solr and the checked the fields too).

 I'm using now just the old code:

public static SolrInputDocument toSolrInputDocument( SolrDocument d )
{
 SolrInputDocument doc = new SolrInputDocument();
 for( String name : d.getFieldNames() ) 
{
 doc.addField( name, d.getFieldValue(name), 1.0f );
}
return doc;
}

Seems that the binder is throwing an error here:

72   public SolrInputDocument toSolrInputDocument(Object obj) {
73 List fields = getDocFields(obj.getClass());
74 if (fields.isEmpty()) {
75   throw new BindingException("class: " + obj.getClass() + " does 
not define any fields.");
76 }
77 



Von:Erick Erickson 
An: solr-user , 
Datum:  10.05.2016 17:49
Betreff:Re: Transforming SolrDocument to SolrInputDocument in Solr 
6.0



Hmm, looking at the patch I see:

DocumentObjectBinder binder = new DocumentObjectBinder();
.
.
.

SolrInputDocument solrInputDoc = binder.toSolrInputDocument(in);

But I confess I didn't actually try it.

On Tue, May 10, 2016 at 8:41 AM, Stephan Schubert
 wrote:
> In Solr 6.0 the method ClientUtils.toSolrInputDocument() was removed
> (deprecated since 5.5.1, see
> https://issues.apache.org/jira/browse/SOLR-8339). What is the best way 
now
> to transform a SolrDocument into a SolrInputDocument?
>
> Mit freundlichen Grüßen / Best regards
>
> Stephan Schubert
> Senior Web Application Engineer  |   IT Engineering Information Oriented
> Applications
>
>
>
> SICK AG  |  Erwin-Sick-Str. 1  |  79183 Waldkirch  |  Germany
> Phone +49 7681 202-3751  |  stephan.schub...@sick.de  |  
http://www.sick.de
> 
__
>
> SICK AG  |   Sitz: Waldkirch i. Br.  |   Handelsregister: Freiburg i. 
Br.
> HRB 280355
> Vorstand: Dr. Robert Bauer (Vorsitzender)  |  Reinhard Bösl  |  Dr. Mats
> Gökstorp  |  Dr. Martin Krämer  |  Markus Vatter
> Aufsichtsrat: Gisela Sick (Ehrenvorsitzende)  |  Klaus M. Bukenberger
> (Vorsitzender)



Mit freundlichen Grüßen / Best regards

Stephan Schubert
Senior Web Application Engineer | IT Engineering
Information Oriented Applications

SICK AG | Erwin-Sick-Str. 1 | 79183 Waldkirch | Germany
Phone  +49 7681 202-3751 | Fax  | mailto:stephan.schub...@sick.de | 
http://www.sick.de
 

SICK AG  |  Sitz: Waldkirch i. Br.  |  Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  |  Reinhard Bösl  |  Dr. Mats 
Gökstorp  |  Dr. Martin Krämer  |  Markus Vatter
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende)  |  Klaus M. Bukenberger 
(Vorsitzender)


Bug in Solr 6.6.0? Cannot change DocValues type from SORTED_SET to SORTED

2017-08-30 Thread Stephan Schubert
After I tried an update from Solr 6.5.0 to Solr 6.6.0 (SolrCloud mode), I 
receive in one collection the following error:

"Cannot change DocValues type from SORTED_SET to SORTED for field 
"index_todelete". 

I had a look on the index values (if set all are true or not filled, 
checked via faceting in the working instance) and I can't see anything 
special issues on this field. In the case I move back to Solr 6.5.0 the 
Solr collection is coming up normal with the same set of index data. So I 
assume there was any change in 6.6.0 but couldn't find anything in the 
release notes nor in any known issues in JIRA.

Does anyone have an idea what's going on here? The field even doesn't have 
docValues set or multivalued, so I don't understand the error message 
here.

Configuration in schema.xml:



Error Log:
java.util.concurrent.ExecutionException: 
org.apache.solr.common.SolrException: Unable to create core 
[GLOBAL-Fileshares-Index_shard1_replica2]
 at 
java.util.concurrent.FutureTask.report(FutureTask.java:122)
 at 
java.util.concurrent.FutureTask.get(FutureTask.java:192)
 at 
org.apache.solr.core.CoreContainer.lambda$load$6(CoreContainer.java:586)
 at 
com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)
 at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
 at 
java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at 
org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229)
 at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: Unable to create core 
[GLOBAL-Fileshares-Index_shard1_replica2]
 at 
org.apache.solr.core.CoreContainer.create(CoreContainer.java:935)
 at 
org.apache.solr.core.CoreContainer.lambda$load$5(CoreContainer.java:558)
 at 
com.codahale.metrics.InstrumentedExecutorService$InstrumentedCallable.call(InstrumentedExecutorService.java:197)
 ... 5 more
Caused by: org.apache.solr.common.SolrException: Error opening new 
searcher
 at 
org.apache.solr.core.SolrCore.(SolrCore.java:977)
 at 
org.apache.solr.core.SolrCore.(SolrCore.java:830)
 at 
org.apache.solr.core.CoreContainer.create(CoreContainer.java:920)
 ... 7 more
Caused by: org.apache.solr.common.SolrException: Error opening new 
searcher
 at 
org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:2069)
 at 
org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:2189)
 at 
org.apache.solr.core.SolrCore.initSearcher(SolrCore.java:1071)
 at 
org.apache.solr.core.SolrCore.(SolrCore.java:949)
 ... 9 more
Caused by: java.lang.IllegalArgumentException: cannot change DocValues 
type from SORTED_SET to SORTED for field "index_todelete"
 at 
org.apache.lucene.index.FieldInfo.setDocValuesType(FieldInfo.java:212)
 at 
org.apache.lucene.index.FieldInfos$Builder.addOrUpdateInternal(FieldInfos.java:430)
 at 
org.apache.lucene.index.FieldInfos$Builder.add(FieldInfos.java:438)
 at 
org.apache.lucene.index.FieldInfos$Builder.add(FieldInfos.java:375)
 at 
org.apache.lucene.index.MultiFields.getMergedFieldInfos(MultiFields.java:245)
 at 
org.apache.solr.index.SlowCompositeReaderWrapper.getFieldInfos(SlowCompositeReaderWrapper.java:266)
 at 
org.apache.solr.search.SolrIndexSearcher.(SolrIndexSearcher.java:281)
 at 
org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:2037)
 ... 12 more

Bug in Solr 6.6.0? "Cannot change DocValues type from SORTED_SET to SORTED"

2017-08-30 Thread Stephan Schubert
After I tried an update from Solr 6.5.0 to Solr 6.6.0 (SolrCloud mode), I 
receive in one collection the following error:

"Cannot change DocValues type from SORTED_SET to SORTED for field 
"index_todelete". 

I had a look on the index values (if set all are true or not filled, 
checked via faceting in the working instance) and I can't see anything 
special issues on this field. In the case I move back to Solr 6.5.0 the 
Solr collection is coming up normal with the same set of index data. So I 
assume there was any change in 6.6.0 but couldn't find anything in the 
release notes nor in any known issues in JIRA.

Does anyone have an idea what's going on here? The field even doesn't have 
docValues set or multivalued, so I don't understand the error message 
here.

Configuration in schema.xml:



Error Log:
java.util.concurrent.ExecutionException: 
org.apache.solr.common.SolrException: Unable to create core 
[GLOBAL-Fileshares-Index_shard1_replica2]
 at 
java.util.concurrent.FutureTask.report(FutureTask.java:122)
 at 
java.util.concurrent.FutureTask.get(FutureTask.java:192)
 at 
org.apache.solr.core.CoreContainer.lambda$load$6(CoreContainer.java:586)
 at 
com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)
 at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
 at 
java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at 
org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229)
 at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: Unable to create core 
[GLOBAL-Fileshares-Index_shard1_replica2]
 at 
org.apache.solr.core.CoreContainer.create(CoreContainer.java:935)
 at 
org.apache.solr.core.CoreContainer.lambda$load$5(CoreContainer.java:558)
 at 
com.codahale.metrics.InstrumentedExecutorService$InstrumentedCallable.call(InstrumentedExecutorService.java:197)
 ... 5 more
Caused by: org.apache.solr.common.SolrException: Error opening new 
searcher
 at 
org.apache.solr.core.SolrCore.(SolrCore.java:977)
 at 
org.apache.solr.core.SolrCore.(SolrCore.java:830)
 at 
org.apache.solr.core.CoreContainer.create(CoreContainer.java:920)
 ... 7 more
Caused by: org.apache.solr.common.SolrException: Error opening new 
searcher
 at 
org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:2069)
 at 
org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:2189)
 at 
org.apache.solr.core.SolrCore.initSearcher(SolrCore.java:1071)
 at 
org.apache.solr.core.SolrCore.(SolrCore.java:949)
 ... 9 more
Caused by: java.lang.IllegalArgumentException: cannot change DocValues 
type from SORTED_SET to SORTED for field "index_todelete"
 at 
org.apache.lucene.index.FieldInfo.setDocValuesType(FieldInfo.java:212)
 at 
org.apache.lucene.index.FieldInfos$Builder.addOrUpdateInternal(FieldInfos.java:430)
 at 
org.apache.lucene.index.FieldInfos$Builder.add(FieldInfos.java:438)
 at 
org.apache.lucene.index.FieldInfos$Builder.add(FieldInfos.java:375)
 at 
org.apache.lucene.index.MultiFields.getMergedFieldInfos(MultiFields.java:245)
 at 
org.apache.solr.index.SlowCompositeReaderWrapper.getFieldInfos(SlowCompositeReaderWrapper.java:266)
 at 
org.apache.solr.search.SolrIndexSearcher.(SolrIndexSearcher.java:281)
 at 
org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:2037)
 ... 12 more

Antwort: Re: Bug in Solr 6.6.0? "Cannot change DocValues type from SORTED_SET to SORTED"

2017-08-31 Thread Stephan Schubert
No, not really. I'm wondering why on both Servers (each Collection has a 
replica on a different server) doesn't have a problem with it in 6.5., but 
if I update on Solr 6.6. on both instances the error occured. As I already 
said, If i revert the instances back to 6.5. everything seems to be fine. 
This is a little bit strange in my opinion ;)



Von:Erick Erickson 
An: solr-user 
Datum:  30.08.2017 21:34
Betreff:Re: Bug in Solr 6.6.0? "Cannot change DocValues type from 
SORTED_SET to SORTED"



P.S. Perhaps the defaults changed when you upgraded for some reason?

Erick

On Wed, Aug 30, 2017 at 11:15 AM, Erick Erickson
 wrote:
> This usually means you changed multiValued from true to false or vice
> versa then added more docs.
>
> So since each segment is its own "mini index", different segments have
> different expectations and when you query this error is thrown.
>
> Most of the time when you change a field's type in the schema you have
> to re-index from scratch. And I'd delete *:* first (or just use a new
> collection and alias).
>
> Best,
> Erick
>
> On Wed, Aug 30, 2017 at 10:04 AM, Stephan Schubert
>  wrote:
>> After I tried an update from Solr 6.5.0 to Solr 6.6.0 (SolrCloud mode), 
I
>> receive in one collection the following error:
>>
>> "Cannot change DocValues type from SORTED_SET to SORTED for field
>> "index_todelete".
>>
>> I had a look on the index values (if set all are true or not filled,
>> checked via faceting in the working instance) and I can't see anything
>> special issues on this field. In the case I move back to Solr 6.5.0 the
>> Solr collection is coming up normal with the same set of index data. So 
I
>> assume there was any change in 6.6.0 but couldn't find anything in the
>> release notes nor in any known issues in JIRA.
>>
>> Does anyone have an idea what's going on here? The field even doesn't 
have
>> docValues set or multivalued, so I don't understand the error message
>> here.
>>
>> Configuration in schema.xml:
>> > stored="true" type="boolean"/>
>>
>>
>> Error Log:
>> java.util.concurrent.ExecutionException:
>> org.apache.solr.common.SolrException: Unable to create core
>> [GLOBAL-Fileshares-Index_shard1_replica2]
>>  at
>> java.util.concurrent.FutureTask.report(FutureTask.java:122)
>>  at
>> java.util.concurrent.FutureTask.get(FutureTask.java:192)
>>  at
>> 
org.apache.solr.core.CoreContainer.lambda$load$6(CoreContainer.java:586)
>>  at
>> 
com.codahale.metrics.InstrumentedExecutorService$InstrumentedRunnable.run(InstrumentedExecutorService.java:176)
>>  at
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>>  at
>> java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>  at
>> 
org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229)
>>  at
>> 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>>  at
>> 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>>  at java.lang.Thread.run(Thread.java:745)
>> Caused by: org.apache.solr.common.SolrException: Unable to create core
>> [GLOBAL-Fileshares-Index_shard1_replica2]
>>  at
>> org.apache.solr.core.CoreContainer.create(CoreContainer.java:935)
>>  at
>> 
org.apache.solr.core.CoreContainer.lambda$load$5(CoreContainer.java:558)
>>  at
>> 
com.codahale.metrics.InstrumentedExecutorService$InstrumentedCallable.call(InstrumentedExecutorService.java:197)
>>  ... 5 more
>> Caused by: org.apache.solr.common.SolrException: Error opening new
>> searcher
>>  at
>> org.apache.solr.core.SolrCore.(SolrCore.java:977)
>>  at
>> org.apache.solr.core.SolrCore.(SolrCore.java:830)
>>  at
>> org.apache.solr.core.CoreContainer.create(CoreContainer.java:920)
>>  ... 7 more
>> Caused by: org.apache.solr.common.SolrException: Error opening new
>> searcher
>>  at
>> org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:2069)
>>  at
>> org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:2189)
>>  at
>> org.apache.solr.core.SolrCore.initSearcher(SolrCore.java:1071)
>>  at
>

Antwort: 6.6 Cannot talk to ZooKeeper - Updates are disabled.

2017-08-31 Thread Stephan Schubert
Hi markus,

try to stop your indexing/update processes and restart your ZooKeeper 
instances (not all at the same time of course). This is what I do in these 
cases and helped me so far.




Von:Markus Jelsma 
An: Solr-user 
Datum:  31.08.2017 09:49
Betreff:6.6 Cannot talk to ZooKeeper - Updates are disabled.



Hello,

One node is behaving badly, at least according to the logs, but the node 
is green in the cluster overview although the logs claim recovery fails 
all the time. It is not the first time this message pops up in the logs of 
one of the nodes, why can it not talk to Zookeeper? I miss a reason.

The cluster is not extremely busy at the moment, we allow plenty of file 
descriptors, there are no firewall restrictions, i cannot think of any 
problem in our infrastructure.

What's going on? What can i do? Can the error be explained a bit further?

Thanks,
Markus

8/31/2017, 9:34:34 AM
ERROR false
RequestHandlerBase
org.apache.solr.common.SolrException: Cannot talk to ZooKeeper - Updates 
are disabled.
8/31/2017, 9:34:34 AM
ERROR false
RequestHandlerBase
org.apache.solr.common.SolrException: Cannot talk to ZooKeeper - Updates 
are disabled.
8/31/2017, 9:34:36 AM
ERROR false
RequestHandlerBase
org.apache.solr.common.SolrException: Cannot talk to ZooKeeper - Updates 
are disabled.
8/31/2017, 9:34:38 AM
ERROR false
RecoveryStrategy
Could not publish as ACTIVE after succesful recovery
8/31/2017, 9:34:38 AM
ERROR true
RecoveryStrategy
Recovery failed - trying again... (0)
8/31/2017, 9:34:49 AM
ERROR false
RequestHandlerBase
org.apache.solr.common.SolrException: Cannot talk to ZooKeeper - Updates 
are disabled.
8/31/2017, 9:34:49 AM
ERROR false
RequestHandlerBase
org.apache.solr.common.SolrException: Cannot talk to ZooKeeper - Updates 
are disabled.
8/31/2017, 9:34:50 AM
ERROR false
RecoveryStrategy
Could not publish as ACTIVE after succesful recovery
8/31/2017, 9:34:50 AM
ERROR false
RecoveryStrategy
Recovery failed - trying again... (1)
8/31/2017, 9:35:36 AM
ERROR false
RequestHandlerBase
org.apache.solr.common.SolrException: Cannot talk to ZooKeeper - Updates 
are disabled.





Antwort: RE: Antwort: 6.6 Cannot talk to ZooKeeper - Updates are disabled.

2017-08-31 Thread Stephan Schubert
Hi Markus,

I don't know what Client you use, but if you are using SolrJ enabling the 
logging could be an option to "dig deeper" into the problem. This can be 
the ouput for example via log4j on log level info:

...
2017-08-31 10:01:56 INFO  ZooKeeper:438 - Initiating client connection, 
connectString=ZKHOST1:9983,ZKHOST2:9983,ZKHOST3:9983,ZKHOST4:9983,ZKHOST5:9983 
sessionTimeout=60 
watcher=org.apache.solr.common.cloud.SolrZkClient$3@14379273
2017-08-31 10:01:56 INFO  ClientCnxn:876 - Socket connection established 
to SOLRHOST/ZKHOST3:9983, initiating session
2017-08-31 10:01:56 INFO  ClientCnxn:1299 - Session establishment complete 
on server SOLRHOST/ZKHOST3:9983, sessionid = 0x45e35eaa9fd3584, negotiated 
timeout = 4
2017-08-31 10:01:56 INFO  ZkStateReader:688 - Updated live nodes from 
ZooKeeper... (0) -> (4)
2017-08-31 10:01:56 INFO  ZkClientClusterStateProvider:134 - Cluster at 
ZKHOST1:9983,ZKHOST2:9983,ZKHOST3:9983,ZKHOST4:9983,ZKHOST5:9983 ready





Von:Markus Jelsma 
An: solr-user@lucene.apache.org 
Datum:  31.08.2017 10:00
Betreff:RE: Antwort: 6.6 Cannot talk to ZooKeeper - Updates are 
disabled.



Hello Stephan,

I know that restarting stuff can sometimes cure what's wrong, but we are 
nog going to, we want to get rid of the problem, not restart microsoft 
windows whenever things run slow. Also, there is no indexing going on 
right now.

We also see these sometimes, this explains at least why it cannot talk to 
Zookeeper, but why..
 o.a.s.c.RecoveryStrategy Socket timeout on send prep recovery cmd, 
retrying.. 

This has been going on with just one of our nodes for over two hours, 
other nodes are fine. And why is this bad node green in cluster overview?

Thanks,
Markus

-Original message-
> From:Stephan Schubert 
> Sent: Thursday 31st August 2017 9:52
> To: solr-user@lucene.apache.org
> Subject: Antwort: 6.6 Cannot talk to ZooKeeper - Updates are disabled.
> 
> Hi markus,
> 
> try to stop your indexing/update processes and restart your ZooKeeper 
> instances (not all at the same time of course). This is what I do in 
these 
> cases and helped me so far.
> 
> 
> 
> 
> Von:Markus Jelsma 
> An: Solr-user 
> Datum:  31.08.2017 09:49
> Betreff:6.6 Cannot talk to ZooKeeper - Updates are disabled.
> 
> 
> 
> Hello,
> 
> One node is behaving badly, at least according to the logs, but the node 

> is green in the cluster overview although the logs claim recovery fails 
> all the time. It is not the first time this message pops up in the logs 
of 
> one of the nodes, why can it not talk to Zookeeper? I miss a reason.
> 
> The cluster is not extremely busy at the moment, we allow plenty of file 

> descriptors, there are no firewall restrictions, i cannot think of any 
> problem in our infrastructure.
> 
> What's going on? What can i do? Can the error be explained a bit 
further?
> 
> Thanks,
> Markus
> 
> 8/31/2017, 9:34:34 AM
> ERROR false
> RequestHandlerBase
> org.apache.solr.common.SolrException: Cannot talk to ZooKeeper - Updates 

> are disabled.
> 8/31/2017, 9:34:34 AM
> ERROR false
> RequestHandlerBase
> org.apache.solr.common.SolrException: Cannot talk to ZooKeeper - Updates 

> are disabled.
> 8/31/2017, 9:34:36 AM
> ERROR false
> RequestHandlerBase
> org.apache.solr.common.SolrException: Cannot talk to ZooKeeper - Updates 

> are disabled.
> 8/31/2017, 9:34:38 AM
> ERROR false
> RecoveryStrategy
> Could not publish as ACTIVE after succesful recovery
> 8/31/2017, 9:34:38 AM
> ERROR true
> RecoveryStrategy
> Recovery failed - trying again... (0)
> 8/31/2017, 9:34:49 AM
> ERROR false
> RequestHandlerBase
> org.apache.solr.common.SolrException: Cannot talk to ZooKeeper - Updates 

> are disabled.
> 8/31/2017, 9:34:49 AM
> ERROR false
> RequestHandlerBase
> org.apache.solr.common.SolrException: Cannot talk to ZooKeeper - Updates 

> are disabled.
> 8/31/2017, 9:34:50 AM
> ERROR false
> RecoveryStrategy
> Could not publish as ACTIVE after succesful recovery
> 8/31/2017, 9:34:50 AM
> ERROR false
> RecoveryStrategy
> Recovery failed - trying again... (1)
> 8/31/2017, 9:35:36 AM
> ERROR false
> RequestHandlerBase
> org.apache.solr.common.SolrException: Cannot talk to ZooKeeper - Updates 

> are disabled.
> 
> 
> 
> 





PathHierarchyTokenizerFactory storage for pivot facets

2014-01-05 Thread Stephan Schubert
I want to store the levels of an path/url in seperate fields to make use
of pivot faceting. I thought about using the
PathHierarchyTokenizerFactory for that. But how can I store the several
levels of an url in seperate fields?

Example:

Doc1 - Path: a/b/c/d
Doc2 - Path: f/g/h/i

Document 1 should store the value of a in a field something like
urllevel1, b in field
urllevel2, c in urllevel 3 and so on.
The same for document 2 like f in field urllevel1, g in urllevel2  and h
in urllevel3.

Is the PathHierarchyTokenizerFactory the right approach for that? I know
the PathHierarchyTokenizerFactory splits the path up, but I don't know
how I can store the several levels in the specific fields and set it up
in the schema.xml.