python - django haystack indexes nothing -


i using ubuntu 13 , django 1.4.5, have installed solr, tomcat6, (sudo apt-get install solr-tomcat) djangohaystack etc. , seem work fine. cannot make index.

search_indexes.py

from haystack import indexes, site firms_api.models import company  class companynameindex(indexes.searchindex, indexes.indexable):     text = indexes.charfield(document=true, use_template=true)     company_name = indexes.charfield(model_attr='company_name')      def get_model(self):         return company          def __unicode__(self):             return self.company.company_name      def index_queryset(self, using=none):         return self.get_model().objects.all()  site.register(company, companynameindex)  

the settings file:

haystack_siteconf = 'api' haystack_search_engine = 'solr' haystack_whoosh_path = os.path.join(project_root, 'djangobb_index') haystack_solr_url = "http://solrserver.com/solr" 

than did:

python manage.py build_solr_schema -f schema.xml sudo mv schema.xml /etc/solr/conf/schema.xml  sudo /etc/init.d/tomcat6 restart  * stopping tomcat servlet engine tomcat6                                                                                                [ ok ]   * starting tomcat servlet engine tomcat6                                                                                                [ ok ]   python manage.py rebuild_index warning: irreparably remove search index. choices after restore backups or rebuild via `rebuild_index` command. sure wish continue? [y/n] y  removing documents index because said so. documents removed.  python manage.py haystack_info loaded urlconf initialize searchsite... main site registered 0 index(es). 

when attempt make search on solr got error:

http status 400 - no field name specified in query , no defaultsearchfield defined in schema.xml  type status report  message no field name specified in query , no defaultsearchfield defined in schema.xml  description request sent client syntactically incorrect (no field name specified in query , no defaultsearchfield defined in schema.xml). 

anyone has idea make mistake?

thanks

i have installed haystack 2.0.0 beta , works now.


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -