Re: Exception in SolrResponseBase.getQTime

2015-09-16 Thread Shalin Shekhar Mangar
Okay, I found the problem, see https://issues.apache.org/jira/browse/SOLR-6547

I have committed a fix which should be released with Solr 5.4. In the
mean while, if you need access to the qtime for such responses,
instead of using response.getQTime() do the following:

int qtime = -1;
NamedList header = response.getResponseHeader();
if (header != null) {
qtime =  ((Number) header.get("QTime")).intValue();
}

On Wed, Sep 16, 2015 at 12:09 PM, Shalin Shekhar Mangar
 wrote:
> Hi Gauri,
>
> Can you give more details on when this happens? Which Solr version?
> Also, can you please post the full stack trace?
>
> On Tue, Sep 15, 2015 at 9:19 PM, Gauri Shankar  
> wrote:
>> Hi,
>>
>> I need a bit of your help as we recently encountering an issue related to
>> "QTime" in solr response via solrj client.
>>
>> java.lang.ClassCastException: java.lang.Long cannot be cast to
>> java.lang.Integer
>>  at
>> org.apache.solr.client.solrj.response.SolrResponseBase.getQTime(SolrResponseBase.java:76)
>>  at
>> .
>> .
>>
>> I was exploring the source in -- org.apache.solr.core.SolrCore and there I
>> see that QTime is added as int only.
>>
>> Other interesting observation is -- this is happening in one collection and
>> not happening in another collection while adding document to index.
>> Document are being added to both collection in similar way and they do have
>> the similar solrconfig...exactly same.
>>
>> Could you please help me out on this?
>>
>> --
>> Regards,
>> Gauri Shankar
>
>
>
> --
> Regards,
> Shalin Shekhar Mangar.



-- 
Regards,
Shalin Shekhar Mangar.


Re: Exception in SolrResponseBase.getQTime

2015-09-16 Thread Gauri Shankar
Thanks much Shalin for this.

I will take a look into this one.

Btw, I am using SolrCloud 4.7.0.

Thanks again.

Gauri
On Sep 16, 2015 12:44 PM, "Shalin Shekhar Mangar" 
wrote:

> Okay, I found the problem, see
> https://issues.apache.org/jira/browse/SOLR-6547
>
> I have committed a fix which should be released with Solr 5.4. In the
> mean while, if you need access to the qtime for such responses,
> instead of using response.getQTime() do the following:
>
> int qtime = -1;
> NamedList header = response.getResponseHeader();
> if (header != null) {
> qtime =  ((Number) header.get("QTime")).intValue();
> }
>
> On Wed, Sep 16, 2015 at 12:09 PM, Shalin Shekhar Mangar
>  wrote:
> > Hi Gauri,
> >
> > Can you give more details on when this happens? Which Solr version?
> > Also, can you please post the full stack trace?
> >
> > On Tue, Sep 15, 2015 at 9:19 PM, Gauri Shankar 
> wrote:
> >> Hi,
> >>
> >> I need a bit of your help as we recently encountering an issue related
> to
> >> "QTime" in solr response via solrj client.
> >>
> >> java.lang.ClassCastException: java.lang.Long cannot be cast to
> >> java.lang.Integer
> >>  at
> >>
> org.apache.solr.client.solrj.response.SolrResponseBase.getQTime(SolrResponseBase.java:76)
> >>  at
> >> .
> >> .
> >>
> >> I was exploring the source in -- org.apache.solr.core.SolrCore and
> there I
> >> see that QTime is added as int only.
> >>
> >> Other interesting observation is -- this is happening in one collection
> and
> >> not happening in another collection while adding document to index.
> >> Document are being added to both collection in similar way and they do
> have
> >> the similar solrconfig...exactly same.
> >>
> >> Could you please help me out on this?
> >>
> >> --
> >> Regards,
> >> Gauri Shankar
> >
> >
> >
> > --
> > Regards,
> > Shalin Shekhar Mangar.
>
>
>
> --
> Regards,
> Shalin Shekhar Mangar.
>


Re: Sorting parent documents based on a field from children

2015-09-16 Thread Florin Mandoc

Hi,

Sorry for letting this thread hanging, I was out of office last week.

I have managed to make it work using this query:
http://localhost:8983/solr/testscoring/select?q={!parent%20which=type_s:product%20score=max}+color_s:Red^=0%20AND%20{!func}price_i&wt=json&indent=true&fl=score,*,[docid]&debugQuery=true
for the example in your blog, and the result is like this:

{
  "responseHeader":{
"status":0,
"QTime":2},
  "response":{"numFound":2,"start":0,"maxScore":300.0,"docs":[
  {
"id":"2",
"type_s":"product",
"name_s":"expensive red",
"_version_":1511105298931122176,
"score":300.0,
"[docid]":5},
  {
"id":"1",
"type_s":"product",
"name_s":"expensive blue",
"_version_":1511105298905956352,
"score":10.0,
"[docid]":2}]
  },
  "debug":{
"rawquerystring":"{!parent which=type_s:product score=max} color_s:Red^=0 AND 
{!func}price_i",
"querystring":"{!parent which=type_s:product score=max} color_s:Red^=0 AND 
{!func}price_i",
"parsedquery":"ToParentBlockJoinQuery(ToParentBlockJoinQuery 
(+ConstantScore(color_s:Red)^0.0 +int(price_i)))",
"parsedquery_toString":"ToParentBlockJoinQuery (+ConstantScore(color_s:Red)^0.0 
+int(price_i))",
"explain":{
  "2":"\n300.0 = Score based on child doc range from 3 to 4\n",
  "1":"\n10.0 = Score based on child doc range from 0 to 1\n"},
"QParser":"BlockJoinParentQParser",
"timing":{
  "time":2.0,
  "prepare":{
"time":0.0,
"query":{
  "time":0.0},
"facet":{
  "time":0.0},
"facet_module":{
  "time":0.0},
"mlt":{
  "time":0.0},
"highlight":{
  "time":0.0},
"stats":{
  "time":0.0},
"expand":{
  "time":0.0},
"debug":{
  "time":0.0}},
  "process":{
"time":1.0,
"query":{
  "time":0.0},
"facet":{
  "time":0.0},
"facet_module":{
  "time":0.0},
"mlt":{
  "time":0.0},
"highlight":{
  "time":0.0},
"stats":{
  "time":0.0},
"expand":{
  "time":0.0},
"debug":{
  "time":0.


Is possible to to also add "name_s:expensive" search term in q? I know i 
can add it to fq but I will have no score boost.


Thank you


On 01.09.2015 15:29, Mikhail Khludnev wrote:

I suspect URL encoding might mess with MUST (+) clause. Can you post
debugQuery=true output to make sure that the query parsed right.
Then make sure that chid query and parent filter are fully orthogonal. eg
+type_s:product +color_s:Red returns no result.
Last check to check, make sure that you don't have deleted document in the
index for a while. You can check in at SolrAdmin.

On Tue, Sep 1, 2015 at 1:42 PM, Florin Mandoc  wrote:


Hi,

I have tried the solution from your blog with my schema and with the
example from the blog post, with solr-5.3.0 and with solr-5.4. 0-2015-08-12
and i get this error:

"responseHeader":{
 "status":500,
 "QTime":32},
   "error":{
 "msg":"child query must only match non-parent docs, but parent docID=2
matched childScorer=class org.apache.lucene.search.DisjunctionSumScorer",
 "trace":"java.lang.IllegalStateException: child query must only match
non-parent docs, but parent docID=2 matched childScorer=class
org.apache.lucene.search.DisjunctionSumScorer\n\tat
org.apache.lucene.search.join.ToParentBlockJoinQuery$BlockJoinScorer.nextDoc(ToParentBlockJoinQuery.java:311)\n\tat
org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:216)\n\tat
org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:169)\n\tat
org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39)\n\tat
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:772)\n\tat
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:486)\n\tat
org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:200)\n\tat
org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1682)\n\tat
org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1501)\n\tat
org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:555)\n\tat
org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:522)\n\tat
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:277)\n\tat
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143)\n\tat
org.apache.solr.core.SolrCore.execute(SolrCore.java:2068)\n\tat
org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:669)\n\tat
org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:462)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:210)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179)\n\tat
org.eclipse.jetty.servlet.Servlet

Re: Google didn't help on this one!

2015-09-16 Thread Alessandro Benedetti
Taking a look to your request :

GET
/solr/EventLog/spellCheckCompRH?qt=%2FspellCheckCompRH&q=Some+more+text+wit+some+missspelled+wordz.&spellcheck=on&spellcheck.build=true

You call :
*Solr Core ( Collection)* : EventLog
*Request handler* : spellCheckCompRH
*Qt parameter* ( legacy to specify the request handler) : /spellCheckCompRH

I think you just copied that part from the SolrJ wiki (
query.setRequestHandler("/spellCheckCompRH");) .

Have you verified what happens if you try to use the spellcheck through
requests ?
Is that request handler actually working ?
As a reference I always suggest :
https://cwiki.apache.org/confluence/display/solr/Spell+Checking

Cheers


2015-09-15 18:43 GMT+01:00 Mark Fenbers :

> So I ran "nc -l 8983" then restarted solr, and then ran my app with my
> query.   nc reported the following:
>
> GET
> /solr/EventLog/spellCheckCompRH?qt=%2FspellCheckCompRH&q=Some+more+text+wit+some+missspelled+wordz.&spellcheck=on&spellcheck.build=true&wt=javabin&version=2
> HTTP/1.1
> User-Agent: Solr[org.apache.solr.client.solrj.impl.HttpSolrClient] 1.0
> Host: dell9-tir:8983
> Connection: Keep-Alive
>
> I'm not sure if this is good, or indicates an error of any kind.
>
> Anyway, when I ran my app again, I got a completely different error,
> although I didn't change anything!  So, I guess I get to move on from this
> and see what other hurdles I run into!
>
> Thanks for the help!
> Mark
>
>
>
> On 9/15/2015 11:13 AM, Yonik Seeley wrote:
>
>> On Tue, Sep 15, 2015 at 11:08 AM, Mark Fenbers 
>> wrote:
>>
>>> I'm working with the spellcheck component of Solr for the first time.
>>> I'm
>>> using SolrJ, and when I submit my query, I get a Solr Exception:
>>> "Expected
>>> mime type octet/stream but got text/html."
>>>
>>> What in the world is this telling me??
>>>
>> You're probably hitting an endpoint on Solr that doesn't exist and
>> getting an HTML 404 error page rather than the response (which would
>> be in binary by default).
>>
>> An easy way to see what SolrJ is sending is to kill your solr server,
>> then do
>>
>> nc -l 8983
>>
>> And then run your SolrJ program to see what it sends... if it look OK,
>> then try sending the request from curl to Solr.
>>
>> -Yonik
>>
>>
>


-- 
--

Benedetti Alessandro
Visiting card - http://about.me/alessandro_benedetti
Blog - http://alexbenedetti.blogspot.co.uk

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England


Sold 5.3 with Basic Authentication in a not SolrCloud environment

2015-09-16 Thread Dominique Bejean
Hi,

The wiki explains how to upload the security.json file to Zk (
https://cwiki.apache.org/confluence/display/solr/Authentication+and+Authorization+Plugins
).

However, is it possible to use authentication and authorization plugin in a
not SolrCloud environment ? If yes, where has to be located the
security.json file ?

Thank you.

Dominique


Re: Sorting parent documents based on a field from children

2015-09-16 Thread Mikhail Khludnev
On Wed, Sep 16, 2015 at 12:15 PM, Florin Mandoc  wrote:

