RE: Solr 6.4. Can't index MS Visio vsdx files

2017-02-03 Thread Gytis Mikuciunas
Thx guys for your ideas. I'll test and let you know.

Regards,

On Feb 3, 2017 22:31, "Allison, Timothy B."  wrote:

> This is a Tika/POI problem.  Please download tika-app 1.14 [1] or a
> nightly version of Tika [2] and run
>
> java -jar tika-app.jar 
>
> If the problem is fixed, we'll try to upgrade dependencies in Solr.  If it
> isn't fixed, please open a bug on Tika's Jira.
>
> If this is a missing bean issue (sorry, I can't tell from your stacktrace
> which class is missing), as a temporary workaround, you can rm
> "poi-ooxml-schemas" and add the full "ooxml-schemas", and you should be
> good to go. [3]
>
> Cheers,
>
>   Tim
>
> [1] http://www.apache.org/dyn/closer.cgi/tika/tika-app-1.14.jar
>
> [2] https://builds.apache.org/job/Tika-trunk/1193/org.apache.
> tika$tika-app/artifact/org.apache.tika/tika-app/1.15-
> 20170202.203920-124/tika-app-1.15-20170202.203920-124.jar
>
> [3] http://poi.apache.org/faq.html#faq-N10025
>
> -Original Message-
> From: Alexandre Rafalovitch [mailto:arafa...@gmail.com]
> Sent: Friday, February 3, 2017 9:49 AM
> To: solr-user 
> Subject: Re: Solr 6.4. Can't index MS Visio vsdx files
>
> This kind of information extraction comes from Apache Tika that is shipped
> with Solr. However Solr does not ship every possible parser with its
> installation. So, I think you are hitting Tika where it manages to figure
> out what type of content you have, but does not have (Apache POI - another
> O/S project) library installed.
>
> What you need to do is to get the additional jar from Tika/POI's
> project/download and make it visible to Solr (probably as an extension jar
> in a lib folder somewhere - I am a bit hazy on that for latest Solr).
>
> The version of Tika that Solr uses is part of the changes notes. For 6.4,
> it is https://github.com/apache/lucene-solr/blob/releases/
> lucene-solr/6.4.0/solr/CHANGES.txt
> and it is Tika 1.13
>
> Hope it helps,
>Alex.
> 
> http://www.solr-start.com/ - Resources for Solr users, new and experienced
>
>
> On 3 February 2017 at 05:57, Gytis Mikuciunas  wrote:
> > Hi,
> >
> >
> > I'm using single core Solr 6.4 instance on windows server (windows
> > server
> > 2012 R2 standard),
> > Java v8, (build 1.8.0_121-b13).
> >
> > All works more or less ok, except MS Visio vsdx files indexing.
> >
> >
> > Every time it throws an error (no matters if it tries to index vsdx
> > file or for example docx with visio diagram inside).
> >
> > Thx in advance for your help. If you need some additional info, please
> ask.
> >
> >
> > Error/Exception from log:
> >
> >
> >  Null:java.lang.RuntimeException: java.lang.NoClassDefFoundError:
> > Could not initialize class
> > org.apache.poi.xdgf.usermodel.section.geometry.GeometryRowFactory
> > at
> > org.apache.poi.xdgf.usermodel.section.GeometrySection.
> init(GeometrySection.java:55)
> > at
> > org.apache.poi.xdgf.usermodel.XDGFSheet.init(XDGFSheet.java:77)
> > at
> > org.apache.poi.xdgf.usermodel.XDGFShape.init(XDGFShape.java:113)
> > at
> > org.apache.poi.xdgf.usermodel.XDGFShape.init(XDGFShape.java:107)
> > at
> > org.apache.poi.xdgf.usermodel.XDGFBaseContents.onDocumentRead(
> XDGFBaseContents.java:82)
> > at
> > org.apache.poi.xdgf.usermodel.XDGFMasterContents.onDocumentRead(
> XDGFMasterContents.java:66)
> > at
> > org.apache.poi.xdgf.usermodel.XDGFMasters.onDocumentRead(
> XDGFMasters.java:101)
> > at
> > org.apache.poi.xdgf.usermodel.XmlVisioDocument.onDocumentRead(
> XmlVisioDocument.java:106)
> > at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:160)
> > at
> > org.apache.poi.xdgf.usermodel.XmlVisioDocument.init(
> XmlVisioDocument.java:79)
> > at
> > org.apache.poi.xdgf.extractor.XDGFVisioExtractor.init&
> gt;(XDGFVisioExtractor.java:41)
> > at
> > org.apache.poi.extractor.ExtractorFactory.createExtractor(
> ExtractorFactory.java:212)
> > at
> > org.apache.tika.parser.microsoft.ooxml.OOXMLExtractorFactory.parse(
> OOXMLExtractorFactory.java:86)
> > at
> > org.apache.tika.parser.microsoft.ooxml.OOXMLParser.
> parse(OOXMLParser.java:87)
> > at
> > org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
> > at
> > org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
> > at
> > org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)
> > at
> > org.apache.tika.parser.DelegatingParser.parse(DelegatingParser.java:72)
> > at
> > org.apache.tika.extractor.ParsingEmbeddedDocumentExtract
> or.parseEmbedded(ParsingEmbeddedDocumentExtractor.java:102)
> > at
> > org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor.
> handleEmbeddedFile(AbstractOOXMLExtractor.java:298)
> > at
> > org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor.
> handleEmbeddedParts(AbstractOOXMLExtractor.java:199)
> >  

Re: 6.3 Admin UI - Segments info tab doesn't draw deletions correctly

2017-02-03 Thread Shawn Heisey
On 2/3/2017 2:56 PM, Shawn Heisey wrote:
> Solr 6.3, not in cloud mode. 

> The admin UI has drawn the large segment such that it looks like
> almost the entire segment is deleted docs, which clearly isn't the
> case, as the hovertext shows.

I've got some different servers that are running 5.3.2-SNAPSHOT.  I
built that version from branch_5x on 2016-01-20.  The graphs look
correct there.

Thanks,
Shawn



6.3 Admin UI - Segments info tab doesn't draw deletions correctly

2017-02-03 Thread Shawn Heisey
Solr 6.3, not in cloud mode.

Here is a screenshot of the problematic UI:

