Re: Using Solr for finding Flight Routes

2014-12-05 Thread Nazik Huq
Check Grant's SOLR Air reference app here 
http://www.ibm.com/developerworks/library/j-solr-lucene/index.html .

@Nazik_Huq


On Dec 5, 2014, at 1:19 PM, Robin Woods woods4s...@gmail.com wrote:

 Thanks Alex. I'll check the GraphDB solutions.
 
 On Fri, Dec 5, 2014 at 6:20 AM, Alexandre Rafalovitch arafa...@gmail.com
 wrote:
 
 Sounds like a standard graph-database problem. I think some GraphDBs
 integrate with Solr (or at least Lucene) for search.
 
 Regards,
   Alex.
 
 
 Personal: http://www.outerthoughts.com/ and @arafalov
 Solr resources and newsletter: http://www.solr-start.com/ and @solrstart
 Solr popularizers community: https://www.linkedin.com/groups?gid=6713853
 
 
 On 5 December 2014 at 01:11, Robin Woods woods4s...@gmail.com wrote:
 Hello,
 
 Anyone implemented Solr for searching the flights between two
 destinations,
 sort by shortest trip and best price? is geo-spatial search a right
 module
 to use?
 
 Thanks!
 


Re: Using Zookeeper with REST URL

2014-11-19 Thread Nazik Huq
Look at the \contrib\rest directory for zookeeper-3.4.5-rest.jar. It may
give you REST access to ZK - @nazik_huq

On Wed, Nov 19, 2014 at 10:27 AM, Ian Rose ianr...@fullstory.com wrote:

 I don't think zookeeper has a REST api.  You'll need to use a Zookeeper
 client library in your language (or roll one yourself).

 On Wed, Nov 19, 2014 at 9:48 AM, nabil Kouici koui...@yahoo.fr wrote:

  Hi All,
 
  I'm connecting to solr using REST API (No library like SolJ). As my solr
  configuration is in cloud using Zookeeper ensemble, I don't know how to
 get
  available Solr server from ZooKeeper to be used in my URL Call. With
 SolrJ
  I can do:
 
  String zkHostString = 10.0.1.8:2181;
  CloudSolrServersolr = newCloudSolrServer(zkHostString);
  solr.connect();
 
  SolrQuerysolrQuery = newSolrQuery(*:*);
  solrQuery.setRows(10);
  QueryResponse resp = solr.query(solrQuery);
 
  Any help.
 
  Regards,
  Nabil



Re: issue in launching SolrCloud windows/cygwin

2014-10-19 Thread Nazik Huq
Run Solr straight from the Windows cmd if CygWin isn't a requirement. For
example, running java -jar start.jar from the example directory will
start single instance Solr.

To run SolrCloud follow the instructions in Simple Two-Shard Cluster on
the Same Machine from this link http://bit.ly/1rlmYvF .

@nazik_huq

On Sun, Oct 19, 2014 at 2:51 AM, Anurag Sharma anura...@gmail.com wrote:

 Here is the issue am facing issue in using the 'solr' script on Windows
 with cygwin terminal:

 $ bin/solr -e cloud
 bin/solr: line 16: $'\r': command not found
 bin/solr: line 17: $'\r': command not found
 bin/solr: line 46: $'\r': command not found
 which: no lsof in

 (/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program
 Files/TortoiseSVN/bin:/cygdrive/c/Program
 Files/Java/jdk1.7.0_51/bin:/cygdrive/c/Program
 Files/apache-ant-1.9.3/bin:/cygdrive/c/Program Files
 (x86)/Python-27:/cygdrive/c/Program Files (x86)/Python-27/Scripts)
 bin/solr: line 52: $'\r': command not found
 bin/solr: line 87: syntax error near unexpected token `$HOME/.solr.in.sh
 '
 'in/solr: line 87: `   $HOME/.solr.in.sh \


 further
 $ bin/solr start -cloud -d node1 -p 8983
 bin/solr: line 16: $'\r': command not found
 bin/solr: line 17: $'\r': command not found
 bin/solr: line 46: $'\r': command not found
 which: no lsof in

 (/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program
 Files/TortoiseSVN/bin:/cygdrive/c/Program
 Files/Java/jdk1.7.0_51/bin:/cygdrive/c/Program
 Files/apache-ant-1.9.3/bin:/cygdrive/c/Program Files
 (x86)/Python-27:/cygdrive/c/Program Files (x86)/Python-27/Scripts)
 bin/solr: line 52: $'\r': command not found
 bin/solr: line 87: syntax error near unexpected token `$HOME/.solr.in.sh
 '
 'in/solr: line 87: `   $HOME/.solr.in.sh \

 Is there any other way I can run the SolrCloud using java -jar start.jar
 options?



