Integrating with an existing database

77 views
Skip to first unread message

dapor

unread,
May 28, 2012, 7:00:10 PM5/28/12
to django-watson discussion group
I'm integration with an existing postgresql database. Search does not
return anything for existing data. When I insert an new one, search
returns it though. How do I make i work with existing data?

Dave Hall

unread,
May 29, 2012, 5:30:56 AM5/29/12
to django...@googlegroups.com
This one's easy! Just run the following django-admin command:

./manage.py buildwatson

This will generate the search index for all existing models.

Best,

Dave.
> --
> You received this message because you are subscribed to the Google Groups "django-watson discussion group" group.
> To post to this group, send an email to django...@googlegroups.com.
> To unsubscribe from this group, send email to django-watso...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-watson?hl=en-GB.
>

dapo lawore

unread,
May 29, 2012, 6:14:49 AM5/29/12
to django...@googlegroups.com
Even where i run the command, it does not return results when I do a search.
--
Oladapo Lawore
Skype: daposta
Software Engineer/Entrepreneur



“Here’s to the crazy ones. The misfits. The rebels. The troublemakers. The round pegs in the square holes…While some see them as the crazy ones, we see genius. Because the people who are crazy enough to think they can change the world are the ones who do.”


Dave Hall

unread,
May 29, 2012, 6:15:50 AM5/29/12
to django...@googlegroups.com
But it does return results for new objects you've added?

Where are you registering models with django-watson in your code?

dapo lawore

unread,
May 29, 2012, 6:24:53 AM5/29/12
to django...@googlegroups.com
It was working for new entries before I added the store attribute to the register method. I added the attributes so I could use it for the display if results returned. Now nothing seems to be working. Not even for new entries.

dapo lawore

unread,
May 29, 2012, 6:44:05 AM5/29/12
to django...@googlegroups.com
Are you on skype? I'm hoping we can have a quick chat, if possible.

Dave Hall

unread,
May 29, 2012, 8:58:24 AM5/29/12
to django...@googlegroups.com
My Skype username is david.etianen. Hit me with a message.

dapo lawore

unread,
Jul 4, 2012, 3:55:20 AM7/4/12
to django...@googlegroups.com
Hi Dave,
Can u spare me a few minutes on skype? I want to be clear on how to access foreign key fields when registering models so that i can search them also. 

For example,  a Resource model has a foreign key called Country model which has a field called name. I want to be able search for, say resources in a country like Ghana and get matches. 
Reply all
Reply to author
Forward
0 new messages