> Is possible to to also add "name_s:expensive" search term in q? I know i
> can add it to fq but I will have no score boost.


Sure you can. But beware of query syntax trap. It's explained by David
Smiley at comment
http://blog.griddynamics.com/2013/09/solr-block-join-support.html (sadly
linking a comment doesn't work)


-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics





Difference between CustomScoreQuery and RankQuery

2015-09-16 Thread Parvesh Garg
Hi All,

I wanted to understand the difference between CustomScoreQuery and
RankQuery. From the outside, it seems they do the same thing with RankQuery
having more functionality.

Am I missing something?


Parvesh Garg


Re: Google didn't help on this one!

2015-09-16 Thread Mark Fenbers

On 9/15/2015 6:49 PM, Shawn Heisey wrote:


>From the information we have, we cannot tell if this is a problem
request or not.  Do you have a core/collection named "EventLog" on your
Solr server?  It will be case sensitive.  If you do, does that config
have a handler named "spellCheckCompRH" in it (also case sensitive)?

The nc output lets us see everything that your client sent to Solr, so I
have built a test URL for you based on that info.

Try sending the following URL from a browser or a curl command.  If I've
gotten the host wrong, go ahead and replace it with the correct value.
You'll probably be able to see any errors right in the browser or curl
output.  Hopefully this will help you figure out what's happening.  Also
look in your Solr server's logfile for error messages.

http://dell9-tir:8983/solr/EventLog/spellCheckCompRH?qt=%2FspellCheckCompRH&q=Some+more+text+wit+some+missspelled+wordz.&spellcheck=on&spellcheck.build=true&wt=json&indent=true

I notice that you have "spellcheck.build=true" in that URL.  You
probably don't want to do this on every request, assuming that your
spellcheck dictionary even requires building.

Thanks,
Shawn
It wasn't really a problem request, but a follow-up to those who took 
the time to help me.  However, since this error has returned, it is now 
a problem request!  ;-)


I am aware that "spellcheck.build=true" is expensive, but since I 
haven't had my first success yet with spell-checking, I figured it 
wouldn't hurt to have it in there for now.


I ran the URL you gave verbatim (because your assumptions were correct), 
but I got the stacktrace shown below.  This is particularly puzzling 
because I can find nowhere in my code or configuration where I am 
specifying a float value where I shouldn't be.  My solrconfig.xml and 
schema.xml are posted in another thread having a subject "Moving on to 
spelling" if that helps you help me.


Thanks,
Mark

HTTP ERROR 500

Problem accessing /solr/EventLog/spellCheckCompRH. Reason:

{msg=SolrCore 'EventLog' is not available due to init failure: 
java.lang.Float cannot be cast to 
java.lang.String,trace=org.apache.solr.common.SolrException: SolrCore 
'EventLog' is not available due to init failure: java.lang.Float cannot 
be cast to java.lang.String

at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:978)
at org.apache.solr.servlet.HttpSolrCall.init(HttpSolrCall.java:250)
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:417)
at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:210)
at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at 
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
at 
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)

at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at 
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at 
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at 
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)

at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.solr.common.SolrException: java.lang.Float cannot 
be cast to java.lang.String

at org.apache.solr.core.SolrCore.(SolrCore.java:820)
at org.apache.solr.core.SolrCore.(SolrCore.java:659)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:727)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:447)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:438)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:210)
at 
java.util.concurrent.Thre

Re: Difference between CustomScoreQuery and RankQuery

2015-09-16 Thread Upayavira
I'm no expert, but one of the neat things about RankQuery is that you
can implement your own collector, and spit out documents that are *not*
in score order. One use case I came across for which we used this was
"do not display items from the same supplier within 4 results of each
other". This would have been impossible (or very hard indeed) to
implement using a pure scoring algorithm.

Upayavira

On Wed, Sep 16, 2015, at 12:21 PM, Parvesh Garg wrote:
> Hi All,
> 
> I wanted to understand the difference between CustomScoreQuery and
> RankQuery. From the outside, it seems they do the same thing with
> RankQuery
> having more functionality.
> 
> Am I missing something?
> 
> 
> Parvesh Garg


Re: Google didn't help on this one!

2015-09-16 Thread Upayavira
See this:

Caused by: java.lang.ClassCastException: java.lang.Float cannot be cast 
to java.lang.String
 at 
org.apache.solr.spelling.AbstractLuceneSpellChecker.init(AbstractLuceneSpellChecker.java:97)

AbstractLuceneSpellChecker is expecting a string, but getting a float.
Can you paste here the config (in solrconfig.xml) for your spellchecker?

Also, a simple way to get spell checking started is to look at the
/browse example that comes with the techproducts sample configs. It has
spellchecking already working, so starting there can be a way to get
something going easily.

Upayavira

On Wed, Sep 16, 2015, at 12:22 PM, Mark Fenbers wrote:
> On 9/15/2015 6:49 PM, Shawn Heisey wrote:
> >
> > >From the information we have, we cannot tell if this is a problem
> > request or not.  Do you have a core/collection named "EventLog" on your
> > Solr server?  It will be case sensitive.  If you do, does that config
> > have a handler named "spellCheckCompRH" in it (also case sensitive)?
> >
> > The nc output lets us see everything that your client sent to Solr, so I
> > have built a test URL for you based on that info.
> >
> > Try sending the following URL from a browser or a curl command.  If I've
> > gotten the host wrong, go ahead and replace it with the correct value.
> > You'll probably be able to see any errors right in the browser or curl
> > output.  Hopefully this will help you figure out what's happening.  Also
> > look in your Solr server's logfile for error messages.
> >
> > http://dell9-tir:8983/solr/EventLog/spellCheckCompRH?qt=%2FspellCheckCompRH&q=Some+more+text+wit+some+missspelled+wordz.&spellcheck=on&spellcheck.build=true&wt=json&indent=true
> >
> > I notice that you have "spellcheck.build=true" in that URL.  You
> > probably don't want to do this on every request, assuming that your
> > spellcheck dictionary even requires building.
> >
> > Thanks,
> > Shawn
> It wasn't really a problem request, but a follow-up to those who took 
> the time to help me.  However, since this error has returned, it is now 
> a problem request!  ;-)
> 
> I am aware that "spellcheck.build=true" is expensive, but since I 
> haven't had my first success yet with spell-checking, I figured it 
> wouldn't hurt to have it in there for now.
> 
> I ran the URL you gave verbatim (because your assumptions were correct), 
> but I got the stacktrace shown below.  This is particularly puzzling 
> because I can find nowhere in my code or configuration where I am 
> specifying a float value where I shouldn't be.  My solrconfig.xml and 
> schema.xml are posted in another thread having a subject "Moving on to 
> spelling" if that helps you help me.
> 
> Thanks,
> Mark
> 
> HTTP ERROR 500
> 
> Problem accessing /solr/EventLog/spellCheckCompRH. Reason:
> 
>  {msg=SolrCore 'EventLog' is not available due to init failure: 
> java.lang.Float cannot be cast to 
> java.lang.String,trace=org.apache.solr.common.SolrException: SolrCore 
> 'EventLog' is not available due to init failure: java.lang.Float cannot 
> be cast to java.lang.String
>  at
>  org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:978)
>  at org.apache.solr.servlet.HttpSolrCall.init(HttpSolrCall.java:250)
>  at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:417)
>  at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:210)
>  at 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179)
>  at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
>  at 
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
>  at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
>  at 
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
>  at 
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
>  at 
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
>  at 
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
>  at 
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
>  at 
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
>  at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
>  at 
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
>  at 
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
>  at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
>  at org.eclipse.jetty.server.Server.handle(Server.java:499)
>  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
>  at 
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
>  at 
> org.eclipse.jetty.io.AbstractConnection$2

Re: Google didn't help on this one!

2015-09-16 Thread Alessandro Benedetti
Can you post us the schema description of the fields you are using for
spellchecking ?
Are you using numeric fields to get the suggestions from  ? ( which should
be quite weird)

Cheers

2015-09-16 12:22 GMT+01:00 Mark Fenbers :

> On 9/15/2015 6:49 PM, Shawn Heisey wrote:
>
>>
>> >From the information we have, we cannot tell if this is a problem
>> request or not.  Do you have a core/collection named "EventLog" on your
>> Solr server?  It will be case sensitive.  If you do, does that config
>> have a handler named "spellCheckCompRH" in it (also case sensitive)?
>>
>> The nc output lets us see everything that your client sent to Solr, so I
>> have built a test URL for you based on that info.
>>
>> Try sending the following URL from a browser or a curl command.  If I've
>> gotten the host wrong, go ahead and replace it with the correct value.
>> You'll probably be able to see any errors right in the browser or curl
>> output.  Hopefully this will help you figure out what's happening.  Also
>> look in your Solr server's logfile for error messages.
>>
>>
>> http://dell9-tir:8983/solr/EventLog/spellCheckCompRH?qt=%2FspellCheckCompRH&q=Some+more+text+wit+some+missspelled+wordz.&spellcheck=on&spellcheck.build=true&wt=json&indent=true
>>
>> I notice that you have "spellcheck.build=true" in that URL.  You
>> probably don't want to do this on every request, assuming that your
>> spellcheck dictionary even requires building.
>>
>> Thanks,
>> Shawn
>>
> It wasn't really a problem request, but a follow-up to those who took the
> time to help me.  However, since this error has returned, it is now a
> problem request!  ;-)
>
> I am aware that "spellcheck.build=true" is expensive, but since I haven't
> had my first success yet with spell-checking, I figured it wouldn't hurt to
> have it in there for now.
>
> I ran the URL you gave verbatim (because your assumptions were correct),
> but I got the stacktrace shown below.  This is particularly puzzling
> because I can find nowhere in my code or configuration where I am
> specifying a float value where I shouldn't be.  My solrconfig.xml and
> schema.xml are posted in another thread having a subject "Moving on to
> spelling" if that helps you help me.
>
> Thanks,
> Mark
>
> HTTP ERROR 500
>
> Problem accessing /solr/EventLog/spellCheckCompRH. Reason:
>
> {msg=SolrCore 'EventLog' is not available due to init failure:
> java.lang.Float cannot be cast to
> java.lang.String,trace=org.apache.solr.common.SolrException: SolrCore
> 'EventLog' is not available due to init failure: java.lang.Float cannot be
> cast to java.lang.String
> at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:978)
> at org.apache.solr.servlet.HttpSolrCall.init(HttpSolrCall.java:250)
> at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:417)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:210)
> at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179)
> at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
> at
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
> at org.eclipse.jetty.server.Server.handle(Server.java:499)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
> at
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
> at org.eclipse.jetty.io
> .AbstractConnection$2.run(AbstractConnection.java:540)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.solr.common.SolrException: java.lang.Float cannot be
> cast to java.lang.String
> at org.apache.solr.core.SolrCore.(SolrCore.java:820)
> at org.apache.solr.core.SolrCore.(SolrCore.java:659)
> at org.ap

Re: Difference in WordDelimiterFilter behavior between 4.7.2 and 4.9.1

2015-09-16 Thread Alessandro Benedetti
Any update on this ?

Cheers

2015-08-21 0:22 GMT+01:00 Shawn Heisey :