RE: While creating collection in SolrCloud can we manually select machines(nodes)

2014-06-29 Thread Nazik Huq
Check this article:  SolrCloud - Assigning Nodes To Machines  by Erick
Erickson. He explains how to do this step by step:
http://heliosearch.org/solrcloud-assigning-nodes-machines/ 

-Original Message-
From: vidit.asthana [mailto:vidit.astha...@gmail.com] 
Sent: Saturday, June 28, 2014 5:09 PM
To: solr-user@lucene.apache.org
Subject: While creating collection in SolrCloud can we manually select
machines(nodes)

I have a 4 machine cluster. I want to create a collection with 1 shard and 1
replica. So I only need 2 machines. Is there a way I can explicitly define
the machines on which my new collection should be created.





--
View this message in context:
http://lucene.472066.n3.nabble.com/While-creating-collection-in-SolrCloud-ca
n-we-manually-select-machines-nodes-tp4144593.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Asp.net MVC 4 and Solr Query Begining

2014-04-01 Thread Nazik
Hi Daniel,

I think you should post this to SOLR.NET google group:

https://groups.google.com/forum/m/#!forum/solrnet

That forum is more appropriate to address  this type of problem.

@Nazik_Huq 


On Apr 1, 2014, at 5:30 AM, danielkrudolf daniel.k.rud...@gmail.com wrote:

 Hello to all, I am new in Solr, but I see it si very usable. So I whant to
 build web application with asp.net MVC 4 that shows query from Solr. 
 
 Ok, let's go so far i have done this:
 
 1) Open new project in Visual Studio 2012 and create new MVC 4 project
 (Empty solution).
 
 2) In Package Manager Console I have Install next packages:
 /SolrNet (core library)
 SolrNet.Windsor
 SolrNet.StructureMap
 SolrNet.Ninject
 SolrNet.Unity
 SolrNet.Autofac
 SolrNet.NHibernate/
 
 3) I create new Model class with name Poskus and write this code:
 using SolrNet.Attributes;
 
 /namespace TestSolr2.Models
 {
public class Poskus
{
 
[SolrField(customer)]
public string Customer { get; set; }
 
}
 }/
 
 4) Next I have create new Controller with name PoskusSolr and write this
 code:
 
 /using System;
 using System.Web.Mvc;
 using SolrNet;
 using SolrNet.DSL;
 using TestSolr.Models;
 using SolrNet.Impl;
 
 namespace TestSolr.Controllers
 {
public class PoskusSolrController : Controller
{
//
// GET: /PoskusSolr/
 
public ActionResult Index()
{
 
try
{
var connection = new
 SolrConnection(http://servicemix/.../msglog_pilot;);
Startup.InitPoskus(connection);
 
var pos1 = Solr.QueryPoskus(new SolrQueryByField(name,
 customer));
 
return View(pos1);
}
catch (Exception ex)
{
string error = ex.Message;
}
return View();
}   
}
 }/
 
 5) And finaly I have create View (Index) 
 
 So far I put this:
 
 /@model TestSolr.Models.Poskus
 @{
ViewBag.Title = Index;
 }
 
 Index
 /
 
 -
 Now, this code does not work, it not returns customers from my Solr databse.
 Any sugestions, ideas, links to make this work. Realy, realy thanks for
 help.
 
 Daniel
 
 
 
 
 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/Asp-net-MVC-4-and-Solr-Query-Begining-tp4128372.html
 Sent from the Solr - User mailing list archive at Nabble.com.


SolrCloud recovery after nodes are rebooted in rapid succession

2014-03-06 Thread Nazik Huq
Hello,

 

I have a question from a colleague who's managing a 3-node(VMs) SolrCloud
cluster with a separate 3-node Zookeeper ensemble. Periodically the  data
center underneath the SolrCloud decides to upgrade the SolrCloud instance
infrastructure in  a rolling upgrade fashion. So after the 1st instance of
the SolrCloud is shut down and while it is in the process of rebooting, the
2nd  instance starts to shut down  and so on. Eventually all three Solr
instances are rebooted and up and running  but the cluster in now
inoperable.  Meaning clients can't query or  ingest data. My colleague is
trying to ascertain if this problem is due to Solr's inability to recover
from a rapid succession of reboots of the nodes or from the data center
upgrade that is triggering a situation making SolrCloud inoperable.

 