https://www.dropbox.com/s/aehcgf20zb0du01/solr-6.3-segments.png?dl=0

The admin UI has drawn the large segment such that it looks like almost
the entire segment is deleted docs, which clearly isn't the case, as the
hovertext shows.

The second segment shown has 10426 docs in it, with 25 deletions, yet
the graph is drawn as if about a quarter of the docs are deleted.

Worth a Jira?  I am not in a position where I can check this with 6.4. 
I'd be interested in knowing whether 6.4 behaves the same.

Thanks,
Shawn



RE: Solr 6.4. Can't index MS Visio vsdx files

2017-02-03 Thread Allison, Timothy B.
This is a Tika/POI problem.  Please download tika-app 1.14 [1] or a nightly 
version of Tika [2] and run 

java -jar tika-app.jar 

If the problem is fixed, we'll try to upgrade dependencies in Solr.  If it 
isn't fixed, please open a bug on Tika's Jira.

If this is a missing bean issue (sorry, I can't tell from your stacktrace which 
class is missing), as a temporary workaround, you can rm "poi-ooxml-schemas" 
and add the full "ooxml-schemas", and you should be good to go. [3]

Cheers,

  Tim

[1] http://www.apache.org/dyn/closer.cgi/tika/tika-app-1.14.jar 

[2] 
https://builds.apache.org/job/Tika-trunk/1193/org.apache.tika$tika-app/artifact/org.apache.tika/tika-app/1.15-20170202.203920-124/tika-app-1.15-20170202.203920-124.jar

[3] http://poi.apache.org/faq.html#faq-N10025

-Original Message-
From: Alexandre Rafalovitch [mailto:arafa...@gmail.com] 
Sent: Friday, February 3, 2017 9:49 AM
To: solr-user 
Subject: Re: Solr 6.4. Can't index MS Visio vsdx files

This kind of information extraction comes from Apache Tika that is shipped with 
Solr. However Solr does not ship every possible parser with its installation. 
So, I think you are hitting Tika where it manages to figure out what type of 
content you have, but does not have (Apache POI - another O/S project) library 
installed.

What you need to do is to get the additional jar from Tika/POI's 
project/download and make it visible to Solr (probably as an extension jar in a 
lib folder somewhere - I am a bit hazy on that for latest Solr).

The version of Tika that Solr uses is part of the changes notes. For 6.4, it is 
https://github.com/apache/lucene-solr/blob/releases/lucene-solr/6.4.0/solr/CHANGES.txt
and it is Tika 1.13

Hope it helps,
   Alex.

http://www.solr-start.com/ - Resources for Solr users, new and experienced


On 3 February 2017 at 05:57, Gytis Mikuciunas  wrote:
> Hi,
>
>
> I'm using single core Solr 6.4 instance on windows server (windows 
> server
> 2012 R2 standard),
> Java v8, (build 1.8.0_121-b13).
>
> All works more or less ok, except MS Visio vsdx files indexing.
>
>
> Every time it throws an error (no matters if it tries to index vsdx 
> file or for example docx with visio diagram inside).
>
> Thx in advance for your help. If you need some additional info, please ask.
>
>
> Error/Exception from log:
>
>
>  Null:java.lang.RuntimeException: java.lang.NoClassDefFoundError: 
> Could not initialize class 
> org.apache.poi.xdgf.usermodel.section.geometry.GeometryRowFactory
> at
> org.apache.poi.xdgf.usermodel.section.GeometrySection.init(GeometrySection.java:55)
> at
> org.apache.poi.xdgf.usermodel.XDGFSheet.init(XDGFSheet.java:77)
> at
> org.apache.poi.xdgf.usermodel.XDGFShape.init(XDGFShape.java:113)
> at
> org.apache.poi.xdgf.usermodel.XDGFShape.init(XDGFShape.java:107)
> at
> org.apache.poi.xdgf.usermodel.XDGFBaseContents.onDocumentRead(XDGFBaseContents.java:82)
> at
> org.apache.poi.xdgf.usermodel.XDGFMasterContents.onDocumentRead(XDGFMasterContents.java:66)
> at
> org.apache.poi.xdgf.usermodel.XDGFMasters.onDocumentRead(XDGFMasters.java:101)
> at
> org.apache.poi.xdgf.usermodel.XmlVisioDocument.onDocumentRead(XmlVisioDocument.java:106)
> at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:160)
> at
> org.apache.poi.xdgf.usermodel.XmlVisioDocument.init(XmlVisioDocument.java:79)
> at
> org.apache.poi.xdgf.extractor.XDGFVisioExtractor.init(XDGFVisioExtractor.java:41)
> at
> org.apache.poi.extractor.ExtractorFactory.createExtractor(ExtractorFactory.java:212)
> at
> org.apache.tika.parser.microsoft.ooxml.OOXMLExtractorFactory.parse(OOXMLExtractorFactory.java:86)
> at
> org.apache.tika.parser.microsoft.ooxml.OOXMLParser.parse(OOXMLParser.java:87)
> at
> org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
> at
> org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
> at
> org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)
> at
> org.apache.tika.parser.DelegatingParser.parse(DelegatingParser.java:72)
> at
> org.apache.tika.extractor.ParsingEmbeddedDocumentExtractor.parseEmbedded(ParsingEmbeddedDocumentExtractor.java:102)
> at
> org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor.handleEmbeddedFile(AbstractOOXMLExtractor.java:298)
> at
> org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor.handleEmbeddedParts(AbstractOOXMLExtractor.java:199)
> at
> org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor.getXHTML(AbstractOOXMLExtractor.java:112)
> at
> org.apache.tika.parser.microsoft.ooxml.OOXMLExtractorFactory.parse(OOXMLExtractorFactory.java:112)
> at
> org.apache.tika.parser.microsoft.ooxml.OOXMLParser.parse(OOXMLParser.java:87)
> at
> 

RE: Promote documents if they are present in the search results

2017-02-03 Thread Alexandre Drouin
Hi Alexandre,

A boost should works for my needs.

Thanks!

Alexandre Drouin


-Original Message-
From: Alexandre Rafalovitch [mailto:arafa...@gmail.com] 
Sent: February 3, 2017 12:14 PM
To: solr-user 
Subject: Re: Promote documents if they are present in the search results
Importance: High

