Re: SOLR Cloud : what is the best backup/restore strategy ?

2013-01-07 Thread Marcin Rzewucki
Definitely. I agree. It's good to stop loading before snapshot. Anyway, doing index snapshot say every 1 hour and re-indexing documents never than last 1-1.5 hour should reduce your index recovery time. On 8 January 2013 07:36, Otis Gospodnetic wrote: > Hi, > > Right, you can continue indexing, b

Re: How to size a SOLR Cloud

2013-01-07 Thread Per Steffensen
Hi I have some experience with practical limits. We have several setup we have tried to run with high load for long time: 1) * 20 shards in one collection spread over 5 nodes (4 shards for the collection per node), no redunancdy (only one replica per shard) * Indexing 35-50 mio documents per

Re: Atomicity of commits (soft OR hard) across replicas - Solr Cloud

2013-01-07 Thread samarth s
Thanks *Tomás !! *This was useful. On Mon, Dec 31, 2012 at 6:03 PM, Tomás Fernández Löbbe < tomasflo...@gmail.com> wrote: > If by "cronned commit" you mean "auto-commit": auto-commits are local to > each node, are not distributed, so there is no something like a > "cluster-wide" atomicity there.

Re: SOLR Cloud : what is the best backup/restore strategy ?

2013-01-07 Thread Otis Gospodnetic
Hi, Right, you can continue indexing, but if you need to run http://master_host:port/solr/replication?command=backup on each node and if you want a snapshot that represents a specific index state, then you need to stop indexing (and hard commit). That's what I had in mind. But if one just want

Re: Solr Cloud not electing leader properly

2013-01-07 Thread Mark Miller
Please see: http://lucene.472066.n3.nabble.com/Attention-Solr-4-0-SolrCloud-users-td4024998.html - Mark On Jan 7, 2013, at 9:16 PM, davers wrote: > I have a SolrCloud as seen here: http://d.pr/i/ya86 > > When I stop solr-shard-1 solr-shard-4 should become the new leader. Instead > it does not

Re: custom solr sort

2013-01-07 Thread Chris Hostetter
: "mysearch" requesthandler(see following codes), I found that custom sort : just effect on the current page when I got multiple page results, but the : sort is expected when I sets the rows which contains all the results. Does : anybody know how to solve it or the reason? I haven't familiarized

Re: custom solr sort

2013-01-07 Thread andy
Thanks you guys, I got the reason now, there'is something wrong with compareBottom method in my source,it's not consistent with compare method -- View this message in context: http://lucene.472066.n3.nabble.com/custom-solr-sort-tp4031014p4031444.html Sent from the Solr - User mailing list arch

Re: custom solr sort

2013-01-07 Thread andy
Hi Upayavira, The custom sort field is not stored in the index, I want to archieve a requirement that didfferent search users will get different search results when they search same keyword by my search engine, the search users have relationship with the each result document in the solr. But the

Solr Cloud not electing leader properly

2013-01-07 Thread davers
I have a SolrCloud as seen here: http://d.pr/i/ya86 When I stop solr-shard-1 solr-shard-4 should become the new leader. Instead it does not. Here is the output from the logs. INFO: A cluster state change has occurred - updating... Jan 07, 2013 6:11:54 PM org.apache.solr.cloud.ShardLeaderElectionC

Re: Solr cloud not starting properly. Only starts leaders.

2013-01-07 Thread Mark Miller
On Jan 7, 2013, at 4:26 PM, davers wrote: > KeeperErrorCode = NoNode for /collections/productindex/leaders/shard1 Odd - offhand I don't recall something like this being brought up before. Is this new for you, or always existed? Solr 4.0? As far as a key for the colors, there is an open JIRA i

Re: When does Solr actually convert textual representation into non-text formats (e.g. Date)

2013-01-07 Thread Chris Hostetter
: Subject: When does Solr actually convert textual representation into non-text : formats (e.g. Date) The short answer is: any place you want. At the lowest level, FieldType's are required to support converting (legal) "String" values into whatever native java object best represents their t

RE: theory of sets

2013-01-07 Thread Zhang, Lisheng
Hi, Just thought this possibility: I think dynamic field is solr concept, on lcene level all fields are the same, but in initial startup, lucene should load all field information into memory (not field data, but schema). If we have too many fields (like *_my_fields, * => a1, a2, ...), does this

Re: theory of sets