My question is, can a SolrCloud cluster become inoperable after its nodes
are rebooted in rapid succession as described above? Is there an edge case
similar to this?

 

Thanks,

 

Nazik Huq

 

 



RE: SolrCloud recovery after nodes are rebooted in rapid succession

2014-03-06 Thread Nazik Huq
The version is 4.6. I am going to ask for the log files and post it.

-Original Message-
From: Mark Miller [mailto:markrmil...@gmail.com] 
Sent: Thursday, March 06, 2014 6:33 PM
To: solr-user
Subject: Re: SolrCloud recovery after nodes are rebooted in rapid succession

Would probably need to see some logs to say much. Need to understand why
they are inoperable.

What version is this?

- Mark

http://about.me/markrmiller

On Mar 6, 2014, at 6:15 PM, Nazik Huq nazik...@yahoo.com wrote:

 Hello,
 
 
 
 I have a question from a colleague who's managing a 3-node(VMs) 
 SolrCloud cluster with a separate 3-node Zookeeper ensemble. 
 Periodically the  data center underneath the SolrCloud decides to 
 upgrade the SolrCloud instance infrastructure in  a rolling upgrade 
 fashion. So after the 1st instance of the SolrCloud is shut down and 
 while it is in the process of rebooting, the 2nd  instance starts to 
 shut down  and so on. Eventually all three Solr instances are rebooted 
 and up and running  but the cluster in now inoperable.  Meaning 
 clients can't query or  ingest data. My colleague is trying to 
 ascertain if this problem is due to Solr's inability to recover from a 
 rapid succession of reboots of the nodes or from the data center upgrade
that is triggering a situation making SolrCloud inoperable.
 
 
 
 My question is, can a SolrCloud cluster become inoperable after its 
 nodes are rebooted in rapid succession as described above? Is there an 
 edge case similar to this?
 
 
 
 Thanks,
 
 
 
 Nazik Huq
 
 
 
 
 



Re: Zookeeper as Service

2014-01-09 Thread Nazik Huq


From your email I gather your main concern is starting zookeeper on server 
startups.

You may want to look at these non-native service oriented options too:
Create  a script( cmd or bat) to start ZK on server bootup. This method may not 
restart Zk if Zk crashes(not the server).
Create C# commad line program that starts on server bootup(see above) that uses 
the .Net System.Diagnostics.Process.Start method to start Zk on sever start and 
monitor the Zk process via a loop. Restart when Zk process crash or hang. I 
prefer this method. There might be a Java equivalent of this. There are many 
exmaples avaialble on the web.
Cheers,
@nazik_huq



On Thursday, January 9, 2014 10:07 AM, Charlie Hull char...@flax.co.uk wrote:
  
On 09/01/2014 09:44, Karthikeyan.Kannappan wrote:

 I am hosting in windows OS



 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/Zookeeper-as-Service-tp4110396p4110413.html
 Sent from the Solr - User mailing list archive at Nabble.com.


There are various ways to 'servicify' (yes that may not be an actual 
word) executable applications on Windows. The venerable SrvAny is one 
such option as is the newer
 nssm.exe (Non-Sucking Service Manager).

Bear in mind that a Windows Service doesn't operate quite the same way 
with regard to stdout and stderr which may mean any error messages end 
up in a black hole, with you simply
 getting something unhelpful 'service 
failed to start' error messages from Windows itself if something goes 
wrong. The 'working directory' is another thing that needs careful 
setting up.

Cheers

Charlie

-- 
Charlie Hull
Flax - Open Source Enterprise Search

tel/fax: +44 (0)8700 118334
mobile:  +44 (0)7767 825828
web: www.flax.co.uk

Re: Securing SOLR REST API

2013-07-10 Thread Nazik


Sent from my iPhone

On Jul 10, 2013, at 10:22 AM, Pires, Guilherme guilherme.pi...@cgi.com 
wrote:

 Hello Everyone,
 
 I have been developing several solutions, mainly geospatial, that include 
 solr.
 The availability of the restful services seem to bother a lot of people. 
 Mainly IT security, of course.
 
 How can I guarantee that Solr services are only 'called' from my web 
 html5/jquery based application?
 Any ideas?
 
 Thanks
 Guilherme
 GIS Solution Specialist