> On 7/8/2015 6:13 PM, Yonik Seeley wrote:
> > On Wed, Jul 8, 2015 at 6:50 PM, Shawn Heisey 
> wrote:
> >> After the fix (with luceneMatchVersion at 4.9), both "aaa" and "bbb" end
> >> up at position 2.
> > Yikes, that's definitely wrong.
>
> I have filed LUCENE-6889 for this problem.  I'd like to write a unit
> test that demonstrates the problem, but Lucene internals are a mystery
> to me.  I have a concise and repeatable manual test (using Solr)
> outlined in this comment:
>
>
> https://issues.apache.org/jira/browse/LUCENE-6689?focusedCommentId=14705543&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14705543
>
> Is there an existing Lucene test class that I could use as a basis for a
> test?  I will look into tests for analysis components and try to build
> it on my own, but any help is appreciated.
>
> Thanks,
> Shawn
>
>


-- 
--

Benedetti Alessandro
Visiting card - http://about.me/alessandro_benedetti
Blog - http://alexbenedetti.blogspot.co.uk

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England


Re: Parent/Child (Nested Document) Faceting

2015-09-16 Thread Alessandro Benedetti
You should first run the query on the parent domain ( give me all the books
or a limited set of them).
Then you should do the faceting on the children domain.

>From Yonik blog :
"
$ curl http://localhost:8983/solr/demo/query -d '
q=cat_s:(sci-fi OR fantasy)&fl=id,title_t&
json.facet={
  top_reviewers : {
type: terms,
field: author_s,
domain: { blockChildren : "type_s:book" }
  }
}'

Response:
"response":{"numFound":2,"start":0,"docs":[
{
  "id":"book1",
  "title_t":["The Way of Kings"]},
{
  "id":"book2",
  "title_t":["Snow Crash"]}]
},
"facets":{
  "count":2,
  "top_reviewers":{
"buckets":[{
"val":"dan",
"count":2},
  {
"val":"yonik",
"count":2},
  {
"val":"mary",
"count":1}]
}}"

Cheers

2015-08-05 3:10 GMT+01:00 dxxd116 :

> If I want to do a faceting on field in child document and the get the count
> of parent document, how should I construct my query?
>
> E.g, I want to find out the authors who have written reviews on the largest
> number of books, as in the example nested document structures .
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Parent-Child-Nested-Document-Faceting-tp4211632p4220894.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
--

Benedetti Alessandro
Visiting card - http://about.me/alessandro_benedetti
Blog - http://alexbenedetti.blogspot.co.uk

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England


Re: Google didn't help on this one!

2015-09-16 Thread Mikhail Khludnev
https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java#L97
this mean that

0.5

should be replaced to

0.5



On Wed, Sep 16, 2015 at 2:32 PM, Upayavira  wrote:

> See this:
>
> Caused by: java.lang.ClassCastException: java.lang.Float cannot be cast
> to java.lang.String
>  at
>
> org.apache.solr.spelling.AbstractLuceneSpellChecker.init(AbstractLuceneSpellChecker.java:97)
>
> AbstractLuceneSpellChecker is expecting a string, but getting a float.
> Can you paste here the config (in solrconfig.xml) for your spellchecker?
>
> Also, a simple way to get spell checking started is to look at the
> /browse example that comes with the techproducts sample configs. It has
> spellchecking already working, so starting there can be a way to get
> something going easily.
>
> Upayavira
>
> On Wed, Sep 16, 2015, at 12:22 PM, Mark Fenbers wrote:
> > On 9/15/2015 6:49 PM, Shawn Heisey wrote:
> > >
> > > >From the information we have, we cannot tell if this is a problem
> > > request or not.  Do you have a core/collection named "EventLog" on your
> > > Solr server?  It will be case sensitive.  If you do, does that config
> > > have a handler named "spellCheckCompRH" in it (also case sensitive)?
> > >
> > > The nc output lets us see everything that your client sent to Solr, so
> I
> > > have built a test URL for you based on that info.
> > >
> > > Try sending the following URL from a browser or a curl command.  If
> I've
> > > gotten the host wrong, go ahead and replace it with the correct value.
> > > You'll probably be able to see any errors right in the browser or curl
> > > output.  Hopefully this will help you figure out what's happening.
> Also
> > > look in your Solr server's logfile for error messages.
> > >
> > >
> http://dell9-tir:8983/solr/EventLog/spellCheckCompRH?qt=%2FspellCheckCompRH&q=Some+more+text+wit+some+missspelled+wordz.&spellcheck=on&spellcheck.build=true&wt=json&indent=true
> > >
> > > I notice that you have "spellcheck.build=true" in that URL.  You
> > > probably don't want to do this on every request, assuming that your
> > > spellcheck dictionary even requires building.
> > >
> > > Thanks,
> > > Shawn
> > It wasn't really a problem request, but a follow-up to those who took
> > the time to help me.  However, since this error has returned, it is now
> > a problem request!  ;-)
> >
> > I am aware that "spellcheck.build=true" is expensive, but since I
> > haven't had my first success yet with spell-checking, I figured it
> > wouldn't hurt to have it in there for now.
> >
> > I ran the URL you gave verbatim (because your assumptions were correct),
> > but I got the stacktrace shown below.  This is particularly puzzling
> > because I can find nowhere in my code or configuration where I am
> > specifying a float value where I shouldn't be.  My solrconfig.xml and
> > schema.xml are posted in another thread having a subject "Moving on to
> > spelling" if that helps you help me.
> >
> > Thanks,
> > Mark
> >
> > HTTP ERROR 500
> >
> > Problem accessing /solr/EventLog/spellCheckCompRH. Reason:
> >
> >  {msg=SolrCore 'EventLog' is not available due to init failure:
> > java.lang.Float cannot be cast to
> > java.lang.String,trace=org.apache.solr.common.SolrException: SolrCore
> > 'EventLog' is not available due to init failure: java.lang.Float cannot
> > be cast to java.lang.String
> >  at
> >  org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:978)
> >  at org.apache.solr.servlet.HttpSolrCall.init(HttpSolrCall.java:250)
> >  at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:417)
> >  at
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:210)
> >  at
> >
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179)
> >  at
> >
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
> >  at
> >
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
> >  at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> >  at
> >
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
> >  at
> >
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
> >  at
> >
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
> >  at
> > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
> >  at
> >
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> >  at
> >
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
> >  at
> >
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> >  at
> >
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
> >  at
> >
> org.eclipse.jetty.server.handler.H

Re: Google didn't help on this one!

2015-09-16 Thread Mark Fenbers

On 9/16/2015 5:24 AM, Alessandro Benedetti wrote:

As a reference I always suggest :
https://cwiki.apache.org/confluence/display/solr/Spell+Checking


I read this doc and have found it moderately helpful to my current 
problem.  But I have at least one question about it, especially given 
that my current error is a ClassCastException from an unknown origin.  
Let's look at some lines I copied from the document:


true
false

and

20
2

Why are some parameters specified as strings ( tag) even though 
they are integers or boolean, and others specificed as integer ( 
tags) and boolean ( tags)?  Does it matter which way I specify them?


thanks,
Mark


Re: Google didn't help on this one!

2015-09-16 Thread Mark Fenbers
Ah ha!!  Exactly my point in the post I sent about the same time you did 
(same Thread)!

Mark

On 9/16/2015 8:03 AM, Mikhail Khludnev wrote:

https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java#L97
this mean that

0.5

should be replaced to

0.5



On Wed, Sep 16, 2015 at 2:32 PM, Upayavira  wrote:


See this:

Caused by: java.lang.ClassCastException: java.lang.Float cannot be cast
to java.lang.String
  at

org.apache.solr.spelling.AbstractLuceneSpellChecker.init(AbstractLuceneSpellChecker.java:97)

AbstractLuceneSpellChecker is expecting a string, but getting a float.
Can you paste here the config (in solrconfig.xml) for your spellchecker?

Also, a simple way to get spell checking started is to look at the
/browse example that comes with the techproducts sample configs. It has
spellchecking already working, so starting there can be a way to get
something going easily.

Upayavira

On Wed, Sep 16, 2015, at 12:22 PM, Mark Fenbers wrote:

On 9/15/2015 6:49 PM, Shawn Heisey wrote:

>From the information we have, we cannot tell if this is a problem
request or not.  Do you have a core/collection named "EventLog" on your
Solr server?  It will be case sensitive.  If you do, does that config
have a handler named "spellCheckCompRH" in it (also case sensitive)?

The nc output lets us see everything that your client sent to Solr, so

I

have built a test URL for you based on that info.

Try sending the following URL from a browser or a curl command.  If

I've

gotten the host wrong, go ahead and replace it with the correct value.
You'll probably be able to see any errors right in the browser or curl
output.  Hopefully this will help you figure out what's happening.

Also

look in your Solr server's logfile for error messages.



http://dell9-tir:8983/solr/EventLog/spellCheckCompRH?qt=%2FspellCheckCompRH&q=Some+more+text+wit+some+missspelled+wordz.&spellcheck=on&spellcheck.build=true&wt=json&indent=true

I notice that you have "spellcheck.build=true" in that URL.  You
probably don't want to do this on every request, assuming that your
spellcheck dictionary even requires building.

Thanks,
Shawn

It wasn't really a problem request, but a follow-up to those who took
the time to help me.  However, since this error has returned, it is now
a problem request!  ;-)

I am aware that "spellcheck.build=true" is expensive, but since I
haven't had my first success yet with spell-checking, I figured it
wouldn't hurt to have it in there for now.

I ran the URL you gave verbatim (because your assumptions were correct),
but I got the stacktrace shown below.  This is particularly puzzling
because I can find nowhere in my code or configuration where I am
specifying a float value where I shouldn't be.  My solrconfig.xml and
schema.xml are posted in another thread having a subject "Moving on to
spelling" if that helps you help me.

Thanks,
Mark

HTTP ERROR 500

Problem accessing /solr/EventLog/spellCheckCompRH. Reason:

  {msg=SolrCore 'EventLog' is not available due to init failure:
java.lang.Float cannot be cast to
java.lang.String,trace=org.apache.solr.common.SolrException: SolrCore
'EventLog' is not available due to init failure: java.lang.Float cannot
be cast to java.lang.String
  at
  org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:978)
  at org.apache.solr.servlet.HttpSolrCall.init(HttpSolrCall.java:250)
  at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:417)
  at


org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:210)

  at


org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179)

  at


org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)

  at


org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)

  at


org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)

  at


org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)

  at


org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)

  at


org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)

  at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
  at


org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)

  at


org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)

  at


org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)

  at


org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)

  at


org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)

  at


org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)

  at org.eclipse.jetty.server.Server.handle(Server.java:499)
  at or

Re: Google didn't help on this one!