Could you do a basic boost query with a list of all those document ids. If they 
are in results, their relevance is boosted. If they are not, they are just 
ignored.

You could have that boost query configured in the solrconfig.xml or passed in 
by a client.

Regards,
   Alex

http://www.solr-start.com/ - Resources for Solr users, new and experienced


On 3 February 2017 at 12:06, Alexandre Drouin  
wrote:
> Hello,
>
> I am developing a new feature in my product where an administrator can select 
> a list of documents for different sections of the application.  You can think 
> of this feature as the classic categorization in an e-commerce site (e.g.: 
> Boots, Headgear, etc).  Since this categorization is different depending on 
> the section/category I cannot easily store which documents are promoted in 
> Solr itself.  I know ahead of time which documents should be promoted for 
> which section so I would like to know if there is a way to "pass" these 
> documents to Solr and have them at the top of the list if they are found in 
> the search results.
>
> For example let's say that I have the following documents:
> - Doc1 (name: A, Age: 12)
> - Doc2 (name: B, Age: 24)
> - Doc3 (name: C, Age: 36)
>
> I would like to promote Doc3 at the top of the list and if someone search for 
> "name:B" or "Age:12" the results should not include Doc3 because it did not 
> match the query.
>
> I looked at QueryElevationComponent and it doesn't do exactly what I want: 
> the component is based on a "query" and this query can be different in my use 
> case.  I know I can use the "elevatedIds" parameter to elevate documents 
> however they are always elevated even if they are not present in the search 
> results.
>
> Is it possible to achieve what I need with Solr? I am using Solr 
> 4.10.2
>
> Thanks!
>
>
> Alexandre Drouin


Re: backward compatibility of Solr 6.3 version with old Sol4j clients

2017-02-03 Thread Shawn Heisey
On 2/3/2017 10:12 AM, Suresh Pendap wrote:
> Will Solrj client 4.10.3 version work with Solr 6.3 version of the
> server? I was trying to look up the documentation but no where the
> compatibility matrix between server and client is provided. Has some
> one already used this combination?

If it's HttpSolrServer (HttpSolrClient in newer versions), chances are
good that it will work.  The basic http API in Solr does not change
quickly.  If you run into problems, provide detailed information here or
on the IRC channel and we'll try to help you work through them.

I have done quite a bit of version mismatching with the http client. 
Currently I have code with the 6.x client that connects to 4.x, 5.x, and
6.x servers.  I have also used older clients with newer servers and had
no issues.

If it's CloudSolrServer (CloudSolrClient in newer versions), I wouldn't
even try to make it work with that wide a version discrepancy. 
SolrCloud has evolved so rapidly over the last couple of years that
connecting different client and server versions may not work at all. 
For best compatibility, they should be identical versions.  If they
aren't, SolrJ should be newer than Solr, be from the same major version,
and not be offset by more than one or two minor releases.

Thanks,
Shawn



Re: Collection overview page needs more info

2017-02-03 Thread Walter Underwood
I was cleaning up a replica on a dead node, so active/down was what I needed. 
Leader seems like it could be useful.

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


