Re: SolrCloud 4.8 - Transaction log size over 1GB

2015-05-24 Thread Vincenzo D'Amore
Thanks Shawn for your prompt support.

Best regards,
Vincenzo

On Sun, May 24, 2015 at 6:45 AM, Shawn Heisey  wrote:

> On 5/23/2015 9:41 PM, Vincenzo D'Amore wrote:
> > Thanks Shawn,
> >
> > may be this is a silly question, but I looked around and didn't find an
> > answer...
> > Well, could I update solrconfig.xml for the collection while the
> instances
> > are running or should I restart the cluster/reload the cores?
>
> You can upload a new config to zookeeper with the zkcli program while
> Solr is running, and nothing will change, at least not immediately.  The
> new config will take effect when you reload the collection or restart
> all the Solr instances.
>
> Thanks,
> Shawn
>
>


Re: A Synonym Searching for Phrase?

2015-05-24 Thread Ryan Yacyshyn
Thanks all for your suggestions.

What we've done in the end - and I'm not so sure why it works - is adding
"s-pass, spass, s pass" to the synonyms.txt file rather than s-pass, spass
=> s pass.







On Fri, 15 May 2015 at 16:02 Rajani Maski  wrote:

> Hi Ryan,
>
> I am not really sure whether this[1] solution mentioned in the link below
> can work for your case considering its cons. However, I recommend having a
> quick look at it.
>
> @Chris, Would eagerly wait for your contribution.
>
>
> [1] https://support.lucidworks.com/hc/en-us/articles/205359448
>
>
>
> On Thu, May 14, 2015 at 11:30 PM, Chris Morley 
> wrote:
>
> > I have implemented that but it's not open sourced yet.  It will be soon.
> >
> >  -Chris.
> >
> >
> >
> >
> > 
> >  From: "Ryan Yacyshyn" 
> > Sent: Thursday, May 14, 2015 12:07 PM
> > To: solr-user@lucene.apache.org
> > Subject: A Synonym Searching for Phrase?
> > Hi All,
> >
> > I'm running into an issue where I have some tokens that really mean the
> > same thing as two. For example, there are a couple ways users might want
> > to
> > search for certain type of visa called the "s pass", but they might query
> > for spass or s-pass.
> >
> > I thought I could add a line in my synonym file to solve this, such as:
> >
> > s-pass, spass => s pass
> >
> > This doesn't seem to work. I found an Auto Phrase TokenFilter (
> > https://github.com/LucidWorks/auto-phrase-tokenfilter) that looks like
> it
> > might help, but it sounds like it needs to use a specific query parser as
> > well (we're using edismax).
> >
> > Has anyone came across this specific problem before? Would really
> > appreciate your suggestions / help.
> >
> > We're using Solr 4.8.x (and lucidWorks 2.9).
> >
> > Thanks!
> > Ryan
> >
> >
> >
>


Re: Multivalued OR query with equal score/rankings when any one value matches

2015-05-24 Thread Troy Collinsworth
Thanks, that worked perfectly and is far simpler than extending
DefaultSimilarity which I did last night.

Hope this helps others who are trying to implement recommendation. The Solr
in Action book gives a great start on recommendation, but lacks important
details on collaborative filtering implementation (this issue specifically).

-Troy

On Sat, May 23, 2015 at 9:33 PM, Yonik Seeley  wrote:

> On Sat, May 23, 2015 at 1:29 PM, Troy Collinsworth
>  wrote:
> > While trying to query a multivalued String field for multiple values,
> when
> > any one value matches the score is higher for the lower value and lower
> for
> > the higher. I swapped the value order and it had no affect so it isn't
> > positional. I want the score to be the same irrespective of the value
> > matched. I also still want the score highest when both values match.
>
> It's a bit cumbersome, but you can make each clause a constant score query.
> http://yonik.com/solr/query-syntax/#ConstantScoreQuery
>
> userIds:890^=1 userIds:931^=1
> or I think the following should work as well:
> userIds:(890^=1 931^=1)
>
> -Yonik
>


Re: SolrCloud 4.8 - Transaction log size over 1GB

2015-05-24 Thread Erick Erickson
Vincenzo:

Here's perhaps more than you want to know about hard commits, soft
commits and transaction logs:

http://lucidworks.com/blog/understanding-transaction-logs-softcommit-and-commit-in-sorlcloud/

Best,
Erick

On Sun, May 24, 2015 at 12:04 AM, Vincenzo D'Amore  wrote:
> Thanks Shawn for your prompt support.
>
> Best regards,
> Vincenzo
>
> On Sun, May 24, 2015 at 6:45 AM, Shawn Heisey  wrote:
>
>> On 5/23/2015 9:41 PM, Vincenzo D'Amore wrote:
>> > Thanks Shawn,
>> >
>> > may be this is a silly question, but I looked around and didn't find an
>> > answer...
>> > Well, could I update solrconfig.xml for the collection while the
>> instances
>> > are running or should I restart the cluster/reload the cores?
>>
>> You can upload a new config to zookeeper with the zkcli program while
>> Solr is running, and nothing will change, at least not immediately.  The
>> new config will take effect when you reload the collection or restart
>> all the Solr instances.
>>
>> Thanks,
>> Shawn
>>
>>


Re: A Synonym Searching for Phrase?

2015-05-24 Thread Gopal Patwa
you might have this filter in query analyzer, which can spit token "s-pass"

https://cwiki.apache.org/confluence/display/solr/Filter+Descriptions#FilterDescriptions-WordDelimiterFilter


On Sun, May 24, 2015 at 5:36 AM, Ryan Yacyshyn 
wrote:

> Thanks all for your suggestions.
>
> What we've done in the end - and I'm not so sure why it works - is adding
> "s-pass, spass, s pass" to the synonyms.txt file rather than s-pass, spass
> => s pass.
>
>
>
>
>
>
>
> On Fri, 15 May 2015 at 16:02 Rajani Maski  wrote:
>
> > Hi Ryan,
> >
> > I am not really sure whether this[1] solution mentioned in the link below
> > can work for your case considering its cons. However, I recommend having
> a
> > quick look at it.
> >
> > @Chris, Would eagerly wait for your contribution.
> >
> >
> > [1] https://support.lucidworks.com/hc/en-us/articles/205359448
> >
> >
> >
> > On Thu, May 14, 2015 at 11:30 PM, Chris Morley 
> > wrote:
> >
> > > I have implemented that but it's not open sourced yet.  It will be
> soon.
> > >
> > >  -Chris.
> > >
> > >
> > >
> > >
> > > 
> > >  From: "Ryan Yacyshyn" 
> > > Sent: Thursday, May 14, 2015 12:07 PM
> > > To: solr-user@lucene.apache.org
> > > Subject: A Synonym Searching for Phrase?
> > > Hi All,
> > >
> > > I'm running into an issue where I have some tokens that really mean the
> > > same thing as two. For example, there are a couple ways users might
> want
> > > to
> > > search for certain type of visa called the "s pass", but they might
> query
> > > for spass or s-pass.
> > >
> > > I thought I could add a line in my synonym file to solve this, such as:
> > >
> > > s-pass, spass => s pass
> > >
> > > This doesn't seem to work. I found an Auto Phrase TokenFilter (
> > > https://github.com/LucidWorks/auto-phrase-tokenfilter) that looks like
> > it
> > > might help, but it sounds like it needs to use a specific query parser
> as
> > > well (we're using edismax).
> > >
> > > Has anyone came across this specific problem before? Would really
> > > appreciate your suggestions / help.
> > >
> > > We're using Solr 4.8.x (and lucidWorks 2.9).
> > >
> > > Thanks!
> > > Ryan
> > >
> > >
> > >
> >
>


Re: Applying gzip compression in Solr 5.1

2015-05-24 Thread William Bell
OK I got mine to work with 4.10.4 and it also works on 5.1...

mkdir war cp ../solr-4.10.4/example/webapps/solr.war . jar xvf
solr.war cd WEB-INF vi web.xmlAdd this above the  already
there:GzipFilter
org.eclipse.jetty.servlets.GzipFilter
   mimeTypes
   
application/xml,application/json,text/html,text/plain,text/xml,application/xhtml+xml,text/css,application/javascript,image/svg+xml,application/x-javascript,text/css

GzipFilter
/* cd .. rm solr.war
jar cvf solr.war * cp solr.war ../solr-4.10.4/example/webapps/solr.war
get jetty-servlets-8.1.10.v20130312.jar from
http://www.eclipse.org/downloads/download.php?file=/jetty/updates/jetty-bundles-8.x/8.1.10.v20130312/Jetty-bundles-repository-8.1.10.v20130312.zip&mirror_id=454
(notice the name has to be exactly that) and put into
solr-4.10.4/example/lib restart


On Thu, May 21, 2015 at 11:31 PM, Zheng Lin Edwin Yeo 
wrote:

> Hi,
>
> I'm trying to apply gzip compression in Solr 5.1. I understand that Running
> Solr on Tomcat is no longer supported from Solr 5.0, so I've tried to
> implement it in Solr.
>
> I've downloaded jetty-servlets-9.3.0.RC0.jar and placed it in my
> webapp\WEB-INF folder, and have added the following in
> webapp\WEB-INF\web.xml
>
>   
> GzipFilter
> org.eclipse.jetty.servlets.GzipFilter
> 
>   methods
>   GET,POST
>   mimeTypes
>
>
> text/html;charset=UTF-8,text/plain,text/xml,text/json,text/javascript,text/css,text/plain;charset=UTF-8,application/xhtml+xml,application/javascript,image/svg+xml,application/json,application/xml;
> charset=UTF-8
> 
>   
>   
> GzipFilter
> /*
>   
>
>
> However, when I start Solr and check the browser, there's no gzip
> compression. Is there anything which I configure wrongly or might have
> missed out? I'm also running zookeeper-3.4.6.
>
>
> Regards,
> Edwin
>



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


Re: Applying gzip compression in Solr 5.1

2015-05-24 Thread Zheng Lin Edwin Yeo
Thanks for your reply.
Do we still have to use back the solr.war file in Solr 5.1 in order to get
the gzip working?


Regards,
Edwin



On 25 May 2015 at 06:57, William Bell  wrote:

> OK I got mine to work with 4.10.4 and it also works on 5.1...
>
> mkdir war cp ../solr-4.10.4/example/webapps/solr.war . jar xvf
> solr.war cd WEB-INF vi web.xmlAdd this above the  already
> there:GzipFilter
> org.eclipse.jetty.servlets.GzipFilter
>mimeTypes
>
>  
> application/xml,application/json,text/html,text/plain,text/xml,application/xhtml+xml,text/css,application/javascript,image/svg+xml,application/x-javascript,text/css
> 
> GzipFilter
> /* cd .. rm solr.war
> jar cvf solr.war * cp solr.war ../solr-4.10.4/example/webapps/solr.war
> get jetty-servlets-8.1.10.v20130312.jar from
>
> http://www.eclipse.org/downloads/download.php?file=/jetty/updates/jetty-bundles-8.x/8.1.10.v20130312/Jetty-bundles-repository-8.1.10.v20130312.zip&mirror_id=454
> (notice the name has to be exactly that) and put into
> solr-4.10.4/example/lib restart
>
>
> On Thu, May 21, 2015 at 11:31 PM, Zheng Lin Edwin Yeo <
> edwinye...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I'm trying to apply gzip compression in Solr 5.1. I understand that
> Running
> > Solr on Tomcat is no longer supported from Solr 5.0, so I've tried to
> > implement it in Solr.
> >
> > I've downloaded jetty-servlets-9.3.0.RC0.jar and placed it in my
> > webapp\WEB-INF folder, and have added the following in
> > webapp\WEB-INF\web.xml
> >
> >   
> > GzipFilter
> > org.eclipse.jetty.servlets.GzipFilter
> > 
> >   methods
> >   GET,POST
> >   mimeTypes
> >
> >
> >
> text/html;charset=UTF-8,text/plain,text/xml,text/json,text/javascript,text/css,text/plain;charset=UTF-8,application/xhtml+xml,application/javascript,image/svg+xml,application/json,application/xml;
> > charset=UTF-8
> > 
> >   
> >   
> > GzipFilter
> > /*
> >   
> >
> >
> > However, when I start Solr and check the browser, there's no gzip
> > compression. Is there anything which I configure wrongly or might have
> > missed out? I'm also running zookeeper-3.4.6.
> >
> >
> > Regards,
> > Edwin
> >
>
>
>
> --
> Bill Bell
> billnb...@gmail.com
> cell 720-256-8076
>


Running Solr 5.1.0 as a Service on Windows

2015-05-24 Thread Zheng Lin Edwin Yeo
Hi,

Has anyone tried to run Solr 5.1.0 as a Microsoft Windows service?

i've tried to follow the steps from this website
http://www.norconex.com/how-to-run-solr5-as-a-service-on-windows/, which
uses NSSM.

However, when I tried to start the service from the Component Services in
the Windows Control Panel Administrative tools, I get the following message:
Windows could not start the Solr5 service on Local Computer. The service
did not return an error. This could be an internal Windows error or an
internal service error.

Is this the correct way to set it up, or is there other methods?


Regards,
Edwin


Re: Index optimize runs in background.

2015-05-24 Thread Modassar Ather
Thanks everybody for your replies.

I have noticed the optimization running in background every time I indexed.
This is 5 node cluster with solr-5.1.0 and uses the CloudSolrClient. Kindly
share your findings on this issue.

Our index has almost 100M documents running on SolrCloud. We have been
optimizing the index after indexing for years and it has worked well for
us.

Thanks,
Modassar

On Fri, May 22, 2015 at 11:55 PM, Erick Erickson 
wrote:

> Actually, I've recently seen very similar behavior in Solr 4.10.3, but
> involving hard commits openSearcher=true, see:
> https://issues.apache.org/jira/browse/SOLR-7572. Of course I can't
> reproduce this at will, sii.
>
> A unit test should be very simple to write though, maybe I can get to it
> today.
>
> Erick
>
>
>
> On Fri, May 22, 2015 at 8:27 AM, Upayavira  wrote:
> >
> >
> > On Fri, May 22, 2015, at 03:55 PM, Shawn Heisey wrote:
> >> On 5/21/2015 6:21 AM, Modassar Ather wrote:
> >> > I am using Solr-5.1.0. I have an indexer class which invokes
> >> > cloudSolrClient.optimize(true, true, 1). My indexer exits after the
> >> > invocation of optimize and the optimization keeps on running in the
> >> > background.
> >> > Kindly let me know if it is per design and how can I make my indexer
> to
> >> > wait until the optimization is over. Is there a
> configuration/parameter I
> >> > need to set for the same.
> >> >
> >> > Please note that the same indexer with cloudSolrServer.optimize(true,
> true,
> >> > 1) on Solr-4.10 used to wait till the optimize was over before
> exiting.
> >>
> >> This is very odd, because I could not get HttpSolrServer to optimize in
> >> the background, even when that was what I wanted.
> >>
> >> I wondered if maybe the Cloud object behaves differently with regard to
> >> blocking until an optimize is finished ... except that there is no code
> >> for optimizing in CloudSolrClient at all ... so I don't know where the
> >> different behavior would actually be happening.
> >
> > A more important question is, why are you optimising? Generally it isn't
> > recommended anymore as it reduces the natural distribution of documents
> > amongst segments and makes future merges more costly.
> >
> > Upayavira
>