2015-09-16 Thread Mark Fenbers
Indeed!   should be changed to  in the "Spell Checking" 
document 
(https://cwiki.apache.org/confluence/display/solr/Spell+Checking) and in 
all the baseline solrconfig.xml files provided in the distribution.  In 
addition, ' internal' should be 
removed/changed in the same document and same solrconfig.xml files 
because "internal" is not defined in AbstractLuceneSpellchecker.java!  
Once I edited these two problems in my own solrconfig.xml, the 
stacktrace errors went away!!  Yay!


But I'm not out of the woods yet!  I'll resume later, after our system 
upgrade today.


Thanks!
Mark

On 9/16/2015 8:03 AM, Mikhail Khludnev wrote:

https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java#L97
this mean that

0.5

should be replaced to

0.5








Re: Difference in WordDelimiterFilter behavior between 4.7.2 and 4.9.1

2015-09-16 Thread Shawn Heisey
On 9/16/2015 5:42 AM, Alessandro Benedetti wrote:
> Any update on this ?

I found two workarounds, and went with the second one -- removing the
PatternReplaceFilterFactory from fieldType definitions that also include
WDF.  They are both documented in the issue:

https://issues.apache.org/jira/browse/LUCENE-6689

I still think that there's a bug that needs fixing, but I'm not
desperate any more.

Thanks,
Shawn



Re: 5 second timeout in bin/solr stop command

2015-09-16 Thread Shawn Heisey
On 9/16/2015 12:52 AM, Ere Maijala wrote:
> There's currently a five second delay in the bin/solr script when
> stopping a Solr instance before it's forcefully killed. In our
> experience this is not enough to allow a graceful shutdown of an active
> SolrCloud node and it seems a bit brutal to kill the process in the
> middle of shutdown. Since the script already has the bits for checking
> process status, how about checking it once a second for 30 seconds or
> until the process has stopped and only kill it if it doesn't shut down
> in that time?

I agree here.  I don't like the forceful termination unless it becomes
truly necessary.

I changed the timeout to 20 seconds in the script installed in
/etc/init.d ... a bit of a brute force approach.  When I find some time,
I will think about how to make this better, and choose a better default
value.  30 seconds is probably good.  It should also be configurable,
probably in the /var/solr/solr.in.sh config fragment.

Thanks,
Shawn



Ant Ivy resolve / Authenticated Proxy Issue

2015-09-16 Thread Susheel Kumar
Hi,

Sending it to Solr group in addition to Ivy group.


I have been building Solr trunk (
http://svn.apache.org/repos/asf/lucene/dev/trunk/) using "ant eclipse" from
quite some time but this week i am on a job where things are behind the
firewall and a proxy is used.

Issue: When not in company network then build works fine but when inside
company network  Ivy stucks during resolve when downloading
https://repo1.maven.org/maven2/org/apache/ant/ant/1.8.2/ant-1.8.2.jar (see
below) I have set ANT_OPTS=-Dhttp.proxyHost=myproxyhost
-Dhttp.proxyPort=8080 -Dhttp.proxyUser=myproxyusername
-Dhttp.proxyPassword=myproxypassword  but that doesn't help.   Similar
issue i run into with SVN but i was able to specify proxy & auth into
.subversion/servers file and it worked.With Ant Ivy no idea what's
going wrong.  I also tried -autoproxy with ant command line but no luck.
In the meantime .ivy2 folder which got populated outside network would help
to proceed temporarily.

Machine : mac 10.10.3
Ant : 1.9.6
Ivy : 2.4.0

Attach build.xml & ivysettings.xml

kumar$ ant eclipse

Buildfile: /Users/kumar/sourcecode/trunk/build.xml

resolve:

resolve:

ivy-availability-check:

ivy-fail:

ivy-configure:

[ivy:configure] :: Apache Ivy 2.4.0 - 20141213170938 ::
http://ant.apache.org/ivy/ ::

[ivy:configure] :: loading settings :: file =
/Users/kumar/sourcecode/trunk/lucene/ivy-settings.xml


resolve:


Re: Google didn't help on this one!

2015-09-16 Thread Mikhail Khludnev
Raised https://issues.apache.org/jira/browse/SOLR-8063


On Wed, Sep 16, 2015 at 3:35 PM, Mark Fenbers  wrote:

> Indeed!   should be changed to  in the "Spell Checking"
> document (https://cwiki.apache.org/confluence/display/solr/Spell+Checking)
> and in all the baseline solrconfig.xml files provided in the distribution.
> In addition, ' internal' should be
> removed/changed in the same document and same solrconfig.xml files because
> "internal" is not defined in AbstractLuceneSpellchecker.java!  Once I
> edited these two problems in my own solrconfig.xml, the stacktrace errors
> went away!!  Yay!
>
> But I'm not out of the woods yet!  I'll resume later, after our system
> upgrade today.
>
> Thanks!
> Mark
>
> On 9/16/2015 8:03 AM, Mikhail Khludnev wrote:
>
>>
>> https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/spelling/AbstractLuceneSpellChecker.java#L97
>> this mean that
>>
>> 0.5
>>
>> should be replaced to
>>
>> 0.5
>>
>>
>>
>>
>>
>


-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics





Good ol' Websters

2015-09-16 Thread Mark Fenbers

Greetings!

Mikhail Khludnev, in his post to the thread "Google didn't help on this 
one!", has pointed out one bug in Solr-5.3.0, and I was able to uncover 
another one (which I wrote about in the same thread). Therefore, and 
thankfully, I've been able to get past my configuration issues.


So now I've been able to try spell-checking on my local configuration 
for the first time.  My query string was "Anothr text containig 
missspelled wordz."  Of these 5 words, the only correct one is "text"; 
the others are not spelled correctly.  Yet my query results gave me only 
two suggestions ("test" and "Test") and they were for the one word that 
*is* spelled correctly!  This is the polar opposite of what I expected.


I understand why, though.   Because I am using 
solr.IndexBasedSpellchecker, so my data's index used as the dictionary.  
This is not entirely a bad thing, because we use a lot of technical 
terms and industry accepted spellings (like "gage" instead of "gauge").  
But for the most part, I want to use a Webster-like dictionary against 
which to check my spelling. Does this mean I need to find an English 
dictionary file on the web and add Solr's FileBasedSpellChecker??  Or 
does Solr already have what I need and it's a matter of me learning how 
to configure that properly??  (If so, how?)


Mark


Re: Ant Ivy resolve / Authenticated Proxy Issue

2015-09-16 Thread Mark Miller
Have you used jconsole or visualvm to see what it is actually hanging on to
there? Perhaps it is lock files that are not cleaned up or something else?

You might try: find ~/.ivy2 -name "*.lck" -type f -exec rm {} \;

- Mark

On Wed, Sep 16, 2015 at 9:50 AM Susheel Kumar  wrote:

> Hi,
>
> Sending it to Solr group in addition to Ivy group.
>
>
> I have been building Solr trunk (
> http://svn.apache.org/repos/asf/lucene/dev/trunk/) using "ant eclipse"
> from
> quite some time but this week i am on a job where things are behind the
> firewall and a proxy is used.
>
> Issue: When not in company network then build works fine but when inside
> company network  Ivy stucks during resolve when downloading
> https://repo1.maven.org/maven2/org/apache/ant/ant/1.8.2/ant-1.8.2.jar (see
> below) I have set ANT_OPTS=-Dhttp.proxyHost=myproxyhost
> -Dhttp.proxyPort=8080 -Dhttp.proxyUser=myproxyusername
> -Dhttp.proxyPassword=myproxypassword  but that doesn't help.   Similar
> issue i run into with SVN but i was able to specify proxy & auth into
> .subversion/servers file and it worked.With Ant Ivy no idea what's
> going wrong.  I also tried -autoproxy with ant command line but no luck.
> In the meantime .ivy2 folder which got populated outside network would help
> to proceed temporarily.
>
> Machine : mac 10.10.3
> Ant : 1.9.6
> Ivy : 2.4.0
>
> Attach build.xml & ivysettings.xml
>
> kumar$ ant eclipse
>
> Buildfile: /Users/kumar/sourcecode/trunk/build.xml
>
> resolve:
>
> resolve:
>
> ivy-availability-check:
>
> ivy-fail:
>
> ivy-configure:
>
> [ivy:configure] :: Apache Ivy 2.4.0 - 20141213170938 ::
> http://ant.apache.org/ivy/ ::
>
> [ivy:configure] :: loading settings :: file =
> /Users/kumar/sourcecode/trunk/lucene/ivy-settings.xml
>
>
> resolve:
>
-- 
- Mark
about.me/markrmiller


Re: Problem with CoreAdmin API CREATE command

2015-09-16 Thread Erick Erickson
The not-very-helpful answer is that you're using the core admin API in
a SolrCloud setup. Please do not do this as (you're well aware of this by now!)
it's far too easy to get "interesting" results.

Instead, use the Collections API, specifically the ADDREPLICA and DELETEREPLICA
commands. Under the covers, they actually create a core via the core admin API,
but they insure that all the core create parameters are correct. For ADDREPLICA,
you can also easily insure that a node lands on a particular machine.

Best,
Erick

On Tue, Sep 15, 2015 at 9:46 AM, Yago Riveiro  wrote:
> Hi,
>
> I’m having some issues with the command CREATE of the CoreAdmin API in solr
> 4.10.4.
>
> When I try to load a previous unloaded core with CREATE command, the result
> of this operation is 2 replicas in down state. One with the original
> coreNodeName set in clusterstate.json and other with an new one.
>
> I’m with the new solr.xml format and the core.properties of cores looks like
> (I set this configuration when  upgraded from 4.6.1 in legacy solr.xml to
> 4.10.4:
>
> name=bucket-15_shardX_replicaY
> shard=shardX
> collection=bucket-15
>
> The API command looks like:
>
> solr/admin/cores?action=CREATE&name=bucket-15_shardX_replicaY&collection=bucket-15&shard=shardX&wt=json
>
> What I’m doing wrong?
>
>
>
> -
> Best regards
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Problem-with-CoreAdmin-API-CREATE-command-tp4229248.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: Generating a document by group count and displaying the result

2015-09-16 Thread Erick Erickson
Have you looked at the group by options? See:
https://cwiki.apache.org/confluence/display/solr/Result+Grouping

Best,
Erick

On Tue, Sep 15, 2015 at 5:00 AM, Sreekant Sreedharan
 wrote:
> I have a requirement to group documents by count based on a particular field:
>
> So for example if you have the following three documents:
>
>   1
>   food
>   car
>
>
>   2
>   travel
>   car
>
>
>   3
>   food
>   car
>
>
> A search with the query string 'car' based on a grouping based on the
> 'category' field should return something like:
>
>
>   1
>   food
>   car
>   2
>
>
>   2
>   travel
>   car
>   1
>
>
>   3
>   food
>   car
>   2
>
>
> Is this possible?
>
> Regards,
> Sreekant
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Generating-a-document-by-group-count-and-displaying-the-result-tp4229183.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: Find records with no values in solr.LatLongType fied type

2015-09-16 Thread Erick Erickson
Top level queries need a *:* in front, something like
q=*:* -usrlatlong_0_coordinate:[* TO *]

I just took a quick check and just using usrlatlong:[* TO *]
encounters a parse error.

P.S. It would help if you told us what you _did_ receive
when you tried your options. Parse errors? All docs?

Best,
Erick

On Mon, Sep 14, 2015 at 10:58 PM, Kamal Kishore Aggarwal
 wrote:
> Hi,
>
> I am working on solr 4.8,1. I am trying to find the docs where latlongtype
> have null values.
>
> I have tried using these, but not getting the results :
>
> 1) http://localhost:8984/solr/IM-Search/select?q.alt=-usrlatlong:[' ' TO *]
>
> 2) http://localhost:8984/solr/IM-Search/select?q.alt=-usrlatlong:[* TO *]
>
> Here's the configurations :
>> > subFieldSuffix="_coordinate"/>
>> > required="false" multiValued="false" />
>
>
> Please help.


Re: Generating a document by group count and displaying the result

2015-09-16 Thread Ronald Xiao
Solr Grouping is unlike to generate the response like that directly.
Solr group response result is grouped by field, while you want FLAT format
result.
Flattern result self should be easy task, but may cause another problem,
how to control Navigation/Pagination behavior?  that depends on your
application requirement.

Best,
Ronald

On Wed, Sep 16, 2015 at 11:39 AM, Erick Erickson 
wrote:

> Have you looked at the group by options? See:
> https://cwiki.apache.org/confluence/display/solr/Result+Grouping
>
> Best,
> Erick
>
> On Tue, Sep 15, 2015 at 5:00 AM, Sreekant Sreedharan
>  wrote:
> > I have a requirement to group documents by count based on a particular
> field:
> >
> > So for example if you have the following three documents:
> >
> >   1
> >   food
> >   car
> >
> >
> >   2
> >   travel
> >   car
> >
> >
> >   3
> >   food
> >   car
> >
> >
> > A search with the query string 'car' based on a grouping based on the
> > 'category' field should return something like:
> >
> >
> >   1
> >   food
> >   car
> >   2
> >
> >
> >   2
> >   travel
> >   car
> >   1
> >
> >
> >   3
> >   food
> >   car
> >   2
> >
> >
> > Is this possible?
> >
> > Regards,
> > Sreekant
> >
> >
> >
> > --
> > View this message in context:
> http://lucene.472066.n3.nabble.com/Generating-a-document-by-group-count-and-displaying-the-result-tp4229183.html
> > Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: Ant Ivy resolve / Authenticated Proxy Issue

2015-09-16 Thread Shawn Heisey
On 9/16/2015 9:32 AM, Mark Miller wrote:
> Have you used jconsole or visualvm to see what it is actually hanging on to
> there? Perhaps it is lock files that are not cleaned up or something else?
>
> You might try: find ~/.ivy2 -name "*.lck" -type f -exec rm {} \;

If that does turn out to be the problem and deleting lockfiles fixes it,
then you may be running into what I believe is a bug.  It is a bug that
was (in theory) fixed in IVY-1388.

https://issues.apache.org/jira/browse/IVY-1388

I have seen the same problem even in version 2.3.0 which contains a fix
for IVY-1388, so I filed a new issue:

https://issues.apache.org/jira/browse/IVY-1489

Thanks,
Shawn



Re: Good ol' Websters

2015-09-16 Thread Alessandro Benedetti
Hi Mark,
Solr allows you to provide more than one spellchecker to be used together
to provide the corrections.
This means you can provide a set of suggestions from your index and one
from an external system.
Anyway you need to provide it as a File, Solr doesn't have an automatic set
of suggestions per language.
You need to provide your.

Cheers


2015-09-16 15:31 GMT+01:00 Mark Fenbers :

> Greetings!
>
> Mikhail Khludnev, in his post to the thread "Google didn't help on this
> one!", has pointed out one bug in Solr-5.3.0, and I was able to uncover
> another one (which I wrote about in the same thread). Therefore, and
> thankfully, I've been able to get past my configuration issues.
>
> So now I've been able to try spell-checking on my local configuration for
> the first time.  My query string was "Anothr text containig missspelled
> wordz."  Of these 5 words, the only correct one is "text"; the others are
> not spelled correctly.  Yet my query results gave me only two suggestions
> ("test" and "Test") and they were for the one word that *is* spelled
> correctly!  This is the polar opposite of what I expected.
>
> I understand why, though.   Because I am using
> solr.IndexBasedSpellchecker, so my data's index used as the dictionary.
> This is not entirely a bad thing, because we use a lot of technical terms
> and industry accepted spellings (like "gage" instead of "gauge").  But for
> the most part, I want to use a Webster-like dictionary against which to
> check my spelling. Does this mean I need to find an English dictionary file
> on the web and add Solr's FileBasedSpellChecker??  Or does Solr already
> have what I need and it's a matter of me learning how to configure that
> properly??  (If so, how?)
>
> Mark
>



-- 
--

Benedetti Alessandro
Visiting card - http://about.me/alessandro_benedetti
Blog - http://alexbenedetti.blogspot.co.uk

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England


Omit fields to be indexed in a bean

2015-09-16 Thread Henrique O. Santos

Hello all,

I have a SolrJ bean annotated with @Field. Is it possible to omit a 
field prior to index? For instance:


*My bean*
@Field
public String f1;
@Field
public String f2;
@Field
public String f3;

*My indexing*
client.addBean(this);

I want the resulting document to omit f2, so it would look like this in CSV:
f1,f3
"value1","value3"

And not like
f1,f2,f3
"value1","","value3"

Thank you.


SolrCloud clarification/Question

2015-09-16 Thread Ravi Solr
Hello,
 We are trying to move away from Master-Slave configuration to a
SolrCloud environment. I have a couple of questions. Currently in the
Master-Slave setup we have 4 Machines 2 of which are indexers and 2 of them
are query servers. The query servers are fronted via Load Balancer.

There are 3 solr cores for 3 different/separate applications (mutually
exclusive). Each core is a complete index of all docs (i.e. the data is not
sharded).

  We intend to keep it in a non-sharded mode even after the SolrCloud
mode.The prime motivation to move to cloud is to effectively use all
servers for indexing and querying (read fault tolerant/redundant).

So, the real question is, can SolrCloud be used without shards ? i.e. a
"collection" resides entirely on one machine rather than partitioning data
onto different machines ?

Thanks

Ravi Kiran Bhaskar


Re: SolrCloud clarification/Question

2015-09-16 Thread Sameer Maggon
Absolutely. You can have a collection with just replicas and no shards for
redundancy and have a load balancer in front of it that removes the
dependency on a single node. One of them will assume the role of a leader,
and in case that leader goes down, one of the replicas will be elected as a
leader and your application will be fine.

Thanks,

On Wed, Sep 16, 2015 at 9:44 AM, Ravi Solr  wrote:

> Hello,
>  We are trying to move away from Master-Slave configuration to a
> SolrCloud environment. I have a couple of questions. Currently in the
> Master-Slave setup we have 4 Machines 2 of which are indexers and 2 of them
> are query servers. The query servers are fronted via Load Balancer.
>
> There are 3 solr cores for 3 different/separate applications (mutually
> exclusive). Each core is a complete index of all docs (i.e. the data is not
> sharded).
>
>   We intend to keep it in a non-sharded mode even after the SolrCloud
> mode.The prime motivation to move to cloud is to effectively use all
> servers for indexing and querying (read fault tolerant/redundant).
>
> So, the real question is, can SolrCloud be used without shards ? i.e. a
> "collection" resides entirely on one machine rather than partitioning data
> onto different machines ?
>
> Thanks
>
> Ravi Kiran Bhaskar
>



-- 
*Sameer Maggon*
Measured Search
c: 310.344.7266
www.measuredsearch.com 


Fwd: Securing solr 5.2 basic auth permission rules

2015-09-16 Thread Aziz Gaou
Hi,

I try to follow:
https://cwiki.apache.org/confluence/display/solr/Basic+Authentication+Plugin,
to protect Solr 5.2 Admin with password, but I have not been able to secure.

1) When I run the following command:

curl --user solr:SolrRocks http://localhost:8983/solr/admin/authentication
-H 'Content-type:application/json'-d '{
  "set-user": {"tom" : "TomIsCool" }}'