> On Feb 3, 2017, at 10:18 AM, Erick Erickson  wrote:
> 
> I thought (but can't check now) that there were some filters in one of
> the views for "only down nodes", "only recovering nodes" and the like.
> Don't remember "only leaders" though
> 
> On Fri, Feb 3, 2017 at 10:09 AM, Walter Underwood  
> wrote:
>> It would be great if the collection-overview page showed which cores are 
>> leaders and active/down without opening the shard info. It is quite a 
>> treasure hunt to find the down shard in a big collection.
>> 
>> As far as I can tell, this is the only place to get the replica name needed 
>> for the DELETEREPLICA command. Also, why is that not the core name?
>> 
>> http://solr-cloud.test.cheggnet.com:8983/solr/#/questions/collection-overview
>>  
>> 
>> 
>> wunder
>> Walter Underwood
>> wun...@wunderwood.org
>> http://observer.wunderwood.org/  (my blog)
>> 
>> 



Log display in new UI has problems

2017-02-03 Thread Walter Underwood
Is this a known bug?

Open the stack trace for a log line. When it refreshes, the log trace is 
closed. Formatting is too wide, too. This makes the log display unusable. I 
have to switch to the old UI to look at logs.

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




Re: custom plugin version

2017-02-03 Thread Erick Erickson
The plugin itself is responsible for returning information about
itself via an overridden method IIRC, so you have control over what
version is reported.

As for the other, a slight variant on King's process would be to put
your custom jars in a different directory then used the 
directive in solrconfig to explicitly load a specific jar rather than
the regex. But separate directories would work as well, a matter of
taste really.

Best,
Erick

On Fri, Feb 3, 2017 at 8:21 AM, King Rhoton  wrote:
> What we ended up doing was creating separate directories for each version of 
> a plugin we had written, and in each collection's solrconfig,xml, we add the 
> path to the specific directory we wanted that collection to use via the " dir=..." tag.
>
>> On Feb 3, 2017, at 2:40 AM, Andrea Gazzarini  wrote:
>>
>> Hi Zaccheo,
>> I don't think this is possible, this is something related with the 
>> classloader behavior, and even if there's a "priority" rule in the JVM, I 
>> wouldn't rely on that in my application.
>> That could be good in a dev environment where you can specify the "order" of 
>> the imported libraries (e.g. Eclipse), but definitely not so good outside 
>> (IMO).
>>
>> As far as I know, there's no a built-in way to declare the version of custom 
>> components, but you could adopt the same approach of Lucene, with something 
>> like a Version class that drives the behavior of your component.
>> In this way you will have
>>
>> * always one jar (better: unique classes FQNs), so no classloader issues
>> * a behavior that changes depending on the configuration
>>
>> Best,
>> Andrea
>>
>> On 03/02/17 10:57, Zaccheo Bagnati wrote:
>>> Hi all,
>>> I developed a custom DocTransformer that is loaded from a .jar in the core
>>> "lib" directory. It works but I have now a problem with versioning:
>>> 1. if lib directory contains different versions of the same .jar which one
>>> is loaded? I tried putting both myplugins-1.0.0.jar and myplugins-1.0.1.jar
>>> and I noticed that the oldest one is loaded. Is there a way to force
>>> specific jar version to be loaded in solrconfig?
>>> 2. More in general: is it possible to expose in solr the version number for
>>> custom plugins?
>>> Thank you in advance
>>>
>>
>
>
> -
> King Rhoton, c/o Adobe, 601 Townsend, SF, CA 94103
> 415-832-4480 x24480
> S support requests should go to search-...@adobe.com
>


Re: Collection overview page needs more info

2017-02-03 Thread Erick Erickson
I thought (but can't check now) that there were some filters in one of
the views for "only down nodes", "only recovering nodes" and the like.
Don't remember "only leaders" though

On Fri, Feb 3, 2017 at 10:09 AM, Walter Underwood  wrote:
> It would be great if the collection-overview page showed which cores are 
> leaders and active/down without opening the shard info. It is quite a 
> treasure hunt to find the down shard in a big collection.
>
> As far as I can tell, this is the only place to get the replica name needed 
> for the DELETEREPLICA command. Also, why is that not the core name?
>
> http://solr-cloud.test.cheggnet.com:8983/solr/#/questions/collection-overview 
> 
>
> wunder
> Walter Underwood
> wun...@wunderwood.org
> http://observer.wunderwood.org/  (my blog)
>
>


Collection overview page needs more info

2017-02-03 Thread Walter Underwood
It would be great if the collection-overview page showed which cores are 
leaders and active/down without opening the shard info. It is quite a treasure 
hunt to find the down shard in a big collection.

As far as I can tell, this is the only place to get the replica name needed for 
the DELETEREPLICA command. Also, why is that not the core name?

http://solr-cloud.test.cheggnet.com:8983/solr/#/questions/collection-overview 


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




Re: Promote documents if they are present in the search results

2017-02-03 Thread Alexandre Rafalovitch
Could you do a basic boost query with a list of all those document
ids. If they are in results, their relevance is boosted. If they are
not, they are just ignored.

You could have that boost query configured in the solrconfig.xml or
passed in by a client.

Regards,
   Alex

http://www.solr-start.com/ - Resources for Solr users, new and experienced


On 3 February 2017 at 12:06, Alexandre Drouin
 wrote:
> Hello,
>
> I am developing a new feature in my product where an administrator can select 
> a list of documents for different sections of the application.  You can think 
> of this feature as the classic categorization in an e-commerce site (e.g.: 
> Boots, Headgear, etc).  Since this categorization is different depending on 
> the section/category I cannot easily store which documents are promoted in 
> Solr itself.  I know ahead of time which documents should be promoted for 
> which section so I would like to know if there is a way to "pass" these 
> documents to Solr and have them at the top of the list if they are found in 
> the search results.
>
> For example let's say that I have the following documents:
> - Doc1 (name: A, Age: 12)
> - Doc2 (name: B, Age: 24)
> - Doc3 (name: C, Age: 36)
>
> I would like to promote Doc3 at the top of the list and if someone search for 
> "name:B" or "Age:12" the results should not include Doc3 because it did not 
> match the query.
>
> I looked at QueryElevationComponent and it doesn't do exactly what I want: 
> the component is based on a "query" and this query can be different in my use 
> case.  I know I can use the "elevatedIds" parameter to elevate documents 
> however they are always elevated even if they are not present in the search 
> results.
>
> Is it possible to achieve what I need with Solr? I am using Solr 4.10.2
>
> Thanks!
>
>
> Alexandre Drouin


backward compatibility of Solr 6.3 version with old Sol4j clients

2017-02-03 Thread Suresh Pendap
Hi,

Will Solrj client 4.10.3 version work with  Solr 6.3 version of the server?   I 
was trying to look up the documentation but no where the compatibility matrix 
between server and client is provided.
Has some one already used this combination?

Regards
Suresh



Promote documents if they are present in the search results

2017-02-03 Thread Alexandre Drouin
Hello,

I am developing a new feature in my product where an administrator can select a 
list of documents for different sections of the application.  You can think of 
this feature as the classic categorization in an e-commerce site (e.g.: Boots, 
Headgear, etc).  Since this categorization is different depending on the 
section/category I cannot easily store which documents are promoted in Solr 
itself.  I know ahead of time which documents should be promoted for which 
section so I would like to know if there is a way to "pass" these documents to 
Solr and have them at the top of the list if they are found in the search 
results.

For example let's say that I have the following documents:
- Doc1 (name: A, Age: 12)
- Doc2 (name: B, Age: 24)
- Doc3 (name: C, Age: 36)

I would like to promote Doc3 at the top of the list and if someone search for 
"name:B" or "Age:12" the results should not include Doc3 because it did not 
match the query.

I looked at QueryElevationComponent and it doesn't do exactly what I want: the 
component is based on a "query" and this query can be different in my use case. 
 I know I can use the "elevatedIds" parameter to elevate documents however they 
are always elevated even if they are not present in the search results.

Is it possible to achieve what I need with Solr? I am using Solr 4.10.2 

Thanks!


Alexandre Drouin


Issues with uniqueKey != id?

2017-02-03 Thread Matthias X Falkenberg
Howdy,

In the Solr Wiki I stumbled upon a somewhat vague statement on the 
uniqueKey:

>  https://wiki.apache.org/solr/SchemaXml#The_Unique_Key_Field
>  It shouldn't matter whether you rename this to something else (and 
change the  value), but occasionally it has in the past. We 
recommend that you just leave this definition alone. 

I'd be very grateful for any positive or negative experiences with 
"uniqueKey" not being set to "id" - especially if your experiences are 
related to Solr 6.2.1+.

Many thanks,

Matthias Falkenberg

IBM Deutschland Research & Development GmbH / Vorsitzende des 
Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, 
HRB 243294



Re: Solr 6.4 new SynonymGraphFilter help for multi-word synonyms

2017-02-03 Thread David Smiley
Solr _does_ have a query parser that doesn't suffer from this problem --
SimpleQParser chosen as the string "simple".
https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-SimpleQueryParser
In this case, see the "WHITESPACE" operator feature which can be toggled.
Configure to be _not_ an operator so that whitespace is processed by the
underlying Analyzer to get proper multi-word handling.  This is a very fine
query parser, IMO; much simpler than any other that has it's feature set.
Though you still might need dismax/edismax.

On Thu, Feb 2, 2017 at 1:17 PM Cliff Dickinson 
wrote:

> Steve and Shawn, thanks for your replies/explanations!
>
> I eagerly await the completion of the Solr JIRA ticket referenced above in
> a future release.  Many thanks for addressing this challenge that has had
> me banging my head against my desk off and on for the last couple years!
>
> Cliff
>
> On Thu, Feb 2, 2017 at 1:01 PM, Steve Rowe  wrote:
>
> > Hi Cliff,
> >
> > The Solr query parsers (standard/“Lucene” and e/dismax anyway) have a
> > problem that prevents SynonymGraphFilter from working: the text fed to
> your
> > query analyzer is first split on whitespace.  So e.g. a query containing
> > “United States” will never match multi-word synonym “United
> States”->”US”,
> > since the analyzer will fist see “United” and then, separately, “States”.
> >
> > I fixed the whitespace splitting problem in the classic Lucene query
> > parser in .  (Note
> > that this is *not* the same as Solr’s standard/“Lucene” query parser,
> which
> > is actually a fork of Lucene’s query parser with added functionality.)
> >
> > There is a Solr JIRA I’m working on to fix the whitespace splitting
> > problem: .  I hope to
> > get it committed in time for inclusion in Solr 6.5.
> >
> > --
> > Steve
> > www.lucidworks.com
> >
> > > On Feb 2, 2017, at 9:50 AM, Shawn Heisey  wrote:
> > >
> > > On 2/2/2017 7:36 AM, Cliff Dickinson wrote:
> > >> The SynonymGraphFilter API documentation contains the following
> > statement
> > >> at the end:
> > >>
> > >> "To get fully correct positional queries when your synonym
> replacements
> > are
> > >> multiple tokens, you should instead apply synonyms using this
> > TokenFilter
> > >> at query time and translate the resulting graph to a
> TermAutomatonQuery
> > >> e.g. using TokenStreamToTermAutomatonQuery."
> > >
> > > Lucene is a programming API for search.  That documentation is intended
> > > for people who are writing Lucene programs.  Those users would be
> > > constructing query objects in their own code, so they would most likely
> > > know exactly which object needs to be changed to TermAutomatonQuery.
> > >
> > > Solr is a Lucene program ... and an immensely complicated one.  Many
> > > Lucene improvements require changes in the end program for full
> > > support.  I suspect that Solr's capability has not been updated to use
> > > this new feature in Lucene.  I cannot say for sure, I hope someone who
> > > is familiar with this Lucene change and Solr internals can comment.
> > >
> > > Thanks,
> > > Shawn
> > >
> >
> >
>
-- 
Lucene/Solr Search Committer, Consultant, Developer, Author, Speaker
LinkedIn: http://linkedin.com/in/davidwsmiley | Book:
http://www.solrenterprisesearchserver.com


Re: custom plugin version

2017-02-03 Thread King Rhoton
What we ended up doing was creating separate directories for each version of a 
plugin we had written, and in each collection's solrconfig,xml, we add the path 
to the specific directory we wanted that collection to use via the " On Feb 3, 2017, at 2:40 AM, Andrea Gazzarini  wrote:
> 
> Hi Zaccheo,
> I don't think this is possible, this is something related with the 
> classloader behavior, and even if there's a "priority" rule in the JVM, I 
> wouldn't rely on that in my application.
> That could be good in a dev environment where you can specify the "order" of 
> the imported libraries (e.g. Eclipse), but definitely not so good outside 
> (IMO).
> 
> As far as I know, there's no a built-in way to declare the version of custom 
> components, but you could adopt the same approach of Lucene, with something 
> like a Version class that drives the behavior of your component.
> In this way you will have
> 
> * always one jar (better: unique classes FQNs), so no classloader issues
> * a behavior that changes depending on the configuration
> 
> Best,
> Andrea
> 
> On 03/02/17 10:57, Zaccheo Bagnati wrote:
>> Hi all,
>> I developed a custom DocTransformer that is loaded from a .jar in the core
>> "lib" directory. It works but I have now a problem with versioning:
>> 1. if lib directory contains different versions of the same .jar which one
>> is loaded? I tried putting both myplugins-1.0.0.jar and myplugins-1.0.1.jar
>> and I noticed that the oldest one is loaded. Is there a way to force
>> specific jar version to be loaded in solrconfig?
>> 2. More in general: is it possible to expose in solr the version number for
>> custom plugins?
>> Thank you in advance
>> 
> 


-
King Rhoton, c/o Adobe, 601 Townsend, SF, CA 94103
415-832-4480 x24480
S support requests should go to search-...@adobe.com



Re: Solr 6.4.0 and deprecated SynonymFilterFactory

2017-02-03 Thread Alexandre Rafalovitch
I have a partial answer. The Javadoc talks about deprecation:
https://lucene.apache.org/core/6_4_0/analyzers-common/org/apache/lucene/analysis/synonym/SynonymFilterFactory.html

So, we are now supposed to use Graph and then Flatten filters in the
configuration. But there was another email earlier on this list that
maybe that's still slightly raw (or needs more clarity).

So, I would say it is safe to ignore that warning for now if you want.

Regards,
   Alex.

http://www.solr-start.com/ - Resources for Solr users, new and experienced


On 3 February 2017 at 01:26, Ere Maijala  wrote:
> Hi,
>
> on startup Solr 6.4.0 logs the following warning:
>
> o.a.s.c.SolrResourceLoader Solr loaded a deprecated plugin/analysis class
> [solr.SynonymFilterFactory]. Please consult documentation how to replace it
> accordingly.
>
> What documentation? As far as I can see, there's nothing at
> 
> or
> 
> nor did a quick Google search come up with anything definitive.
>
> Am I looking in the wrong places or does the mentioned documentation exist
> at all?
>
> --Ere


Re: Solr 6.4. Can't index MS Visio vsdx files

2017-02-03 Thread Alexandre Rafalovitch
This kind of information extraction comes from Apache Tika that is
shipped with Solr. However Solr does not ship every possible parser
with its installation. So, I think you are hitting Tika where it
manages to figure out what type of content you have, but does not have
(Apache POI - another O/S project) library installed.

What you need to do is to get the additional jar from Tika/POI's
project/download and make it visible to Solr (probably as an extension
jar in a lib folder somewhere - I am a bit hazy on that for latest
Solr).

The version of Tika that Solr uses is part of the changes notes. For
6.4, it is 
https://github.com/apache/lucene-solr/blob/releases/lucene-solr/6.4.0/solr/CHANGES.txt
and it is Tika 1.13

Hope it helps,
   Alex.

http://www.solr-start.com/ - Resources for Solr users, new and experienced


On 3 February 2017 at 05:57, Gytis Mikuciunas  wrote:
> Hi,
>
>
> I'm using single core Solr 6.4 instance on windows server (windows server
> 2012 R2 standard),
> Java v8, (build 1.8.0_121-b13).
>
> All works more or less ok, except MS Visio vsdx files indexing.
>
>
> Every time it throws an error (no matters if it tries to index vsdx file or
> for example docx with visio diagram inside).
>
> Thx in advance for your help. If you need some additional info, please ask.
>
>
> Error/Exception from log:
>
>
>  Null:java.lang.RuntimeException: java.lang.NoClassDefFoundError: Could not
> initialize class
> org.apache.poi.xdgf.usermodel.section.geometry.GeometryRowFactory
> at
> org.apache.poi.xdgf.usermodel.section.GeometrySection.init(GeometrySection.java:55)
> at
> org.apache.poi.xdgf.usermodel.XDGFSheet.init(XDGFSheet.java:77)
> at
> org.apache.poi.xdgf.usermodel.XDGFShape.init(XDGFShape.java:113)
> at
> org.apache.poi.xdgf.usermodel.XDGFShape.init(XDGFShape.java:107)
> at
> org.apache.poi.xdgf.usermodel.XDGFBaseContents.onDocumentRead(XDGFBaseContents.java:82)
> at
> org.apache.poi.xdgf.usermodel.XDGFMasterContents.onDocumentRead(XDGFMasterContents.java:66)
> at
> org.apache.poi.xdgf.usermodel.XDGFMasters.onDocumentRead(XDGFMasters.java:101)
> at
> org.apache.poi.xdgf.usermodel.XmlVisioDocument.onDocumentRead(XmlVisioDocument.java:106)
> at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:160)
> at
> org.apache.poi.xdgf.usermodel.XmlVisioDocument.init(XmlVisioDocument.java:79)
> at
> org.apache.poi.xdgf.extractor.XDGFVisioExtractor.init(XDGFVisioExtractor.java:41)
> at
> org.apache.poi.extractor.ExtractorFactory.createExtractor(ExtractorFactory.java:212)
> at
> org.apache.tika.parser.microsoft.ooxml.OOXMLExtractorFactory.parse(OOXMLExtractorFactory.java:86)
> at
> org.apache.tika.parser.microsoft.ooxml.OOXMLParser.parse(OOXMLParser.java:87)
> at
> org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
> at
> org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
> at
> org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)
> at
> org.apache.tika.parser.DelegatingParser.parse(DelegatingParser.java:72)
> at
> org.apache.tika.extractor.ParsingEmbeddedDocumentExtractor.parseEmbedded(ParsingEmbeddedDocumentExtractor.java:102)
> at
> org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor.handleEmbeddedFile(AbstractOOXMLExtractor.java:298)
> at
> org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor.handleEmbeddedParts(AbstractOOXMLExtractor.java:199)
> at
> org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor.getXHTML(AbstractOOXMLExtractor.java:112)
> at
> org.apache.tika.parser.microsoft.ooxml.OOXMLExtractorFactory.parse(OOXMLExtractorFactory.java:112)
> at
> org.apache.tika.parser.microsoft.ooxml.OOXMLParser.parse(OOXMLParser.java:87)
> at
> org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
> at
> org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
> at
> org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)
> at
> org.apache.solr.handler.extraction.ExtractingDocumentLoader.load(ExtractingDocumentLoader.java:228)
> at
> org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:68)
> at
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:166)
> at org.apache.solr.core.SolrCore.execute(SolrCore.java:2306)
> at
> org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:658)
> at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:464)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:345)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:296)
> at
> 

