size of data replicated

2011-11-07 Thread Xin Li
Hi, there,

I am trying to look into the performance impact of data replication on
query response time. To get a clear picture, I would like to know how
to get the size of data being replicated for each commit. Through the
admin UI, you may read a x of y G data is being replicated; however,
"y" is the total index size, instead of data being copied over. I
couldn't find the info in the solr logs either. Any idea?

Thanks,
Xin


any working SolrJ code example for Solr 1.4.1

2010-10-01 Thread Xin Li
Hi, there, 

Just picked up SolrJ few days ago. I have my Solr Server set up, data
loaded, and everything worked fine with the web admin page. Then problem
came when I was trying to use SolrJ to interact with the Solr server. I
was stuck with "NoClassNotFoundException" yesterday. Being new to the
domain is a factor, but SolrJ could really use some more updated
documentation. 

.. Long story short, does anyone have a minimal working SolrJ example
interacting with Solr 1.4.1? It would be nice to know the JARs too since
the errors I got were probably more related to JARs than the code
itself. 

Thanks,
Xin 

  





This electronic mail message contains information that (a) is or
may be CONFIDENTIAL, PROPRIETARY IN NATURE, OR OTHERWISE
PROTECTED
BY LAW FROM DISCLOSURE, and (b) is intended only for the use of
the addressee(s) named herein.  If you are not an intended
recipient, please contact the sender immediately and take the
steps necessary to delete the message completely from your
computer system.

Not Intended as a Substitute for a Writing: Notwithstanding the
Uniform Electronic Transaction Act or any other law of similar
effect, absent an express statement to the contrary, this e-mail
message, its contents, and any attachments hereto are not
intended
to represent an offer or acceptance to enter into a contract and
are not otherwise intended to bind this sender,
barnesandnoble.com
llc, barnesandnoble.com inc. or any other person or entity.


RE: any working SolrJ code example for Solr 1.4.1

2010-10-01 Thread Xin Li
That's precisely the reason I was asking about JARs too. It seems that I
am the minority that ran into SolrJ issue. If that's the case, I will
grab Perl solution, and come back to SolrJ later. 

Thanks,
Xin

-Original Message-
From: Allistair Crossley [mailto:a...@roxxor.co.uk] 
Sent: Friday, October 01, 2010 11:52 AM
To: solr-user@lucene.apache.org
Subject: Re: any working SolrJ code example for Solr 1.4.1

no example anyone gives you will solve your class not found exception ..
you need to ensure the relevant jars (in dist) are included in your solr
instance's lib folder i guess?

On Oct 1, 2010, at 10:50 AM, Xin Li wrote:

> Hi, there, 
> 
> Just picked up SolrJ few days ago. I have my Solr Server set up, data
> loaded, and everything worked fine with the web admin page. Then
problem
> came when I was trying to use SolrJ to interact with the Solr server.
I
> was stuck with "NoClassNotFoundException" yesterday. Being new to the
> domain is a factor, but SolrJ could really use some more updated
> documentation. 
> 
> .. Long story short, does anyone have a minimal working SolrJ example
> interacting with Solr 1.4.1? It would be nice to know the JARs too
since
> the errors I got were probably more related to JARs than the code
> itself. 
> 
> Thanks,
> Xin 
> 
> 
> 
> 
> 
> 
> 
> This electronic mail message contains information that (a) is or
> may be CONFIDENTIAL, PROPRIETARY IN NATURE, OR OTHERWISE
> PROTECTED
> BY LAW FROM DISCLOSURE, and (b) is intended only for the use of
> the addressee(s) named herein.  If you are not an intended
> recipient, please contact the sender immediately and take the
> steps necessary to delete the message completely from your
> computer system.
> 
> Not Intended as a Substitute for a Writing: Notwithstanding the
> Uniform Electronic Transaction Act or any other law of similar
> effect, absent an express statement to the contrary, this e-mail
> message, its contents, and any attachments hereto are not
> intended
> to represent an offer or acceptance to enter into a contract and
> are not otherwise intended to bind this sender,
> barnesandnoble.com
> llc, barnesandnoble.com inc. or any other person or entity.


This electronic mail message contains information that (a) is or
may be CONFIDENTIAL, PROPRIETARY IN NATURE, OR OTHERWISE
PROTECTED
BY LAW FROM DISCLOSURE, and (b) is intended only for the use of
the
addressee(s) named herein.  If you are not an intended recipient,
please contact the sender immediately and take the steps
necessary
to delete the message completely from your computer system.