no update on the file security.json

2) I launched the following 2 commands:

curl --user solr:SolrRocks http://localhost:8983/solr/admin/authorization
-H 'Content-type:application/json'-d '{"set-permission": {
"name":"updates", "collection":"MyCollection", "role": "dev"}}'

curl --user solr:SolrRocks http://localhost:8983/solr/admin/authorization
-H 'Content-type:application/json' -d '{ "set-user-role": {"tom":["dev"}}'

always MyCollection is not protected.


thank you for your help.


Re: Ant Ivy resolve / Authenticated Proxy Issue

2015-09-16 Thread Susheel Kumar
Not really. There are no lock files & even after cleaning up lock files (to
be sure) problem still persists.  It works outside company network but
inside it stucks.  let me try to see if jconsole can show something
meaningful.

Thanks,
Susheel

On Wed, Sep 16, 2015 at 12:17 PM, Shawn Heisey  wrote:

> On 9/16/2015 9:32 AM, Mark Miller wrote:
> > Have you used jconsole or visualvm to see what it is actually hanging on
> to
> > there? Perhaps it is lock files that are not cleaned up or something
> else?
> >
> > You might try: find ~/.ivy2 -name "*.lck" -type f -exec rm {} \;
>
> If that does turn out to be the problem and deleting lockfiles fixes it,
> then you may be running into what I believe is a bug.  It is a bug that
> was (in theory) fixed in IVY-1388.
>
> https://issues.apache.org/jira/browse/IVY-1388
>
> I have seen the same problem even in version 2.3.0 which contains a fix
> for IVY-1388, so I filed a new issue:
>
> https://issues.apache.org/jira/browse/IVY-1489
>
> Thanks,
> Shawn
>
>


How to perform phonetic matching/query for multivalued string field

2015-09-16 Thread Jie Gao
Hi,


I want to query a list of terms indexed and stored in multivalued string
field via Term Component. The term component can support exact matching and
regex based fuzzy matching. However, Is any way i can configure scheme to
do phonetic matching/query?

Thanks,
Jerry


Re: Ant Ivy resolve / Authenticated Proxy Issue

2015-09-16 Thread Mark Miller
I mention the same thing in
https://issues.apache.org/jira/browse/LUCENE-6743

They claim to have addressed this with Java delete on close stuff, but it
still happens even with 2.4.0.

Locally, I now use the nio strategy and never hit it.

- Mark

On Wed, Sep 16, 2015 at 12:17 PM Shawn Heisey  wrote:

> On 9/16/2015 9:32 AM, Mark Miller wrote:
> > Have you used jconsole or visualvm to see what it is actually hanging on
> to
> > there? Perhaps it is lock files that are not cleaned up or something
> else?
> >
> > You might try: find ~/.ivy2 -name "*.lck" -type f -exec rm {} \;
>
> If that does turn out to be the problem and deleting lockfiles fixes it,
> then you may be running into what I believe is a bug.  It is a bug that
> was (in theory) fixed in IVY-1388.
>
> https://issues.apache.org/jira/browse/IVY-1388
>
> I have seen the same problem even in version 2.3.0 which contains a fix
> for IVY-1388, so I filed a new issue:
>
> https://issues.apache.org/jira/browse/IVY-1489
>
> Thanks,
> Shawn
>
> --
- Mark
about.me/markrmiller


Re: Ant Ivy resolve / Authenticated Proxy Issue

2015-09-16 Thread Mark Miller
You should be able to easily see where the task is hanging in ivy code.

- Mark

On Wed, Sep 16, 2015 at 1:36 PM Susheel Kumar  wrote:

> Not really. There are no lock files & even after cleaning up lock files (to
> be sure) problem still persists.  It works outside company network but
> inside it stucks.  let me try to see if jconsole can show something
> meaningful.
>
> Thanks,
> Susheel
>
> On Wed, Sep 16, 2015 at 12:17 PM, Shawn Heisey 
> wrote:
>
> > On 9/16/2015 9:32 AM, Mark Miller wrote:
> > > Have you used jconsole or visualvm to see what it is actually hanging
> on
> > to
> > > there? Perhaps it is lock files that are not cleaned up or something
> > else?
> > >
> > > You might try: find ~/.ivy2 -name "*.lck" -type f -exec rm {} \;
> >
> > If that does turn out to be the problem and deleting lockfiles fixes it,
> > then you may be running into what I believe is a bug.  It is a bug that
> > was (in theory) fixed in IVY-1388.
> >
> > https://issues.apache.org/jira/browse/IVY-1388
> >
> > I have seen the same problem even in version 2.3.0 which contains a fix
> > for IVY-1388, so I filed a new issue:
> >
> > https://issues.apache.org/jira/browse/IVY-1489
> >
> > Thanks,
> > Shawn
> >
> >
>
-- 
- Mark
about.me/markrmiller


Re: SolrCloud clarification/Question

2015-09-16 Thread Ravi Solr
Thank you very much for responding Sameer so numShards=0 and
replicationFactr=4 if I have 4 machines ??

Thanks