Re: Collection will not replicate

2017-02-03 Thread tedsolr
I brought down the afflicted servers, waited 5 min, then brought them back up
very slowly. That fixed the problem. The bad shard was assigned a leader.
Great advice as usual.

Erick Erickson wrote
> Yes. If indexing went through you'd lose docs so indexing will fail.
> Querying will fail too unless you set shards.tolerant.
> 
> You really wouldn't want your docs lost is the reasoning.
> 
> On Feb 2, 2017 6:56 AM, "tedsolr" 

> tsmith@

>  wrote:
> 
>> Can I assume that without a leader the shard will not respond to write
>> requests? I can search on the collection. If I can't update docs or add
>> any
>> new docs then this becomes an emergency.
>>
>>
>> Erick Erickson wrote
>> > It's worth a try to take down your entire cluster. Bring one machine
>> > back up at a time. There _may_ be something like a 3 minute wait
>> > before each of the replicas on that machine come up, the leader
>> > election process has a 180 second delay before the replicas on that
>> > node take over leadership to wait for the last known good leader to
>> > come up.
>> >
>> > Continue bringing one node up at a time and wait patiently  until all
>> > the replicas on it are green and until you have a leader for each
>> > shard elected. Bringing up the rest of the Solr nodes should be
>> > quicker then.
>> >
>> > Be sure to sequence things so you have known good Solr nodes come up
>> > first for the shard that's wonky. By that I mean that the first node
>> > you bring up for the leaderless shard should be the one with the best
>> > chance of having a totally OK index.
>> >
>> >
>> > Let's claim that the above does bring up a leader for each shard. If
>> > you still have a replica that refuses to come up, use the
>> > DELETEREPLICA command to remove it. Just for insurance, I'd take the
>> > Solr node down after the DELETEREPLICA and remove the entire core
>> > directory for the replica that didn't come up. Then restart the node
>> > and use the ADDREPLICA collections API command to put it back.
>> >
>> > If none of that works, you could try hand-editing the state.json file
>> > and _make_ one of the shards a leader (I'd do this with the Solr nodes
>> > down), but that's not for the faint of heart.
>> >
>> > Best,
>> > Erick
>> >
>> > On Wed, Feb 1, 2017 at 1:57 PM, Jeff Wartes 
>>
>> > jwartes@
>>
>> >  wrote:
>> >> Sounds similar to a thread last year:
>> >> http://lucene.472066.n3.nabble.com/Node-not-
>> recovering-leader-elections-not-occuring-tp4287819p4287866.html
>> >>
>> >>
>> >>
>> >> On 2/1/17, 7:49 AM, "tedsolr" 
>>
>> > tsmith@
>>
>> >  wrote:
>> >>
>> >> I have version 5.2.1. Short of an upgrade, are there any remedies?
>> >>
>> >>
>> >> Erick Erickson wrote
>> >> > What version of Solr? since 5.4 there's been a FORCELEADER
>> >> colelctions
>> >> > API call that might help.
>> >> >
>> >> > I'd run it with the newly added replicas offline. you only want
>> it
>> >> to
>> >> > have good replicas to choose from.
>> >> >
>> >> > Best,
>> >> > Erick
>> >> >
>> >> > On Wed, Feb 1, 2017 at 6:48 AM, tedsolr 
>> >>
>> >> > tsmith@
>> >>
>> >> >  wrote:
>> >> >> Update! I did find an error:
>> >> >>
>> >> >> 2017-02-01 09:23:22.673 ERROR org.apache.solr.common.
>> SolrException
>> >> >> :org.apache.solr.common.SolrException: Error getting leader
>> from
>> >> zk for
>> >> >> shard shard1
>> >> >> 
>> >> >> Caused by: org.apache.solr.common.SolrException: Could not get
>> >> leader
>> >> >> props
>> >> >> at
>> >> >>
>> >> org.apache.solr.cloud.ZkController.getLeaderProps(
>> ZkController.java:1040)
>> >> >> at
>> >> >>
>> >> org.apache.solr.cloud.ZkController.getLeaderProps(
>> ZkController.java:1004)
>> >> >> at
>> >> >>
>> >> org.apache.solr.cloud.ZkController.getLeader(ZkController.java:960)
>> >> >> ... 14 more
>> >> >> Caused by:
>> org.apache.zookeeper.KeeperException$NoNodeException:
>> >> >> KeeperErrorCode = NoNode for
>> /collections/colname/leaders/shard1
>> >> >> at
>> >> >>
>> >> org.apache.zookeeper.KeeperException.create(KeeperException.java:111)
>> >> >>
>> >> >> When I view the cluster status I see that this shard does not
>> have
>> >> a
>> >> >> leader.
>> >> >> So it appears I need to force the leader designation to the
>> >> "active"
>> >> >> replica. How do I do that?
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >> http://lucene.472066.n3.nabble.com/Collection-will-not-replicate-
>> tp4318260p4318265.html
>> >> >> Sent from the Solr - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >> http://lucene.472066.n3.nabble.com/Collection-will-not-replicate-
>> tp4318260p4318283.html
>> >> Sent from the Solr - User mailing list archive at Nabble.com.
>> >>
>> >>
>>
>>
>>
>>