Not Intended as a Substitute for a Writing: Notwithstanding the
Uniform Electronic Transaction Act or any other law of similar
effect, absent an express statement to the contrary, this e-mail
message, its contents, and any attachments hereto are not
intended
to represent an offer or acceptance to enter into a contract and
are not otherwise intended to bind this sender,
barnesandnoble.com
llc, barnesandnoble.com inc. or any other person or entity.


RE: any working SolrJ code example for Solr 1.4.1

2010-10-01 Thread Xin Li

Thanks, Jon. 

I have just made my Perl version of solution working, will try your tips this 
weekend. 

Xin

-Original Message-
From: Sharp, Jonathan [mailto:jsh...@coh.org]
Sent: Fri 10/1/2010 1:20 PM
To: solr-user@lucene.apache.org
Subject: RE: any working SolrJ code example for Solr 1.4.1
 
Xin,

I also had a similar error when I picked up SolrJ.

See the first section of this wiki page for the extra jars (the ones not found 
in the dist directory):
http://wiki.apache.org/solr/Solrj

-Jon

-Original Message-
From: Xin Li [mailto:x...@book.com] 
Sent: Friday, October 01, 2010 8:58 AM
To: solr-user@lucene.apache.org
Subject: RE: any working SolrJ code example for Solr 1.4.1

That's precisely the reason I was asking about JARs too. It seems that I
am the minority that ran into SolrJ issue. If that's the case, I will
grab Perl solution, and come back to SolrJ later. 

Thanks,
Xin

-Original Message-
From: Allistair Crossley [mailto:a...@roxxor.co.uk] 
Sent: Friday, October 01, 2010 11:52 AM
To: solr-user@lucene.apache.org
Subject: Re: any working SolrJ code example for Solr 1.4.1

no example anyone gives you will solve your class not found exception ..
you need to ensure the relevant jars (in dist) are included in your solr
instance's lib folder i guess?

On Oct 1, 2010, at 10:50 AM, Xin Li wrote:

> Hi, there, 
> 
> Just picked up SolrJ few days ago. I have my Solr Server set up, data
> loaded, and everything worked fine with the web admin page. Then
problem
> came when I was trying to use SolrJ to interact with the Solr server.
I
> was stuck with "NoClassNotFoundException" yesterday. Being new to the
> domain is a factor, but SolrJ could really use some more updated
> documentation. 
> 
> .. Long story short, does anyone have a minimal working SolrJ example
> interacting with Solr 1.4.1? It would be nice to know the JARs too
since
> the errors I got were probably more related to JARs than the code
> itself. 
> 
> Thanks,
> Xin 
> 
> 
> 
> 
> 
> 
> 
> This electronic mail message contains information that (a) is or
> may be CONFIDENTIAL, PROPRIETARY IN NATURE, OR OTHERWISE
> PROTECTED
> BY LAW FROM DISCLOSURE, and (b) is intended only for the use of
> the addressee(s) named herein.  If you are not an intended
> recipient, please contact the sender immediately and take the
> steps necessary to delete the message completely from your
> computer system.
> 
> Not Intended as a Substitute for a Writing: Notwithstanding the
> Uniform Electronic Transaction Act or any other law of similar
> effect, absent an express statement to the contrary, this e-mail
> message, its contents, and any attachments hereto are not
> intended
> to represent an offer or acceptance to enter into a contract and
> are not otherwise intended to bind this sender,
> barnesandnoble.com
> llc, barnesandnoble.com inc. or any other person or entity.


This electronic mail message contains information that (a) is or 
may be CONFIDENTIAL, PROPRIETARY IN NATURE, OR OTHERWISE 
PROTECTED 
BY LAW FROM DISCLOSURE, and (b) is intended only for the use of 
the
addressee(s) named herein.  If you are not an intended recipient, 
please contact the sender immediately and take the steps 
necessary 
to delete the message completely from your computer system.

Not Intended as a Substitute for a Writing: Notwithstanding the 
Uniform Electronic Transaction Act or any other law of similar 
effect, absent an express statement to the contrary, this e-mail 
message, its contents, and any attachments hereto are not 
intended 
to represent an offer or acceptance to enter into a contract and 
are not otherwise intended to bind this sender, 
barnesandnoble.com 
llc, barnesandnoble.com inc. or any other person or entity.