2013-01-07 Thread Upayavira
Dynamic fields resulted in poor response times? How many fields did each document have? I can't see how a dynamic field should have any difference from any other field in terms of response time. Or are you querying across a large number of dynamic fields concurrently? I can imagine that slowing th

Re: SOLR Cloud : what is the best backup/restore strategy ?

2013-01-07 Thread Marcin Rzewucki
There's no problem with indexing while taking snapshot. The only issue I found is some problem with index directory: https://issues.apache.org/jira/browse/SOLR-4170 It looks like Solr always looks in .../data/index/ directory without reading "index.properties" file (sometimes your index dir name ca

Solr cloud not starting properly. Only starts leaders.

2013-01-07 Thread davers
Every time I stop my SolrCloud (3 shards, 1 replica each, total 6 servers) and then restart it I get the following error: SEVERE: Error getting leader from zk org.apache.solr.common.SolrException: Could not get leader props at org.apache.solr.cloud.ZkController.getLeaderProps(ZkController

Re: SOLR Cloud : what is the best backup/restore strategy ?

2013-01-07 Thread Mark Miller
Not to my knowledge. You could do a delete all and then merge the index in with the core admin API, but that would be a less efficient copy basically, rather than a straight file move. There is not currently a restore command though. Also, keep in mind that unless you back up to a network store

RE: "No live SolrServers" Solr 4 exceptions on trying to create a collection

2013-01-07 Thread Jay Parashar
Thanks Mark! I will wait for 4.1 then. Actually I pasted both /admin/cores and /admin/collections to highlight that the problem was only with SolrJ and both admin/collections and admin/collections were working as expected. Sorry for the confusion. Regards Jay -Original Message- From: M

Re: SOLR Cloud : what is the best backup/restore strategy ?

2013-01-07 Thread Michel Dion
Is it possible to restore an index (previously backed up) using the same kind of http reste like request ? Something like ...solr/replication?command=restore ? On Mon, Jan 7, 2013 at 2:12 PM, Mark Miller wrote: > You should be able to continue indexing fine - it will just keep a point > in time

Re: "No live SolrServers" Solr 4 exceptions on trying to create a collection

2013-01-07 Thread Mark Miller
> http://127.0.0.1:7500/solr/admin/cores? Why did you paste that as the example then :) ? 4.0 has problems using the collections api with the CloudSolrServer. You will be able to do it for 4.1, but for 4.0 you have to use an HttpSolrServer and pick a node to talk to. For 4.0, CloudSolrServer is

Re: SOLR Cloud : what is the best backup/restore strategy ?

2013-01-07 Thread Mark Miller
You should be able to continue indexing fine - it will just keep a point in time snapshot around until the copy is done. So you can trigger a backup at anytime to create a backup for that specific time, and keep indexing away, and the next night do the same thing. You will always have backed up

Re: Sorting on mutivalued fields still impossible?

2013-01-07 Thread Chris Hostetter
: My question is, why do i need two redundant fields to sort a multivalued field : ('date_max' and 'date_min' for 'date') : For me it's just a waste of space, poisoning the fieldcache. how does two fields "poion the fieldcache" ? ... if there was a function that could find the "min" or "max" val

Re: SOLR Cloud : what is the best backup/restore strategy ?

2013-01-07 Thread Otis Gospodnetic
Hi, There may be a better way, but stopping indexing and then using http://master_host:port/solr/replication?command=backup on each node may do the backup trick. I'd love to see how/if others do it. Otis -- Solr & ElasticSearch Support http://sematext.com/ On Mon, Jan 7, 2013 at 10:33 AM, L

Re: How to size a SOLR Cloud

2013-01-07 Thread Otis Gospodnetic
Hello FF, Something like SPM for Solr will help you understand what's making Solr slow - CPU maxed? Disk IO? Swapping? Caches too small? ... There are no general rules/recipes, but once you see what is going on we can provide guidance. Yes, you can have 1 or more replicas of a shard. Otis -- So

Re: "No live SolrServers" Solr 4 exceptions on trying to create a collection

2013-01-07 Thread Alexandre Rafalovitch
Can you run the SolrJ client from another machine (so you go over the network) and put Wireshark in between? It will tell you if something is actually trying to connect of if the problem is even earlier. Otherwise, if you are on U*ix style machines look into dtrace/truss to see the activity. On Wi

RE: "No live SolrServers" Solr 4 exceptions on trying to create a collection

2013-01-07 Thread Jay Parashar
Right Mark, I am accessing the Collections API using Solrj. This is where I am stuck. If I just use the Collections API using http thru the browser, the behavior is as expected. Is there an example of using the Collections API using SolrJ? My code looks like String[] urls = {"http://127.0.0.1:898

RE: "No live SolrServers" Solr 4 exceptions on trying to create a collection

2013-01-07 Thread Jay Parashar
Hi Rafat, The following are scripts started in the same order (external zk, 1 instance running at localhost:2181). I also tried with the embedded zk with the same result #Start of Server 1 export SOLR_HOME=/home/apache-solr-4.0.0 cd shard1A java \ -Djetty.port=8983 \ -Djetty.home=$SOLR_HOME/e

Re: "No live SolrServers" Solr 4 exceptions on trying to create a collection

2013-01-07 Thread Mark Miller
On Jan 7, 2013, at 12:33 PM, Jay Parashar wrote: > With my setup (4 servers running at localhost 8983, 8900, 7574 and 7500) when > I manually do a > http://127.0.0.1:7500/solr/admin/cores?action=CREATE&name=myColl1&instanceDir=default&dataDir=myColl1Data&collection=myColl1&numShards=2 > it cre

Re: Will SolrCloud always slice by ID hash?

2013-01-07 Thread Scott Stults
Thanks guys. Yeah, separate rolling collections seem like the better way to go. -Scott On Sat, Dec 29, 2012 at 1:30 AM, Otis Gospodnetic < otis.gospodne...@gmail.com> wrote: > https://issues.apache.org/jira/browse/SOLR-4237

Re: "No live SolrServers" Solr 4 exceptions on trying to create a collection

2013-01-07 Thread Rafał Kuć
Hello! Can you share the command you use to start all four Solr servers ? -- Regards, Rafał Kuć Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch > Any clue to why this is happening will be greatly appreciated. This has > become a blocker for me. > I can use the HTTPS

"No live SolrServers" Solr 4 exceptions on trying to create a collection

2013-01-07 Thread Jay Parashar
Any clue to why this is happening will be greatly appreciated. This has become a blocker for me. I can use the HTTPSolrServer to create a core/make requests etc, but then it behaves like Solr 3.6 http://host:port/solr/admin/cores and not http://host:port/solr/admin/collections With my setup (4

Re: theory of sets

2013-01-07 Thread Uwe Reh
Hi Robi, thank you for the contribution. It's exiting to read, that your index isn't contaminated by the number of fields. I can't exclude other mistakes, but my first experience with extensive use of dynamic fields have been very poor response times. Even though I found an other solution, I

RE: theory of sets

2013-01-07 Thread Petersen, Robert
Hi Uwe, We have hundreds of dynamic fields but since most of our docs only use some of them it doesn't seem to be a performance drag. They can be viewed as a sparse matrix of fields in your indexed docs. Then if you make the sortinfo_for_groupx an int then that could be used in a function que

SOLR Cloud : what is the best backup/restore strategy ?

2013-01-07 Thread LEFEBVRE Guillaume
Hello, Using a SOLR Cloud architecture, what is the best procedure to backup and restore SOLR index and configuration ? Thanks, Guillaume

Re: Sorting on mutivalued fields still impossible?

2013-01-07 Thread Uwe Reh
Hi, like I just wrote in my reply to the similar suggestion form Jack. I'm not looking for a way to preprocess my data. My question is, why do i need two redundant fields to sort a multivalued field ('date_max' and 'date_min' for 'date') For me it's just a waste of space, poisoning the fieldca

Re: Sorting on mutivalued fields still impossible?

2013-01-07 Thread Alexandre Rafalovitch
If the Multiple-to-one mapping would be stable (e.g. independent of a query), why not implement it as a custom update.chain processor with a copy to a separate field? There is already a couple of implementations under FieldValueMutatingUpdateProcessor (first, last, max, min). Regards, Alex. Pe

Re: Sorting on mutivalued fields still impossible?

2013-01-07 Thread Uwe Reh
Am 31.08.2012 13:35, schrieb Erick Erickson: ... what would the correct behavior be for "sorting on a multivalued field" Hi Erick, in generally you are right, the question of multivalued fields is which value the reference is. But there are thousands of cases where this question is implicit

Re: Sorting on mutivalued fields still impossible?

2013-01-07 Thread Uwe Reh
Hi Jack, thank you for the hint. Since I have already a solrj client to do the preprocessing, mapping to sort fields isn't my problem. I will try to explain better in my reply to Erick. Uwe (Sorry late reaction) Am 30.08.2012 16:04, schrieb Jack Krupansky: You can also use a "Field Mutatin

RE: RE: Max number of core in Solr multi-core

2013-01-07 Thread Darren Govoni
This should be clarified some. In the "client" API, SolrServer is represents a connection to a single server backend/endpoint and should be re-used where possible. The approach being discussed is to have one "client" connection (represented by SolrServer class) per solr core, all residing in a "

RE: Max number of core in Solr multi-core

2013-01-07 Thread Jay Parashar
This is the exact approach we use in our multithreaded env. One server per core. I think this is the recommended approach. -Original Message- From: Parvin Gasimzade [mailto:parvin.gasimz...@gmail.com] Sent: Monday, January 07, 2013 7:00 AM To: solr-user@lucene.apache.org Subject: Re: Max

Re: Getting Lucense Query from Solr query (Or converting Solr Query to Lucense's query)

2013-01-07 Thread Roman Chyla
if you are inside solr, as it seems to be the case, you can do this QParserPlugin qplug = req.getCore().getQueryPlugin(LuceneQParserPlugin.NAME); QParser parser = qplug.createParser("PATIENT_GENDER:Male OR STUDY_DIVISION:\"Cancer Center\"", null, req.getParams(), req); Query q = parser.parse();

Re: Max number of core in Solr multi-core

2013-01-07 Thread Parvin Gasimzade
I know that but my question is different. Let me ask it in this way. I have a solr with base url localhost:8998/solr and two solr core as localhost:8998/solr/core1 and localhost:8998/solr/core2. I have one baseSolr instance initialized as : SolrServer server = new HttpSolrServer( url ); I have a

Re: custom solr sort

2013-01-07 Thread Upayavira
Can you explain why you want to implement a different sort first? There may be other ways of achieving the same thing. Upayavira On Sun, Jan 6, 2013, at 01:32 AM, andy wrote: > Hi, > > Maybe this is an old thread or maybe it's different with previous one. > > I want to custom solr sort and pas

Re: custom solr sort

2013-01-07 Thread Uwe Reh
Am 06.01.2013 02:32, schrieb andy: I want to custom solr sort and pass solr param from client to solr server, Hi Andy, not a answer of your question, but maybe an other approach to solve your initial question. Instead of writing a new SearchComponent I decided to (miss)use the function >htt

Re: Max number of core in Solr multi-core

2013-01-07 Thread Erick Erickson
This might help: https://wiki.apache.org/solr/Solrj#HttpSolrServer Note that the associated SolrRequest takes the path, I presume relative to the base URL you initialized the HttpSolrServer with. Best Erick On Mon, Jan 7, 2013 at 7:02 AM, Parvin Gasimzade wrote: > Thank you for your responses

Re: Problem occured in solr cloud set up org.apache.solr.client.solrj.SolrServerException: No live SolrServers available to handle this request

2013-01-07 Thread Erick Erickson
This is all quite strange, lots of people are using SolrCloud, some with very large clusters, so I'm guessing it's something in your setup that isn't obvious. How certain are you that your network between the two machines is reliable? And have you tried with a nightly build? I'm grasping at straw

Re: Max number of core in Solr multi-core

2013-01-07 Thread Parvin Gasimzade
Thank you for your responses. I have one more question related to Solr multi-core. By using SolrJ I create new core for each application. When user wants to add data or make query on his application, I create new HttpSolrServer for this core. In this scenario there will be many running HttpSolrServ

Re: theory of sets (first solution)

2013-01-07 Thread Uwe Reh
Hi, I found a own hack. It's based on free interpretation of the function strdist(). Have: - one multivalued field 'part_of' - one unique field 'groupsort' Index each item: For each group membership: add groupid to 'part_of' concat groupid and sortstring to new string ad

Getting Lucense Query from Solr query (Or converting Solr Query to Lucense's query)

2013-01-07 Thread Sabeer Hussain
Is there a way to get Lucene's query from Solr query?. I have a requirement to search for terms in multiple heterogeneous indices. Presently, I am using the following approach try { Directory directory1 = FSDirectory.open(new File("E:\\database\\patient\\ind

Re: language specific fields of "text"

2013-01-07 Thread AlexeyK
You should use language detection processor factory, like below: content language en *true content,fullname* true en,fr,de,es,ru,it 0.7 Once you have defined fields like content_en, content_fr etc., they will b