Re: Custom token filter in SolrCloud mode using Blob store

2017-02-03 Thread Michal Hlavac
I get it: Schema components do not yet support the Blob Store.

thanks

On piatok, 3. februára 2017 10:28:27 CET Michal Hlavac wrote:
> Hi,
> 
> it is possible to use BlobStore & Config API with enabled.runtime.lib=true to 
> add custom token filters?
> I tried, but it doesn't work.
> 
> 1. Uploaded jar lucene-analyzers-morfologik-6.4.0.jar file to blob store 
> .system with name lucene-analyzers-morfologik-6.4.0
> 
> 2. Add runtime library {"add-runtimelib": { 
> "name":"lucene-analyzers-morfologik-6.4.0", "version":1 }}
> 
> 3. Create custom field type:
> curl -X POST -H 'Content-type:application/json' --data-binary '{
>   "add-field-type" : {
>  "name":"txt_sk_lemma",
>  "class":"solr.TextField",
>  "positionIncrementGap":"100",
>  "analyzer" : {
> "tokenizer":{ 
>"class":"solr.StandardTokenizerFactory" },
> "filters":[
>{
>"class":"solr.SynonymFilterFactory",
>"synonyms":"synonyms.txt",
>"ignoreCase":true,
>"expand":false
>},
>{
>"class":"solr.StopFilterFactory",
>"ignoreCase":true,
>"words":"lang/stopwords_sk.txt"
>},
>{
>"class":"solr.LowerCaseFilterFactory"
>},
>{
>"class":"solr.KeywordMarkerFilterFactory",
>"protected":"protwords.txt"
>},
>{
>"runtimeLib":true,
>
> "class":"org.apache.lucene.analysis.morfologik.MorfologikFilterFactory",
>"dictionary":"morfologik/stemming/sk/sk.dict"
>}
> ]}}
> }' http://localhost:8983/solr/default/schema
> 
> I get error
> 
> "errorMessages":["Plugin init failure for [schema.xml] fieldType\nPlugin init 
> failure for [schema.xml] analyzer/filter: Error loading class 
> 'org.apache.lucene.analysis.morfologik.MorfologikFilterFactory'\nError 
> loading class 
> 'org.apache.lucene.analysis.morfologik.MorfologikFilterFactory'\norg.apache.lucene.analysis.morfologik.MorfologikFilterFactory\n"
> 
> 
> thanks, miso
> 



Solr 6.4. Can't index MS Visio vsdx files

2017-02-03 Thread Gytis Mikuciunas
Hi,


I'm using single core Solr 6.4 instance on windows server (windows server
2012 R2 standard),
Java v8, (build 1.8.0_121-b13).