-
SECURITY/CONFIDENTIALITY WARNING:  
This message and any attachments are intended solely for the individual or 
entity to which they are addressed. This communication may contain information 
that is privileged, confidential, or exempt from disclosure under applicable 
law (e.g., personal health information, research data, financial information). 
Because this e-mail has been sent without encryption, individuals other than 
the intended recipient may be able to view the information, forward it to 
others or tamper with the information without the knowledge or consent of the 
sender. If you are not the intended recipient, or the employee or person 
responsible for delivering the message to the intended recipient, any 
dissemination, distribution or copying of the communication is strictly 
prohibited. If you received the communication in error, please notify the 
sender immediately by replying to this message and deleting the message and any 
accompanying files from your system. If, due to the security risks

RE: solrj

2010-10-04 Thread Xin Li
I asked the exact question the day before. If you or anyone else has
pointer to the solution, please share on the mail list. For now, I am
using Perl script instead to query Solr server.

Thanks,
Xin

-Original Message-
From: ankita shinde [mailto:ankitashinde...@gmail.com] 
Sent: Saturday, October 02, 2010 2:30 PM
To: solr-user@lucene.apache.org
Subject: solrj

hello,

I am trying to use solrj for interfacing with solr. I am trying to run
the
SolrjTest example. I have included all the following  jar files-


   - commons-codec-1.3.jar
   - commons-fileupload-1.2.1.jar
   - commons-httpclient-3.1.jar
   - commons-io-1.4.jar
   - geronimo-stax-api_1.0_spec-1.0.1.jar
   - apache-solr-solrj-*.jar
   - wstx-asl-3.2.7.jar
   - slf4j-api-1.5.5.jar
   - slf4j-simple-1.5.5.jar


*My SolrjTest file is as follows:*

import org.apache.solr.common.SolrDocumentList;
import org.apache.solr.common.SolrDocument;
import java.util.Map;
import org.apache.solr.common.SolrDocumentList;
import org.apache.solr.common.SolrDocument;
import java.util.Map;
import java.util.Iterator;
import java.util.List;
import java.util.ArrayList;
import java.util.HashMap;

import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.client.solrj.response.FacetField;


class SolrjTest
{
public void query(String q)
{
CommonsHttpSolrServer server = null;

try
{
server = new
CommonsHttpSolrServer("http://localhost:8983/solr/
");
}
catch(Exception e)
{
e.printStackTrace();
}

SolrQuery query = new SolrQuery();
query.setQuery(q);
query.setQueryType("dismax");
query.setFacet(true);
query.addFacetField("lastname");
query.addFacetField("locality4");
query.setFacetMinCount(2);
query.setIncludeScore(true);

try
{
QueryResponse qr = server.query(query);

SolrDocumentList sdl = qr.getResults();

System.out.println("Found: " + sdl.getNumFound());
System.out.println("Start: " + sdl.getStart());
System.out.println("Max Score: " + sdl.getMaxScore());
System.out.println("");

ArrayList> hitsOnPage = new
ArrayList>();

for(SolrDocument d : sdl)
{
HashMap values = new HashMap();

for(Iterator> i =
d.iterator();
i.hasNext(); )
{
Map.Entry e2 = i.next();

values.put(e2.getKey(), e2.getValue());
}

hitsOnPage.add(values);
System.out.println(values.get("displayname") + " (" +
values.get("displayphone") + ")");
}

List facets = qr.getFacetFields();

for(FacetField facet : facets)
{
List facetEntries = facet.getValues();

for(FacetField.Count fcount : facetEntries)
{
System.out.println(fcount.getName() + ": " +
fcount.getCount());
}
}
}
catch (SolrServerException e)
{
e.printStackTrace();
}

}

public static void main(String[] args)
{
SolrjTest solrj = new SolrjTest();
solrj.query(args[0]);
}
}