Ravi Kiran Bhaskar

On Wed, Sep 16, 2015 at 12:56 PM, Sameer Maggon 
wrote:

> Absolutely. You can have a collection with just replicas and no shards for
> redundancy and have a load balancer in front of it that removes the
> dependency on a single node. One of them will assume the role of a leader,
> and in case that leader goes down, one of the replicas will be elected as a
> leader and your application will be fine.
>
> Thanks,
>
> On Wed, Sep 16, 2015 at 9:44 AM, Ravi Solr  wrote:
>
> > Hello,
> >  We are trying to move away from Master-Slave configuration to a
> > SolrCloud environment. I have a couple of questions. Currently in the
> > Master-Slave setup we have 4 Machines 2 of which are indexers and 2 of
> them
> > are query servers. The query servers are fronted via Load Balancer.
> >
> > There are 3 solr cores for 3 different/separate applications (mutually
> > exclusive). Each core is a complete index of all docs (i.e. the data is
> not
> > sharded).
> >
> >   We intend to keep it in a non-sharded mode even after the SolrCloud
> > mode.The prime motivation to move to cloud is to effectively use all
> > servers for indexing and querying (read fault tolerant/redundant).
> >
> > So, the real question is, can SolrCloud be used without shards ? i.e. a
> > "collection" resides entirely on one machine rather than partitioning
> data
> > onto different machines ?
> >
> > Thanks
> >
> > Ravi Kiran Bhaskar
> >
>
>
>
> --
> *Sameer Maggon*
> Measured Search
> c: 310.344.7266
> www.measuredsearch.com 
>


Re: SolrCloud clarification/Question

2015-09-16 Thread Sameer Maggon
You'll have to say numShards=1 and replicationFactor=2.

http://
[hostname]:8983/solr/admin/collections?action=CREATE&name=test&configName=test&numShards=1&replicationFactor=2

On Wed, Sep 16, 2015 at 11:23 AM, Ravi Solr  wrote:

> Thank you very much for responding Sameer so numShards=0 and
> replicationFactr=4 if I have 4 machines ??
>
> Thanks
>
> Ravi Kiran Bhaskar
>
> On Wed, Sep 16, 2015 at 12:56 PM, Sameer Maggon  >
> wrote:
>
> > Absolutely. You can have a collection with just replicas and no shards
> for
> > redundancy and have a load balancer in front of it that removes the
> > dependency on a single node. One of them will assume the role of a
> leader,
> > and in case that leader goes down, one of the replicas will be elected
> as a
> > leader and your application will be fine.
> >
> > Thanks,
> >
> > On Wed, Sep 16, 2015 at 9:44 AM, Ravi Solr  wrote:
> >
> > > Hello,
> > >  We are trying to move away from Master-Slave configuration to
> a
> > > SolrCloud environment. I have a couple of questions. Currently in the
> > > Master-Slave setup we have 4 Machines 2 of which are indexers and 2 of
> > them
> > > are query servers. The query servers are fronted via Load Balancer.
> > >
> > > There are 3 solr cores for 3 different/separate applications (mutually
> > > exclusive). Each core is a complete index of all docs (i.e. the data is
> > not
> > > sharded).
> > >
> > >   We intend to keep it in a non-sharded mode even after the
> SolrCloud
> > > mode.The prime motivation to move to cloud is to effectively use all
> > > servers for indexing and querying (read fault tolerant/redundant).
> > >
> > > So, the real question is, can SolrCloud be used without shards ? i.e. a
> > > "collection" resides entirely on one machine rather than partitioning
> > data
> > > onto different machines ?
> > >
> > > Thanks
> > >
> > > Ravi Kiran Bhaskar
> > >
> >
> >
> >
> > --
> > *Sameer Maggon*
> > Measured Search
> > c: 310.344.7266
> > www.measuredsearch.com 
> >
>



-- 
*Sameer Maggon*
Measured Search
c: 310.344.7266
www.measuredsearch.com 


Re: How to perform phonetic matching/query for multivalued string field

2015-09-16 Thread Upayavira


On Wed, Sep 16, 2015, at 06:37 PM, Jie Gao wrote:
> Hi,
> 
> 
> I want to query a list of terms indexed and stored in multivalued string
> field via Term Component. The term component can support exact matching
> and
> regex based fuzzy matching. However, Is any way i can configure scheme to
> do phonetic matching/query?

Phonetic matching is done at index time - that is - you use a
PhoneticFilterFactory in your analysis chain, such that you are doing
exact match lookups on the phonetic terms.

Make sense?

Upayavira


Re: Securing solr 5.2 basic auth permission rules

2015-09-16 Thread Anshum Gupta
Basic authentication (and the API support, that you're trying to use) was
only released with 5.3.0 so it wouldn't work with 5.2.
5.2 only had the authentication and authorization frameworks, and shipped
with Kerberos authentication plugin out of the box.

There are a few known issues with that though, and a 5.3.1 release is just
around the corner.

On Wed, Sep 16, 2015 at 10:11 AM, Aziz Gaou  wrote:

> Hi,
>
> I try to follow:
>
> https://cwiki.apache.org/confluence/display/solr/Basic+Authentication+Plugin
> ,
> to protect Solr 5.2 Admin with password, but I have not been able to
> secure.
>
> 1) When I run the following command:
>
> curl --user solr:SolrRocks http://localhost:8983/solr/admin/authentication
> -H 'Content-type:application/json'-d '{
>   "set-user": {"tom" : "TomIsCool" }}'
>
> no update on the file security.json
>
> 2) I launched the following 2 commands:
>
> curl --user solr:SolrRocks http://localhost:8983/solr/admin/authorization
> -H 'Content-type:application/json'-d '{"set-permission": {
> "name":"updates", "collection":"MyCollection", "role": "dev"}}'
>
> curl --user solr:SolrRocks http://localhost:8983/solr/admin/authorization
> -H 'Content-type:application/json' -d '{ "set-user-role": {"tom":["dev"}}'
>
> always MyCollection is not protected.
>
>
> thank you for your help.
>



-- 
Anshum Gupta


Re: SolrCloud clarification/Question

2015-09-16 Thread Ravi Solr
OK...I understood numShards=1, when you say replicationFactor=2 what does
it mean ? I have 4 machines, then, only 3 copies of data (1 at leader and 2
replicas) ?? so am i not under utilizing one machine ?

I was more thinking in the lines of a Mesh connectivity format i.e.
everybody has others copy so that I can put all 4 machines behind a Load
Balancer...Is that a wrong way to look at it ?

Thanks

Ravi Kiran

On Wed, Sep 16, 2015 at 2:51 PM, Sameer Maggon 
wrote:

> You'll have to say numShards=1 and replicationFactor=2.
>
> http://
>
> [hostname]:8983/solr/admin/collections?action=CREATE&name=test&configName=test&numShards=1&replicationFactor=2
>
> On Wed, Sep 16, 2015 at 11:23 AM, Ravi Solr  wrote:
>
> > Thank you very much for responding Sameer so numShards=0 and
> > replicationFactr=4 if I have 4 machines ??
> >
> > Thanks
> >
> > Ravi Kiran Bhaskar
> >
> > On Wed, Sep 16, 2015 at 12:56 PM, Sameer Maggon <
> sam...@measuredsearch.com
> > >
> > wrote:
> >
> > > Absolutely. You can have a collection with just replicas and no shards
> > for
> > > redundancy and have a load balancer in front of it that removes the
> > > dependency on a single node. One of them will assume the role of a
> > leader,
> > > and in case that leader goes down, one of the replicas will be elected
> > as a
> > > leader and your application will be fine.
> > >
> > > Thanks,
> > >
> > > On Wed, Sep 16, 2015 at 9:44 AM, Ravi Solr  wrote:
> > >
> > > > Hello,
> > > >  We are trying to move away from Master-Slave configuration
> to
> > a
> > > > SolrCloud environment. I have a couple of questions. Currently in the
> > > > Master-Slave setup we have 4 Machines 2 of which are indexers and 2
> of
> > > them
> > > > are query servers. The query servers are fronted via Load Balancer.
> > > >
> > > > There are 3 solr cores for 3 different/separate applications
> (mutually
> > > > exclusive). Each core is a complete index of all docs (i.e. the data
> is
> > > not
> > > > sharded).
> > > >
> > > >   We intend to keep it in a non-sharded mode even after the
> > SolrCloud
> > > > mode.The prime motivation to move to cloud is to effectively use all
> > > > servers for indexing and querying (read fault tolerant/redundant).
> > > >
> > > > So, the real question is, can SolrCloud be used without shards ?
> i.e. a
> > > > "collection" resides entirely on one machine rather than partitioning
> > > data
> > > > onto different machines ?
> > > >
> > > > Thanks
> > > >
> > > > Ravi Kiran Bhaskar
> > > >
> > >
> > >
> > >
> > > --
> > > *Sameer Maggon*
> > > Measured Search
> > > c: 310.344.7266
> > > www.measuredsearch.com 
> > >
> >
>
>
>
> --
> *Sameer Maggon*
> Measured Search
> c: 310.344.7266
> www.measuredsearch.com 
>


Re: SolrCloud clarification/Question

2015-09-16 Thread Sameer Maggon
I just gave an example API call, but for your scenario, the
replicationFactor will be 4 (replicationFactor=4). In this way, all 4
machines will have the same copy of the data and you can put an LB in front
of those 4 machines.

On Wed, Sep 16, 2015 at 12:00 PM, Ravi Solr  wrote:

> OK...I understood numShards=1, when you say replicationFactor=2 what does
> it mean ? I have 4 machines, then, only 3 copies of data (1 at leader and 2
> replicas) ?? so am i not under utilizing one machine ?
>
> I was more thinking in the lines of a Mesh connectivity format i.e.
> everybody has others copy so that I can put all 4 machines behind a Load
> Balancer...Is that a wrong way to look at it ?
>
> Thanks
>
> Ravi Kiran
>
> On Wed, Sep 16, 2015 at 2:51 PM, Sameer Maggon 
> wrote:
>
> > You'll have to say numShards=1 and replicationFactor=2.
> >
> > http://
> >
> >
> [hostname]:8983/solr/admin/collections?action=CREATE&name=test&configName=test&numShards=1&replicationFactor=2
> >
> > On Wed, Sep 16, 2015 at 11:23 AM, Ravi Solr  wrote:
> >
> > > Thank you very much for responding Sameer so numShards=0 and
> > > replicationFactr=4 if I have 4 machines ??
> > >
> > > Thanks
> > >
> > > Ravi Kiran Bhaskar
> > >
> > > On Wed, Sep 16, 2015 at 12:56 PM, Sameer Maggon <
> > sam...@measuredsearch.com
> > > >
> > > wrote:
> > >
> > > > Absolutely. You can have a collection with just replicas and no
> shards
> > > for
> > > > redundancy and have a load balancer in front of it that removes the
> > > > dependency on a single node. One of them will assume the role of a
> > > leader,
> > > > and in case that leader goes down, one of the replicas will be
> elected
> > > as a
> > > > leader and your application will be fine.
> > > >
> > > > Thanks,
> > > >
> > > > On Wed, Sep 16, 2015 at 9:44 AM, Ravi Solr 
> wrote:
> > > >
> > > > > Hello,
> > > > >  We are trying to move away from Master-Slave configuration
> > to
> > > a
> > > > > SolrCloud environment. I have a couple of questions. Currently in
> the
> > > > > Master-Slave setup we have 4 Machines 2 of which are indexers and 2
> > of
> > > > them
> > > > > are query servers. The query servers are fronted via Load Balancer.
> > > > >
> > > > > There are 3 solr cores for 3 different/separate applications
> > (mutually
> > > > > exclusive). Each core is a complete index of all docs (i.e. the
> data
> > is
> > > > not
> > > > > sharded).
> > > > >
> > > > >   We intend to keep it in a non-sharded mode even after the
> > > SolrCloud
> > > > > mode.The prime motivation to move to cloud is to effectively use
> all
> > > > > servers for indexing and querying (read fault tolerant/redundant).
> > > > >
> > > > > So, the real question is, can SolrCloud be used without shards ?
> > i.e. a
> > > > > "collection" resides entirely on one machine rather than
> partitioning
> > > > data
> > > > > onto different machines ?
> > > > >
> > > > > Thanks
> > > > >
> > > > > Ravi Kiran Bhaskar
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > *Sameer Maggon*
> > > > Measured Search
> > > > c: 310.344.7266
> > > > www.measuredsearch.com 
> > > >
> > >
> >
> >
> >
> > --
> > *Sameer Maggon*
> > Measured Search
> > c: 310.344.7266
> > www.measuredsearch.com 
> >
>