All works more or less ok, except MS Visio vsdx files indexing.


Every time it throws an error (no matters if it tries to index vsdx file or
for example docx with visio diagram inside).

Thx in advance for your help. If you need some additional info, please ask.


Error/Exception from log:


 Null:java.lang.RuntimeException: java.lang.NoClassDefFoundError: Could not
initialize class
org.apache.poi.xdgf.usermodel.section.geometry.GeometryRowFactory
at
org.apache.poi.xdgf.usermodel.section.GeometrySection.init(GeometrySection.java:55)
at
org.apache.poi.xdgf.usermodel.XDGFSheet.init(XDGFSheet.java:77)
at
org.apache.poi.xdgf.usermodel.XDGFShape.init(XDGFShape.java:113)
at
org.apache.poi.xdgf.usermodel.XDGFShape.init(XDGFShape.java:107)
at
org.apache.poi.xdgf.usermodel.XDGFBaseContents.onDocumentRead(XDGFBaseContents.java:82)
at
org.apache.poi.xdgf.usermodel.XDGFMasterContents.onDocumentRead(XDGFMasterContents.java:66)
at
org.apache.poi.xdgf.usermodel.XDGFMasters.onDocumentRead(XDGFMasters.java:101)
at
org.apache.poi.xdgf.usermodel.XmlVisioDocument.onDocumentRead(XmlVisioDocument.java:106)
at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:160)
at
org.apache.poi.xdgf.usermodel.XmlVisioDocument.init(XmlVisioDocument.java:79)
at
org.apache.poi.xdgf.extractor.XDGFVisioExtractor.init(XDGFVisioExtractor.java:41)
at
org.apache.poi.extractor.ExtractorFactory.createExtractor(ExtractorFactory.java:212)
at
org.apache.tika.parser.microsoft.ooxml.OOXMLExtractorFactory.parse(OOXMLExtractorFactory.java:86)
at
org.apache.tika.parser.microsoft.ooxml.OOXMLParser.parse(OOXMLParser.java:87)
at
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at
org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)
at
org.apache.tika.parser.DelegatingParser.parse(DelegatingParser.java:72)
at
org.apache.tika.extractor.ParsingEmbeddedDocumentExtractor.parseEmbedded(ParsingEmbeddedDocumentExtractor.java:102)
at
org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor.handleEmbeddedFile(AbstractOOXMLExtractor.java:298)
at
org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor.handleEmbeddedParts(AbstractOOXMLExtractor.java:199)
at
org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor.getXHTML(AbstractOOXMLExtractor.java:112)
at
org.apache.tika.parser.microsoft.ooxml.OOXMLExtractorFactory.parse(OOXMLExtractorFactory.java:112)
at
org.apache.tika.parser.microsoft.ooxml.OOXMLParser.parse(OOXMLParser.java:87)
at
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:280)
at
org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)
at
org.apache.solr.handler.extraction.ExtractingDocumentLoader.load(ExtractingDocumentLoader.java:228)
at
org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:68)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:166)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:2306)
at
org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:658)
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:464)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:345)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:296)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:513)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
at