 But its giving me error as 'NoClassDefFoundError:
org/apache/solr/client/solrj/SolrServerException'.
Can anyone tell me where did i go wrong?

This electronic mail message contains information that (a) is or
may be CONFIDENTIAL, PROPRIETARY IN NATURE, OR OTHERWISE
PROTECTED
BY LAW FROM DISCLOSURE, and (b) is intended only for the use of
the
addressee(s) named herein.  If you are not an intended recipient,
please contact the sender immediately and take the steps
necessary
to delete the message completely from your computer system.

Not Intended as a Substitute for a Writing: Notwithstanding the
Uniform Electronic Transaction Act or any other law of similar
effect, absent an express statement to the contrary, this e-mail
message, its contents, and any attachments hereto are not
intended
to represent an offer or acceptance to enter into a contract and
are not otherwise intended to bind this sender,
barnesandnoble.com
llc, barnesandnoble.com inc. or any other person or entity.


RE: solrj

2010-10-04 Thread Xin Li
Thanks, Allistair. I will give it a try later today. 


-Original Message-
From: Allistair Crossley [mailto:a...@roxxor.co.uk] 
Sent: Monday, October 04, 2010 11:31 AM
To: solr-user@lucene.apache.org
Subject: Re: solrj

i rewrote the top jar section at

http://wiki.apache.org/solr/Solrj

and the following code then runs fine.

import java.net.MalformedURLException;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServer;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.common.SolrDocument;
import org.apache.solr.common.SolrDocumentList;

class TestSolrQuery {

public static void main(String[] args) {

String url = "http://localhost:8983/solr";;
SolrServer server = null;

try { 
server = new CommonsHttpSolrServer(url);
} catch (MalformedURLException e) {
System.out.println(e);
System.exit(1);
}

SolrQuery query = new SolrQuery();
query.setQuery("*:*");

QueryResponse rsp = null;
try { 
rsp = server.query(query);
} catch(SolrServerException e) {
System.out.println(e);
System.exit(1);
}

SolrDocumentList docs = rsp.getResults();
for (SolrDocument doc : docs) {
System.out.println(doc.toString());
}
}
}


On Oct 4, 2010, at 11:26 AM, Xin Li wrote:

> I asked the exact question the day before. If you or anyone else has
> pointer to the solution, please share on the mail list. For now, I am
> using Perl script instead to query Solr server.
> 
> Thanks,
> Xin
> 
> -Original Message-
> From: ankita shinde [mailto:ankitashinde...@gmail.com] 
> Sent: Saturday, October 02, 2010 2:30 PM
> To: solr-user@lucene.apache.org
> Subject: solrj
> 
> hello,
> 
> I am trying to use solrj for interfacing with solr. I am trying to run
> the
> SolrjTest example. I have included all the following  jar files-
> 
> 
>   - commons-codec-1.3.jar
>   - commons-fileupload-1.2.1.jar
>   - commons-httpclient-3.1.jar
>   - commons-io-1.4.jar
>   - geronimo-stax-api_1.0_spec-1.0.1.jar
>   - apache-solr-solrj-*.jar
>   - wstx-asl-3.2.7.jar
>   - slf4j-api-1.5.5.jar
>   - slf4j-simple-1.5.5.jar
> 
> 
> *My SolrjTest file is as follows:*
> 
> import org.apache.solr.common.SolrDocumentList;
> import org.apache.solr.common.SolrDocument;
> import java.util.Map;
> import org.apache.solr.common.SolrDocumentList;
> import org.apache.solr.common.SolrDocument;
> import java.util.Map;
> import java.util.Iterator;
> import java.util.List;
> import java.util.ArrayList;
> import java.util.HashMap;
> 
> import org.apache.solr.client.solrj.SolrServerException;
> import org.apache.solr.client.solrj.SolrQuery;
> import org.apache.solr.client.solrj.response.QueryResponse;
> import org.apache.solr.client.solrj.response.FacetField;
> 
> 
> class SolrjTest
> {
>public void query(String q)
>{
>CommonsHttpSolrServer server = null;
> 
>try
>{
>server = new
> CommonsHttpSolrServer("http://localhost:8983/solr/
> ");
>}
>catch(Exception e)
>{
>e.printStackTrace();
>}
> 
>SolrQuery query = new SolrQuery();
>query.setQuery(q);
>query.setQueryType("dismax");
>query.setFacet(true);
>query.addFacetField("lastname");
>query.addFacetField("locality4");
>query.setFacetMinCount(2);
>query.setIncludeScore(true);
> 
>try
>{
>QueryResponse qr = server.query(query);
> 
>SolrDocumentList sdl = qr.getResults();
> 
>System.out.println("Found: " + sdl.getNumFound());
>System.out.println("Start: " + sdl.getStart());
>System.out.println("Max Score: " + sdl.getMaxScore());
>System.out.println("");
> 
>ArrayList> hitsOnPage = new
> ArrayList>();
> 
>for(SolrDocument d : sdl)
>{
>HashMap values = new HashMap Object>();
> 
>for(Iterator> i =
> d.iterator();
> i.hasNext(); )
>{
>Map.Entry e2 

Spell checking question from a Solr novice

2010-10-18 Thread Xin Li
Hi, 

I am looking for a quick solution to improve a search engine's spell checking 
performance. I was wondering if anyone tried to integrate Google SpellCheck API 
with Solr search engine (if possible). Google spellcheck came to my mind 
because of two reasons. First, it is costly to clean up the data to be used as 
spell check baseline. Secondly, google probably has the most complete set of 
misspelled search terms. That's why I would like to know if it is a feasible 
way to go.

Thanks,
Xin
This electronic mail message contains information that (a) is or 
may be CONFIDENTIAL, PROPRIETARY IN NATURE, OR OTHERWISE 
PROTECTED 
BY LAW FROM DISCLOSURE, and (b) is intended only for the use of 
the
addressee(s) named herein.  If you are not an intended recipient, 
please contact the sender immediately and take the steps 
necessary 
to delete the message completely from your computer system.

Not Intended as a Substitute for a Writing: Notwithstanding the 
Uniform Electronic Transaction Act or any other law of similar 
effect, absent an express statement to the contrary, this e-mail 
message, its contents, and any attachments hereto are not 
intended 
to represent an offer or acceptance to enter into a contract and 
are not otherwise intended to bind this sender, 
barnesandnoble.com 
llc, barnesandnoble.com inc. or any other person or entity.


RE: Spell checking question from a Solr novice

2010-10-18 Thread Xin Li
Oops, never mind. Just read Google API policy. 1000 queries per day limit & for 
non-commercial use only. 



-Original Message-
From: Xin Li 
Sent: Monday, October 18, 2010 3:43 PM
To: solr-user@lucene.apache.org
Subject: Spell checking question from a Solr novice

Hi, 

I am looking for a quick solution to improve a search engine's spell checking 
performance. I was wondering if anyone tried to integrate Google SpellCheck API 
with Solr search engine (if possible). Google spellcheck came to my mind 
because of two reasons. First, it is costly to clean up the data to be used as 
spell check baseline. Secondly, google probably has the most complete set of 
misspelled search terms. That's why I would like to know if it is a feasible 
way to go.

Thanks,
Xin
This electronic mail message contains information that (a) is or 
may be CONFIDENTIAL, PROPRIETARY IN NATURE, OR OTHERWISE 
PROTECTED 
BY LAW FROM DISCLOSURE, and (b) is intended only for the use of 
the
addressee(s) named herein.  If you are not an intended recipient, 
please contact the sender immediately and take the steps 
necessary 
to delete the message completely from your computer system.

Not Intended as a Substitute for a Writing: Notwithstanding the 
Uniform Electronic Transaction Act or any other law of similar 
effect, absent an express statement to the contrary, this e-mail 
message, its contents, and any attachments hereto are not 
intended 
to represent an offer or acceptance to enter into a contract and 
are not otherwise intended to bind this sender, 
barnesandnoble.com 
llc, barnesandnoble.com inc. or any other person or entity.
This electronic mail message contains information that (a) is or 
may be CONFIDENTIAL, PROPRIETARY IN NATURE, OR OTHERWISE 
PROTECTED 
BY LAW FROM DISCLOSURE, and (b) is intended only for the use of 
the
addressee(s) named herein.  If you are not an intended recipient, 
please contact the sender immediately and take the steps 
necessary 
to delete the message completely from your computer system.

Not Intended as a Substitute for a Writing: Notwithstanding the 
Uniform Electronic Transaction Act or any other law of similar 
effect, absent an express statement to the contrary, this e-mail 
message, its contents, and any attachments hereto are not 
intended 
to represent an offer or acceptance to enter into a contract and 
are not otherwise intended to bind this sender, 
barnesandnoble.com 
llc, barnesandnoble.com inc. or any other person or entity.


command line to check if Solr is up running

2010-10-25 Thread Xin Li
As we know we can use browser to check if Solr is running by going to 
http://$hostName:$portNumber/$masterName/admin, say 
http://localhost:8080/solr1/admin. My questions is: are there any ways to check 
it using command line? I used "curl http://localhost:8080"; to check my Tomcat, 
it worked fine. However, no response if I try "curl 
http://localhost:8080/solr1/admin"; (even when my Solr is running). Does anyone 
know any command line alternatives?

Thanks,
Xin
This electronic mail message contains information that (a) is or 
may be CONFIDENTIAL, PROPRIETARY IN NATURE, OR OTHERWISE 
PROTECTED 
BY LAW FROM DISCLOSURE, and (b) is intended only for the use of 
the addressee(s) named herein.  If you are not an intended 
recipient, please contact the sender immediately and take the 
steps necessary to delete the message completely from your 
computer system.

Not Intended as a Substitute for a Writing: Notwithstanding the 
Uniform Electronic Transaction Act or any other law of similar 
effect, absent an express statement to the contrary, this e-mail 
message, its contents, and any attachments hereto are not 
intended 
to represent an offer or acceptance to enter into a contract and 
are not otherwise intended to bind this sender, 
barnesandnoble.com 
llc, barnesandnoble.com inc. or any other person or entity.


RE: command line to check if Solr is up running

2010-10-25 Thread Xin Li
Thanks Bob and Ahmet, 

"curl http://localhost:8080/solr1/admin/ping"; works fine :)

Xin



-Original Message-
From: Ahmet Arslan [mailto:iori...@yahoo.com] 
Sent: Monday, October 25, 2010 4:03 PM
To: solr-user@lucene.apache.org
Subject: Re: command line to check if Solr is up running

> My questions is: are
> there any ways to check it using command line? I used "curl
> http://localhost:8080"; to check my Tomcat, it worked
> fine. However, no response if I try "curl
http://localhost:8080/solr1/admin"; (even when my Solr
> is running). Does anyone know any command line
> alternatives?


What about curl solr/admin/ping?echoParams=none&omitHeader=on



  

This electronic mail message contains information that (a) is or
may be CONFIDENTIAL, PROPRIETARY IN NATURE, OR OTHERWISE
PROTECTED
BY LAW FROM DISCLOSURE, and (b) is intended only for the use of
the addressee(s) named herein.  If you are not an intended
recipient, please contact the sender immediately and take the
steps necessary to delete the message completely from your
computer system.

Not Intended as a Substitute for a Writing: Notwithstanding the
Uniform Electronic Transaction Act or any other law of similar
effect, absent an express statement to the contrary, this e-mail
message, its contents, and any attachments hereto are not
intended
to represent an offer or acceptance to enter into a contract and
are not otherwise intended to bind this sender,
barnesandnoble.com
llc, barnesandnoble.com inc. or any other person or entity.


Re: Design and Usage Questions

2010-11-01 Thread Xin Li
If you just want a quick way to query Solr server, Perl module
Webservice::Solr is pretty good.


On Mon, Nov 1, 2010 at 4:56 PM, Lance Norskog  wrote:

> Yes, you can write your own app to read the file with SVNkit and post
> it to the ExtractingRequestHandler. This would be easiest.
>
> On Mon, Nov 1, 2010 at 5:49 AM, getagrip  wrote:
> > Ok, so if I did NOT use Solr_J I could PUSH a Stream to Solr somehow?
> > I do not depend on Solr_J, any connection-method would suffice.
> >
> > On 11/01/2010 03:23 AM, Lance Norskog wrote:
> >>
> >> 2.
> >> The SolrJ library handling of content streams is "pull", not "push".
> >> That is, you give it a reader and it pulls content when it feels like
> >> it. If your software to feed the connection wants to write the data,
> >> you have to either buffer the whole thing or do a dual-thread
> >> writer/reader pair.
> >>
> >> The easiest way to pull stuff from SVN is to use one of the web server
> >> apps. Solr takes a "stream.url" parameter. (Also stream.file.) Note
> >> that there is no outbound authentication supported; your web server
> >> has to be open (at least to the Solr instance).
> >>
> >>
> >> On Sun, Oct 31, 2010 at 4:06 PM, getagrip  wrote:
> >>>
> >>> Hi,
> >>>
> >>> I've got some basic usage / design questions.
> >>>
> >>> 1. The SolrJ wiki proposes to use the same CommonsHttpSolrServer
> >>>   instance for all requests to avoid connection leaks.
> >>>   So if I create a Singleton instance upon application-startup I can
> >>>   securely use this instance for ALL queries/updates throughout my
> >>>   application without running into performance issues?
> >>>
> >>> 2. My System's documents are stored in a Subversion repository.
> >>>   For fast searchresults I want to periodically index new documents
> >>>   from the repository.
> >>>
> >>>   What I get from the repository is a ByteArrayOutputStream. How can I
> >>>   pass this Stream to Solr?
> >>>
> >>>   I only see possibilities to pass Files but in my case it does not
> >>>   make sense to write the ByteArrayOutputStream to disk again as this
> >>>   would cause performance issues apart from making no sense anyway.
> >>>
> >>> 3. Are there any disadvantages using Solrj over some other HTTP based
> >>>   solution e.g. creating&  sending my own HTTP requests? Do I even
> >>>   have to use HTTP?
> >>>   I see the EmbeddedSolrServer exists. Any drawbacks using that?
> >>>
> >>> Any hints are welcome, Thanks!
> >>>
> >>
> >>
> >>
> >
>
>
>
> --
> Lance Norskog
> goks...@gmail.com
>


disabled replication setting

2010-12-02 Thread Xin Li
For solr replication, we can send command to disable replication. Does
anyone know where i can verify the replication enabled/disabled
setting? i cannot seem to find it on dashboard or details command
output.

Thanks,

Xin


RE: disabled replication setting

2010-12-02 Thread Xin Li
Does anything know?

Thanks,

-Original Message-
From: Xin Li [mailto:xin.li@gmail.com] 
Sent: Thursday, December 02, 2010 12:25 PM
To: solr-user@lucene.apache.org
Subject: disabled replication setting

For solr replication, we can send command to disable replication. Does
anyone know where i can verify the replication enabled/disabled
setting? i cannot seem to find it on dashboard or details command
output.

Thanks,

Xin

This electronic mail message contains information that (a) is or
may be CONFIDENTIAL, PROPRIETARY IN NATURE, OR OTHERWISE
PROTECTED
BY LAW FROM DISCLOSURE, and (b) is intended only for the use of
the
addressee(s) named herein.  If you are not an intended recipient,
please contact the sender immediately and take the steps
necessary
to delete the message completely from your computer system.

Not Intended as a Substitute for a Writing: Notwithstanding the
Uniform Electronic Transaction Act or any other law of similar
effect, absent an express statement to the contrary, this e-mail
message, its contents, and any attachments hereto are not
intended
to represent an offer or acceptance to enter into a contract and
are not otherwise intended to bind this sender,
barnesandnoble.com
llc, barnesandnoble.com inc. or any other person or entity.


Re: Index version on slave nodes

2010-12-06 Thread Xin Li
I think this is expected behavior. You have to issue the "details"
command to get the real indexversion for slave machines.

Thanks,
Xin

On Mon, Dec 6, 2010 at 11:26 AM, Markus Jelsma
 wrote:
> Hi,
>
> The indexversion command in the replicationHandler on slave nodes returns 0
> for indexversion and generation while the details command does return the
> correct information. I haven't found an existing ticket on this one although
> https://issues.apache.org/jira/browse/SOLR-1573 has similarities.
>
> Cheers,
>
> --
> Markus Jelsma - CTO - Openindex
> http://www.linkedin.com/in/markus17
> 050-8536620 / 06-50258350
>


Re: Index version on slave nodes

2010-12-07 Thread Xin Li
I read it somewhere (sorry for not remembering the source).. the
indexversion command gets the "replicable" index version #. Since it
is a slave machine, so the result is 0.

Thanks,

On Tue, Dec 7, 2010 at 11:06 AM, Markus Jelsma
 wrote:
> But why? I'd expect valid version numbers although the replication handler's
> source code seems to agree with you judging from the comments.
>
> On Monday 06 December 2010 17:49:16 Xin Li wrote:
>> I think this is expected behavior. You have to issue the "details"
>> command to get the real indexversion for slave machines.
>>
>> Thanks,
>> Xin
>>
>> On Mon, Dec 6, 2010 at 11:26 AM, Markus Jelsma
>>
>>  wrote:
>> > Hi,
>> >
>> > The indexversion command in the replicationHandler on slave nodes returns
>> > 0 for indexversion and generation while the details command does return
>> > the correct information. I haven't found an existing ticket on this one
>> > although https://issues.apache.org/jira/browse/SOLR-1573 has
>> > similarities.
>> >
>> > Cheers,
>> >
>> > --
>> > Markus Jelsma - CTO - Openindex
>> > http://www.linkedin.com/in/markus17
>> > 050-8536620 / 06-50258350
>
> --
> Markus Jelsma - CTO - Openindex
> http://www.linkedin.com/in/markus17
> 050-8536620 / 06-50258350
>


Re: Strange replication problem

2010-12-13 Thread Xin Li
" indexversion returned by the indexversion command is 0 while the
same information from the details command is 292192351652 ..."

This only happens to a Slave machine. For a Master machine,
indexversion returns the same number as details command.





On Mon, Dec 13, 2010 at 11:06 AM, Ralf Mattes  wrote:
> Hello list,
>
> I'm trying to set up a replicating solr system (one master, one slave) here.
> Everything _looks_ o.k. but replication fails. A little debugging shows the 
> following:
>
>  r...@slave:~# curl 
> 'http://master:8180/solr/website/replication?command=indexversion&wt=json' && 
> echo ''
> {"responseHeader":{"status":0,"QTime":0},"indexversion":0,"generation":0}
>
>  r...@slave:~# curl 
> 'http://master:8180/solr/website/replication?command=details&wt=json' && echo 
> ''
> {"responseHeader":{"status":0,"QTime":1},"details":{"indexSize":"6.76 
> GB","indexPath":"/var/lib/solr/data/website/index","commits":[["indexVersion",1292192351652,"generation",5,"filelist",["_7e.fdx","_7e.tii","_7e.frq","_7e.prx","_7e.fdt","segments_5","_7e.fnm","_7e.nrm","_7e.tis"]]],"isMaster":"true","isSlave":"false","indexVersion":1292192351652,"generation":5},"WARNING":"This
>  response format is experimental.  It is likely to change in the future."}
>
>  r...@slave:~#
>
> Note that indexversion returned by the indexversion command is 0 while the 
> same information from the details command is 292192351652 ...
> Any idea what's going on here?
>
>  TIA Ralf Mattes
>
>
>


Re: Strange replication problem

2010-12-13 Thread Xin Li
did you double check
http://machine:port/solr/website/admin/replication/ to see the
"master" is indeed a master?

On Mon, Dec 13, 2010 at 1:01 PM, Ralf Mattes  wrote:
> On Mon, 13 Dec 2010 12:31:27 -0500, Xin Li wrote:
>
>> " indexversion returned by the indexversion command is 0 while the same
>> information from the details command is 292192351652 ..."
>>
>> This only happens to a Slave machine. For a Master machine, indexversion
>> returns the same number as details command.
>
> ??? What part of my posted example did you not read? :-)
> Both requests where sent to the same machine (configured as master) - and I 
> get
> exactly the result described. So, no, for my setup (pretty much out-of-the-box
> with minimal master/slave configuration) your statement is wrong :-/
>
>  Thanks, RalfD
>
>
>
>
>>
>>
>>
>> On Mon, Dec 13, 2010 at 11:06 AM, Ralf Mattes  wrote:
>>> Hello list,
>>>
>>> I'm trying to set up a replicating solr system (one master, one slave)
>>> here. Everything _looks_ o.k. but replication fails. A little debugging
>>> shows the following:
>>>
>>>  r...@slave:~# curl
>>>  'http://master:8180/solr/website/replication?command=indexversion&wt=json'
>>>  && echo ''
>>> {"responseHeader":{"status":0,"QTime":0},"indexversion":0,"generation":0}
>>>
>>>  r...@slave:~# curl
>>>  'http://master:8180/solr/website/replication?command=details&wt=json'
>>>  && echo ''
>>> {"responseHeader":{"status":0,"QTime":1},"details":{"indexSize":"6.76
>>> GB","indexPath":"/var/lib/solr/data/website/index","commits":[["indexVersion",1292192351652,"generation",5,"filelist",["_7e.fdx","_7e.tii","_7e.frq","_7e.prx","_7e.fdt","segments_5","_7e.fnm","_7e.nrm","_7e.tis"]]],"isMaster":"true","isSlave":"false","indexVersion":1292192351652,"generation":5},"WARNING":"This
>>> response format is experimental.  It is likely to change in the
>>> future."}
>>>
>>>  r...@slave:~#
>>>
>>> Note that indexversion returned by the indexversion command is 0 while
>>> the same information from the details command is 292192351652 ... Any
>>> idea what's going on here?
>>>
>>>  TIA Ralf Mattes
>>>
>>>
>>>
>
>
>


Index version & generation for Solr 3.5

2012-08-22 Thread Xin Li
Hi,

I ran into an issue lately with Index version & generation for Solr 3.5.

In Solr 1.4., the index version of slave service increments upon each
replication. However, I noticed it's not the case for Solr 3.5; the
index version would increase 20, or 30 after replication. Does anyone
know why and any reference on the web for this?
The index generation does still increment after replication though.

Thanks,

Xin