-- 
*Sameer Maggon*
Measured Search
c: 310.344.7266
www.measuredsearch.com 


Re: How to perform phonetic matching/query for multivalued string field

2015-09-16 Thread Jie Gao
I understand that i can configure "solr.PhoneticFilterFactory" for both
indexing and query time for "solr.TextField". However, i want to query a
list of term (indexed and stored) from a field ordered by phonetic
similarity, which can be easily done by most of relational database.

Term Component allows me to perform exactly matching and regex based fuzzy
matching from multi-valued field. However, the solr string field does not
allow to customise the default analyser. Is there any other way to
circumvent the problem?

thanks,
Jerry



On 16 September 2015 at 19:55, Upayavira  wrote:

>
>
> On Wed, Sep 16, 2015, at 06:37 PM, Jie Gao wrote:
> > Hi,
> >
> >
> > I want to query a list of terms indexed and stored in multivalued string
> > field via Term Component. The term component can support exact matching
> > and
> > regex based fuzzy matching. However, Is any way i can configure scheme to
> > do phonetic matching/query?
>
> Phonetic matching is done at index time - that is - you use a
> PhoneticFilterFactory in your analysis chain, such that you are doing
> exact match lookups on the phonetic terms.
>
> Make sense?
>
> Upayavira
>


Re: How to perform phonetic matching/query for multivalued string field

2015-09-16 Thread Upayavira
If you want to analyse a string field, use the KeywordTokenizer - it
just passes the whole field through as a single tokenizer.

Does that get you there?

On Wed, Sep 16, 2015, at 08:52 PM, Jie Gao wrote:
> I understand that i can configure "solr.PhoneticFilterFactory" for both
> indexing and query time for "solr.TextField". However, i want to query a
> list of term (indexed and stored) from a field ordered by phonetic
> similarity, which can be easily done by most of relational database.
> 
> Term Component allows me to perform exactly matching and regex based
> fuzzy
> matching from multi-valued field. However, the solr string field does not
> allow to customise the default analyser. Is there any other way to
> circumvent the problem?
> 
> thanks,
> Jerry
> 
> 
> 
> On 16 September 2015 at 19:55, Upayavira  wrote:
> 
> >
> >
> > On Wed, Sep 16, 2015, at 06:37 PM, Jie Gao wrote:
> > > Hi,
> > >
> > >
> > > I want to query a list of terms indexed and stored in multivalued string
> > > field via Term Component. The term component can support exact matching
> > > and
> > > regex based fuzzy matching. However, Is any way i can configure scheme to
> > > do phonetic matching/query?
> >
> > Phonetic matching is done at index time - that is - you use a
> > PhoneticFilterFactory in your analysis chain, such that you are doing
> > exact match lookups on the phonetic terms.
> >
> > Make sense?
> >
> > Upayavira
> >


Re: How to perform phonetic matching/query for multivalued string field

2015-09-16 Thread Upayavira
That is, use a TextField plus a KeywordTokenizerFactory, rather than a
StringField

On Wed, Sep 16, 2015, at 09:03 PM, Upayavira wrote:
> If you want to analyse a string field, use the KeywordTokenizer - it
> just passes the whole field through as a single tokenizer.
> 
> Does that get you there?
> 
> On Wed, Sep 16, 2015, at 08:52 PM, Jie Gao wrote:
> > I understand that i can configure "solr.PhoneticFilterFactory" for both
> > indexing and query time for "solr.TextField". However, i want to query a
> > list of term (indexed and stored) from a field ordered by phonetic
> > similarity, which can be easily done by most of relational database.
> > 
> > Term Component allows me to perform exactly matching and regex based
> > fuzzy
> > matching from multi-valued field. However, the solr string field does not
> > allow to customise the default analyser. Is there any other way to
> > circumvent the problem?
> > 
> > thanks,
> > Jerry
> > 
> > 
> > 
> > On 16 September 2015 at 19:55, Upayavira  wrote:
> > 
> > >
> > >
> > > On Wed, Sep 16, 2015, at 06:37 PM, Jie Gao wrote:
> > > > Hi,
> > > >
> > > >
> > > > I want to query a list of terms indexed and stored in multivalued string
> > > > field via Term Component. The term component can support exact matching
> > > > and
> > > > regex based fuzzy matching. However, Is any way i can configure scheme 
> > > > to
> > > > do phonetic matching/query?
> > >
> > > Phonetic matching is done at index time - that is - you use a
> > > PhoneticFilterFactory in your analysis chain, such that you are doing
> > > exact match lookups on the phonetic terms.
> > >
> > > Make sense?
> > >
> > > Upayavira
> > >


Re: How to perform phonetic matching/query for multivalued string field

2015-09-16 Thread Jie Gao
Many thanks for your suggestion.

It works well for querying the field with phonetic matching and responses a
list of docs tagged with the term.

However, is there any way that i can get a list of matched terms ? The
phonetic matching seems not work with Term Component (i'm using terms.regex
to filter).

Jie Gao,
Research Assistant,
Department of Computer Science, The University of Sheffield,
Regent Court, 211 Portobello, S1 4DP, Sheffield, UK

On 16 September 2015 at 21:04, Upayavira  wrote:

> That is, use a TextField plus a KeywordTokenizerFactory, rather than a
> StringField
>
> On Wed, Sep 16, 2015, at 09:03 PM, Upayavira wrote:
> > If you want to analyse a string field, use the KeywordTokenizer - it
> > just passes the whole field through as a single tokenizer.
> >
> > Does that get you there?
> >
> > On Wed, Sep 16, 2015, at 08:52 PM, Jie Gao wrote:
> > > I understand that i can configure "solr.PhoneticFilterFactory" for both
> > > indexing and query time for "solr.TextField". However, i want to query
> a
> > > list of term (indexed and stored) from a field ordered by phonetic
> > > similarity, which can be easily done by most of relational database.
> > >
> > > Term Component allows me to perform exactly matching and regex based
> > > fuzzy
> > > matching from multi-valued field. However, the solr string field does
> not
> > > allow to customise the default analyser. Is there any other way to
> > > circumvent the problem?
> > >
> > > thanks,
> > > Jerry
> > >
> > >
> > >
> > > On 16 September 2015 at 19:55, Upayavira  wrote:
> > >
> > > >
> > > >
> > > > On Wed, Sep 16, 2015, at 06:37 PM, Jie Gao wrote:
> > > > > Hi,
> > > > >
> > > > >
> > > > > I want to query a list of terms indexed and stored in multivalued
> string
> > > > > field via Term Component. The term component can support exact
> matching
> > > > > and
> > > > > regex based fuzzy matching. However, Is any way i can configure
> scheme to
> > > > > do phonetic matching/query?
> > > >
> > > > Phonetic matching is done at index time - that is - you use a
> > > > PhoneticFilterFactory in your analysis chain, such that you are doing
> > > > exact match lookups on the phonetic terms.
> > > >
> > > > Make sense?
> > > >
> > > > Upayavira
> > > >
>


Understanding SOLR 5.3.0

2015-09-16 Thread vetrik kumaran murugesan
Hi Team,

Can you please help me understand the following usage of below mentioned
jar files, in apache Solr 5.3.0,

1. Tagsoup 1.2.1
2. Junit4-ant v 2.1.13
 3. com.googlecode.juniversalchardet v1.0.3


2.  Is it right to ask , can we rebuild  solr 5.3.0 without/replacing
above mentioned  files?


I am trying to evaluate  Solr 5.3.0   and recommend  the same for our
clients.  Appreciate your help  in advance.


Regards,

Vetrikkumaran Murugesan


Getting exception doing a distributed grouping request

2015-09-16 Thread Shawn Heisey
This is a very strange error.  I have another index (nearly identical
solrconfig.xml and similar schema) running Solr 4.9.1 on Oracle JDK 8u60
which works perfectly.  Those systems are running Ubuntu 14.

Sending to a different index on different servers running under Oracle
JDK 7u72 on CentOS 6 (one copy of the index is running 4.7.2 and the
other is running 4.9.1), I get an exception.  It does appear to at least
partially succeed in running the request -- the response is over 5000
lines long, and except for the very end, looks like a good response.

This is the (slightly redacted) URL I'm trying -- it is for a monitoring
script that pulls all the most recent documents and groups it by
provider, with 10 docs for each provider.

http://idxb1.REDACTED.com:8981/solr/ncmain/lbcheck?q=*:*&indent=true&rows=1000&fl=did,tag_id,post_date&group=true&group.field=ip&group.limit=10&group.sort=post_date%20desc

The "ncmain" core is a core with an empty index that includes a "shards"
parameter in solrconfig.xml and a "shards.qt" parameter to send it to
the same handler (/lbcheck) where the request was received.

If I send the request individually to all the shards, every shard works,
but as soon as I send it distributed, I get the following exception. 
This is on Solr 4.9.1.  Solr 4.7.2 is similar, except the error is
missing the stacktrace, I only see the "NullPointerException" error with
nothing else.

java.lang.NullPointerException
at
org.apache.solr.response.XMLWriter.writeSolrDocument(XMLWriter.java:191)
at
org.apache.solr.response.TextResponseWriter.writeSolrDocumentList(TextResponseWriter.java:220)
at
org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:182)
at org.apache.solr.response.XMLWriter.writeNamedList(XMLWriter.java:234)
at
org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:186)
at org.apache.solr.response.XMLWriter.writeArray(XMLWriter.java:280)
at
org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:188)
at org.apache.solr.response.XMLWriter.writeNamedList(XMLWriter.java:234)
at
org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:186)
at org.apache.solr.response.XMLWriter.writeNamedList(XMLWriter.java:234)
at
org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:186)
at org.apache.solr.response.XMLWriter.writeResponse(XMLWriter.java:112)
at
org.apache.solr.response.XMLResponseWriter.write(XMLResponseWriter.java:40)
at
org.apache.solr.servlet.SolrDispatchFilter.writeResponse(SolrDispatchFilter.java:765)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:426)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
at
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1476)
at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
at
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:745)

The same thi

Re: Understanding SOLR 5.3.0

2015-09-16 Thread Upayavira


On Wed, Sep 16, 2015, at 10:47 PM, vetrik kumaran murugesan wrote:
> Hi Team,
> 
> Can you please help me understand the following usage of below mentioned
> jar files, in apache Solr 5.3.0,
> 
> 1. Tagsoup 1.2.1
> 2. Junit4-ant v 2.1.13
>  3. com.googlecode.juniversalchardet v1.0.3
> 
> 
> 2.  Is it right to ask , can we rebuild  solr 5.3.0 without/replacing
> above mentioned  files?