Re: custom plugin version

2017-02-03 Thread Andrea Gazzarini

Hi Zaccheo,
I don't think this is possible, this is something related with the 
classloader behavior, and even if there's a "priority" rule in the JVM, 
I wouldn't rely on that in my application.
That could be good in a dev environment where you can specify the 
"order" of the imported libraries (e.g. Eclipse), but definitely not so 
good outside (IMO).


As far as I know, there's no a built-in way to declare the version of 
custom components, but you could adopt the same approach of Lucene, with 
something like a Version class that drives the behavior of your component.

In this way you will have

 * always one jar (better: unique classes FQNs), so no classloader issues
 * a behavior that changes depending on the configuration

Best,
Andrea

On 03/02/17 10:57, Zaccheo Bagnati wrote:

Hi all,
I developed a custom DocTransformer that is loaded from a .jar in the core
"lib" directory. It works but I have now a problem with versioning:
1. if lib directory contains different versions of the same .jar which one
is loaded? I tried putting both myplugins-1.0.0.jar and myplugins-1.0.1.jar
and I noticed that the oldest one is loaded. Is there a way to force
specific jar version to be loaded in solrconfig?
2. More in general: is it possible to expose in solr the version number for
custom plugins?
Thank you in advance





custom plugin version

2017-02-03 Thread Zaccheo Bagnati
Hi all,
I developed a custom DocTransformer that is loaded from a .jar in the core
"lib" directory. It works but I have now a problem with versioning:
1. if lib directory contains different versions of the same .jar which one
is loaded? I tried putting both myplugins-1.0.0.jar and myplugins-1.0.1.jar
and I noticed that the oldest one is loaded. Is there a way to force
specific jar version to be loaded in solrconfig?
2. More in general: is it possible to expose in solr the version number for
custom plugins?
Thank you in advance


Custom token filter in SolrCloud mode using Blob store

2017-02-03 Thread Michal Hlavac
Hi,

it is possible to use BlobStore & Config API with enabled.runtime.lib=true to 
add custom token filters?
I tried, but it doesn't work.

1. Uploaded jar lucene-analyzers-morfologik-6.4.0.jar file to blob store 
.system with name lucene-analyzers-morfologik-6.4.0

2. Add runtime library {"add-runtimelib": { 
"name":"lucene-analyzers-morfologik-6.4.0", "version":1 }}

3. Create custom field type:
curl -X POST -H 'Content-type:application/json' --data-binary '{
  "add-field-type" : {
 "name":"txt_sk_lemma",
 "class":"solr.TextField",
 "positionIncrementGap":"100",
 "analyzer" : {
"tokenizer":{ 
   "class":"solr.StandardTokenizerFactory" },
"filters":[
   {
   "class":"solr.SynonymFilterFactory",
   "synonyms":"synonyms.txt",
   "ignoreCase":true,
   "expand":false
   },
   {
   "class":"solr.StopFilterFactory",
   "ignoreCase":true,
   "words":"lang/stopwords_sk.txt"
   },
   {
   "class":"solr.LowerCaseFilterFactory"
   },
   {
   "class":"solr.KeywordMarkerFilterFactory",
   "protected":"protwords.txt"
   },
   {
   "runtimeLib":true,
   
"class":"org.apache.lucene.analysis.morfologik.MorfologikFilterFactory",
   "dictionary":"morfologik/stemming/sk/sk.dict"
   }
]}}
}' http://localhost:8983/solr/default/schema

I get error

"errorMessages":["Plugin init failure for [schema.xml] fieldType\nPlugin init 
failure for [schema.xml] analyzer/filter: Error loading class 
'org.apache.lucene.analysis.morfologik.MorfologikFilterFactory'\nError loading 
class 
'org.apache.lucene.analysis.morfologik.MorfologikFilterFactory'\norg.apache.lucene.analysis.morfologik.MorfologikFilterFactory\n"


thanks, miso