dev-database on laptop behind firewall how to connect to solr backend on Amazon EC2

21 views
Skip to first unread message

harijay

unread,
May 5, 2013, 12:48:17 PM5/5/13
to django-...@googlegroups.com

Hi am a django and haystack newbie ,

I am running a solr backend on Amazon EC2 . I am using the dev version of haystack from github. 

My models and test database are on my dev-laptop . I setup haystack to work this way over half a year ago. When I run a "python manage.py rebuild_index" I see that the index files on my EC2 instance at "~/apache-solr-4.0.0/example/solr/collection1/data/index" get automatically updated. 

I don't remember how this works or how I set it up ? I want to replicate this setup with another machine which is also behind a firewall and want to write down notes this time on how to setup such a machine.

Thanks for your help

Hari



Chris Wilson

unread,
May 5, 2013, 3:02:56 PM5/5/13
to django-...@googlegroups.com
Hi Hari,
rebuild_index is a management command built into Haystack. It will connect
to the Haystack search engine that you've configured as 'default' in
HAYSTACK_CONNECTIONS in your settings.py, empty it, and index each of your
documents in turn, writing the results to that search engine.

So apart from creating HAYSTACK_CONNECTIONS with appropriate settings, you
probably didn't and don't need to do anything to "configure" it.

Cheers, Chris.
--
Aptivate | http://www.aptivate.org | Phone: +44 1223 967 838
Future Business, Cam City FC, Milton Rd, Cambridge, CB4 1UY, UK

Aptivate is a not-for-profit company registered in England and Wales
with company number 04980791.

hari jayaram

unread,
May 11, 2013, 11:49:19 AM5/11/13
to django-...@googlegroups.com
Hi Chris,
Thank you for your reply..

I guess when I setup the EC2 instance running solr I had opened up the port 8983 for two way communication.

My HAYSTACK_CONNECTIONS has :


So running a rebuild_indexon my dev-laptop communicates with the solr service running on port 8983 and updates the index located in the 

~/apache-solr-4.0.0/example/solr/collection1/data/index directory.

I guess I am suprised that I did not need any more configuration with my router firewall or other aspects of my home network to have that communication go between my development OSX laptop sitting inside my home firewall and the solr backend.

Thanks again
Hari





--
You received this message because you are subscribed to the Google Groups "django-haystack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-haystack+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Reply all
Reply to author
Forward
0 new messages