Why are you wanting to do this? What particular problem do you have with
those files?

According to http://home.ccil.org/~cowan/tagsoup/, Tagsoup from 1.2 is
Apache Licensed, so is compatible.
According to http://labs.carrotsearch.com/randomizedtesting.html,
junit4-ant is also Apache Licensed.
According to https://code.google.com/p/juniversalchardet/,
com.googlecode.juniversalchardet is licensed under the MPL1.1. As noted
here:http://www.apache.org/legal/resolved.html, MPL1.1 is acceptable
within an ASF project so long as it is distributed only in binary form.

> I am trying to evaluate  Solr 5.3.0   and recommend  the same for our
> clients.  Appreciate your help  in advance.

How does the inclusion or exclusion of these libraries impact upon
whether or not you will recommend Solr 5.3.0?

Upayavira


Re: How to perform phonetic matching/query for multivalued string field

2015-09-16 Thread Upayavira
I bet the terms component does not analyse the terms, so you will need
to hand in already analysed phonetic terms. You could use the
http://localhost:8983/solr/YOUR-CORE/analysis/field URL to have Solr
analyse the field for you before passing it back to the term component.

Upayavira

On Wed, Sep 16, 2015, at 10:03 PM, Jie Gao wrote:
> Many thanks for your suggestion.
> 
> It works well for querying the field with phonetic matching and responses
> a
> list of docs tagged with the term.
> 
> However, is there any way that i can get a list of matched terms ? The
> phonetic matching seems not work with Term Component (i'm using
> terms.regex
> to filter).
> 
> Jie Gao,
> Research Assistant,
> Department of Computer Science, The University of Sheffield,
> Regent Court, 211 Portobello, S1 4DP, Sheffield, UK
> 
> On 16 September 2015 at 21:04, Upayavira  wrote:
> 
> > That is, use a TextField plus a KeywordTokenizerFactory, rather than a
> > StringField
> >
> > On Wed, Sep 16, 2015, at 09:03 PM, Upayavira wrote:
> > > If you want to analyse a string field, use the KeywordTokenizer - it
> > > just passes the whole field through as a single tokenizer.
> > >
> > > Does that get you there?
> > >
> > > On Wed, Sep 16, 2015, at 08:52 PM, Jie Gao wrote:
> > > > I understand that i can configure "solr.PhoneticFilterFactory" for both
> > > > indexing and query time for "solr.TextField". However, i want to query
> > a
> > > > list of term (indexed and stored) from a field ordered by phonetic
> > > > similarity, which can be easily done by most of relational database.
> > > >
> > > > Term Component allows me to perform exactly matching and regex based
> > > > fuzzy
> > > > matching from multi-valued field. However, the solr string field does
> > not
> > > > allow to customise the default analyser. Is there any other way to
> > > > circumvent the problem?
> > > >
> > > > thanks,
> > > > Jerry
> > > >
> > > >
> > > >
> > > > On 16 September 2015 at 19:55, Upayavira  wrote:
> > > >
> > > > >
> > > > >
> > > > > On Wed, Sep 16, 2015, at 06:37 PM, Jie Gao wrote:
> > > > > > Hi,
> > > > > >
> > > > > >
> > > > > > I want to query a list of terms indexed and stored in multivalued
> > string
> > > > > > field via Term Component. The term component can support exact
> > matching
> > > > > > and
> > > > > > regex based fuzzy matching. However, Is any way i can configure
> > scheme to
> > > > > > do phonetic matching/query?
> > > > >
> > > > > Phonetic matching is done at index time - that is - you use a
> > > > > PhoneticFilterFactory in your analysis chain, such that you are doing
> > > > > exact match lookups on the phonetic terms.
> > > > >
> > > > > Make sense?
> > > > >
> > > > > Upayavira
> > > > >
> >


Re: SolrCloud clarification/Question

2015-09-16 Thread Erick Erickson
Ravi:

Sameer is correct on how to get it done in one go.

Don't get too hung up on replicationFactor. You can always
ADDREPLICA after the collection is created if you need to.

Best,
Erick


On Wed, Sep 16, 2015 at 12:44 PM, Sameer Maggon
 wrote:
> I just gave an example API call, but for your scenario, the
> replicationFactor will be 4 (replicationFactor=4). In this way, all 4
> machines will have the same copy of the data and you can put an LB in front
> of those 4 machines.
>
> On Wed, Sep 16, 2015 at 12:00 PM, Ravi Solr  wrote:
>
>> OK...I understood numShards=1, when you say replicationFactor=2 what does
>> it mean ? I have 4 machines, then, only 3 copies of data (1 at leader and 2
>> replicas) ?? so am i not under utilizing one machine ?
>>
>> I was more thinking in the lines of a Mesh connectivity format i.e.
>> everybody has others copy so that I can put all 4 machines behind a Load
>> Balancer...Is that a wrong way to look at it ?
>>
>> Thanks
>>
>> Ravi Kiran
>>
>> On Wed, Sep 16, 2015 at 2:51 PM, Sameer Maggon 
>> wrote:
>>
>> > You'll have to say numShards=1 and replicationFactor=2.
>> >
>> > http://
>> >
>> >
>> [hostname]:8983/solr/admin/collections?action=CREATE&name=test&configName=test&numShards=1&replicationFactor=2
>> >
>> > On Wed, Sep 16, 2015 at 11:23 AM, Ravi Solr  wrote:
>> >
>> > > Thank you very much for responding Sameer so numShards=0 and
>> > > replicationFactr=4 if I have 4 machines ??
>> > >
>> > > Thanks
>> > >
>> > > Ravi Kiran Bhaskar
>> > >
>> > > On Wed, Sep 16, 2015 at 12:56 PM, Sameer Maggon <
>> > sam...@measuredsearch.com
>> > > >
>> > > wrote:
>> > >
>> > > > Absolutely. You can have a collection with just replicas and no
>> shards
>> > > for
>> > > > redundancy and have a load balancer in front of it that removes the
>> > > > dependency on a single node. One of them will assume the role of a
>> > > leader,
>> > > > and in case that leader goes down, one of the replicas will be
>> elected
>> > > as a
>> > > > leader and your application will be fine.
>> > > >
>> > > > Thanks,
>> > > >
>> > > > On Wed, Sep 16, 2015 at 9:44 AM, Ravi Solr 
>> wrote:
>> > > >
>> > > > > Hello,
>> > > > >  We are trying to move away from Master-Slave configuration
>> > to
>> > > a
>> > > > > SolrCloud environment. I have a couple of questions. Currently in
>> the
>> > > > > Master-Slave setup we have 4 Machines 2 of which are indexers and 2
>> > of
>> > > > them
>> > > > > are query servers. The query servers are fronted via Load Balancer.
>> > > > >
>> > > > > There are 3 solr cores for 3 different/separate applications
>> > (mutually
>> > > > > exclusive). Each core is a complete index of all docs (i.e. the
>> data
>> > is
>> > > > not
>> > > > > sharded).
>> > > > >
>> > > > >   We intend to keep it in a non-sharded mode even after the
>> > > SolrCloud
>> > > > > mode.The prime motivation to move to cloud is to effectively use
>> all
>> > > > > servers for indexing and querying (read fault tolerant/redundant).
>> > > > >
>> > > > > So, the real question is, can SolrCloud be used without shards ?
>> > i.e. a
>> > > > > "collection" resides entirely on one machine rather than
>> partitioning
>> > > > data
>> > > > > onto different machines ?
>> > > > >
>> > > > > Thanks
>> > > > >
>> > > > > Ravi Kiran Bhaskar
>> > > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > *Sameer Maggon*
>> > > > Measured Search
>> > > > c: 310.344.7266
>> > > > www.measuredsearch.com 
>> > > >
>> > >
>> >
>> >
>> >
>> > --
>> > *Sameer Maggon*
>> > Measured Search
>> > c: 310.344.7266
>> > www.measuredsearch.com 
>> >
>>
>
>
>
> --
> *Sameer Maggon*
> Measured Search
> c: 310.344.7266
> www.measuredsearch.com 


Re: solr training

2015-09-16 Thread William Bell
How about in Denver?

On Sun, Sep 13, 2015 at 7:53 PM, Otis Gospodnetić <
otis.gospodne...@gmail.com> wrote:

> Hi Tim,
>
> A slightly delayed reply ;)
> We are running Solr training in NYC next month -
> http://sematext.com/training/solr-training.html - 2nd seat is 50% off.
>
> Otis
> --
> Monitoring * Alerting * Anomaly Detection * Centralized Log Management
> Solr & Elasticsearch Support * http://sematext.com/
>
>
> On Fri, May 1, 2015 at 2:18 PM, Tim Dunphy  wrote:
>
> > Hey guys,
> >
> >  My company has a training budget that it wants me to use. So what I'd
> like
> > to find out is if there is any instructor lead courses in the NY/NJ area,
> > or courses online that are instructor lead that you could recommend?
> >
> > Thanks,
> > Tim
> >
> > --
> > GPG me!!
> >
> > gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
> >
>



-- 
Bill Bell
billnb...@gmail.com
cell 720-256-8076


Does more shards in core improve performance?

2015-09-16 Thread Zheng Lin Edwin Yeo
Hi,

Would like to check, does creating more shards for the core improve the
overall performance? I'm using Solr 5.3.0.

I tried the indexing for a core with 1 shard and another core with 2
shards, but both are taking the same amount of time to do the indexing.

Currently, both my shards are in the same machine. Will the performance be
improved if the shards are located in different machine?


Regards,
Edwin


Re: Does more shards in core improve performance?

2015-09-16 Thread Shalin Shekhar Mangar
Yes, of course, the only reason to have more shards is so that they
can reside on different machines (or use different disks, assuming you
have enough CPU/memory etc) so that you can scale your indexing
throughput. Move one of them to a different machine and measure the
performance.

On Thu, Sep 17, 2015 at 11:32 AM, Zheng Lin Edwin Yeo
 wrote:
> Hi,
>
> Would like to check, does creating more shards for the core improve the
> overall performance? I'm using Solr 5.3.0.
>
> I tried the indexing for a core with 1 shard and another core with 2
> shards, but both are taking the same amount of time to do the indexing.
>
> Currently, both my shards are in the same machine. Will the performance be
> improved if the shards are located in different machine?
>
>
> Regards,
> Edwin



-- 
Regards,
Shalin Shekhar Mangar.


Re: 5 second timeout in bin/solr stop command

2015-09-16 Thread Ere Maijala

16.9.2015, 16.16, Shawn Heisey kirjoitti:

I agree here.  I don't like the forceful termination unless it becomes
truly necessary.

I changed the timeout to 20 seconds in the script installed in
/etc/init.d ... a bit of a brute force approach.  When I find some time,
I will think about how to make this better, and choose a better default
value.  30 seconds is probably good.  It should also be configurable,
probably in the /var/solr/solr.in.sh config fragment.


Thanks, Shawn. Insprired by this I filed an issue and attached a patch 
in Jira, see https://issues.apache.org/jira/browse/SOLR-8065. The patch 
makes the stop function behave like start so that it waits up to 30 
seconds for the process to shut down and checks the status once a 
second. I didn't make the timeout configurable since I think 30 seconds 
should be enough in any situation (this may be a statement I'll regret 
later..) and the script doesn't wait any longer than necessary. But if 
you find that a necessity, it shouldn't be too difficult to add.


--Ere

--
Ere Maijala
Kansalliskirjasto / The National Library of Finland