whoosh

postgres LockError… how to investigate

余生颓废 提交于 2019-12-24 17:56:01
问题 Hi I am using gunicorn with nginx and a postgreSQL database to run my web app. I recently change my gunicorn command from gunicorn run:app -w 4 -b 0.0.0.0:8080 --workers=1 --timeout=300 to gunicorn run:app -w 4 -b 0.0.0.0:8080 --workers=2 --timeout=300 using 2 workers. Now I am getting error messages like File "/usr/local/lib/python2.7/dist-packages/flask_sqlalchemy/__init__.py", line 194, in session_signal_after_commit models_committed.send(session.app, changes=list(d.values())) File "/usr

Haystack's SearchQuerySet().filter not doing anything (Whoosh 2.4.1, Django-haystack 1.2.7)

强颜欢笑 提交于 2019-12-24 12:51:26
问题 views.py (relevant part) srch = request.GET.get('search', "") sqs = SearchQuerySet().filter(has_title=True) clean_query = sqs.query.clean(srch) results = sqs.raw_search(clean_query) search_indexes.py from haystack.indexes import * from haystack import site from myproject.myapp.models import Person class PersonIndex(SearchIndex): text = CharField(document=True, use_template=True) name = CharField(model_attr='name') has_title = BooleanField(model_attr='has_title') site.register(Person,

Django-Haystack-Whoosh is giving no results

回眸只為那壹抹淺笑 提交于 2019-12-24 08:48:26
问题 I'm trying to use Haystack-Whoosh for search in a Django application. I've implemented code same as mentioned in documentation page: django-haystack documentaation but still it is not working no search results were filtered. Here is my code: models.py from django.db import models from datetime import datetime class Newcar(models.Model): car_name = models.CharField(max_length=50) carmodel = models.CharField(max_length=50) car_logo = models.CharField(max_length=1000) pub_date = models

Django 1.9/Haystack 2.4.1 “Model could not be found for SearchResult”

感情迁移 提交于 2019-12-23 02:01:31
问题 Let me just first say, I have tried the fixes here: Haystack says “Model could not be found for SearchResult” and I'm still getting Model could not be found for SearchResult '<SearchResult: dictionary.termentry (pk=u'10')>'. I'm on Django 1.9 & Haystack 2.4.1 with Whoosh. I've determined that the SearchQuerySet is filtering just fine (when I print queryset I get a list of SearchResult objects). I didn't touch anything beyond the SearchIndex definitions, so this is out-of-the-box stuff. Just

Django 1.9/Haystack 2.4.1 “Model could not be found for SearchResult”

杀马特。学长 韩版系。学妹 提交于 2019-12-23 02:01:27
问题 Let me just first say, I have tried the fixes here: Haystack says “Model could not be found for SearchResult” and I'm still getting Model could not be found for SearchResult '<SearchResult: dictionary.termentry (pk=u'10')>'. I'm on Django 1.9 & Haystack 2.4.1 with Whoosh. I've determined that the SearchQuerySet is filtering just fine (when I print queryset I get a list of SearchResult objects). I didn't touch anything beyond the SearchIndex definitions, so this is out-of-the-box stuff. Just

Django Haystack indexing is not working for many to many field in model

我的未来我决定 提交于 2019-12-22 00:48:28
问题 I am using haystack in our django application for search and search is working very fine. But I am having an issue with reamtime search. For realtime search I am using haystack's default RealTimeSignalProcessor(haystack.signals.RealtimeSignalProcessor). My model contains one many to many field in it. When data is changed for this many to many field only, it seems the realtimesignal processor is not updating indexing data properly. After updating the many to many data, I am getting wrong

Django haystack doesn't add to Solr index. [Works with whoosh, fails with Solr]

一曲冷凌霜 提交于 2019-12-21 20:54:43
问题 During development I used whoosh as a backend, and now want to switch to solr. I installed solr, changed the settings, to HAYSTACK_SEARCH_ENGINE, and HAYSTACK_SOLR_URL. Now when I try to update or rebuild the index it fails with Failed to add documents to Solr: [Reason: None] . All searches are also wrong with 0 results returned for all queries.. This work if I change to whoosh. However, I have a RealTimeSearch index set, and during model creation I am getting no warning about not being able

Document search on partial words

感情迁移 提交于 2019-12-18 15:16:24
问题 I am looking for a document search engine (like Xapian, Whoosh, Lucene, Solr, Sphinx or others) which is capable of searching partial terms. For example when searching for the term "brit" the search engine should return documents containing either "britney" or "britain" or in general any document containing a word matching r *brit* Tangentially, I noticed most engines use TF-IDF (Term frequency-Inverse document frequency) or its derivatives which are based on full terms and not partial terms.

Does whoosh require all strings to be unicode?

孤者浪人 提交于 2019-12-14 03:53:07
问题 I am redoing my search app in Whoosh from Solr. I am now learning from the quick start . But I kept running into problems each time I had to deal with strings >>>writer.add_document(iden=fil, content=F2T.file_to_text(fil_path)) ValueError: 'File Name.doc' is not unicode or sequence and then: >>>query = QueryParser("content", ix.schema).parse("first") AssertionError: 'first' is not unicode And THAT line comes straight from the quick-start turorial! Does Whoosh require all fields to be in

Haystack with Whoosh- Search Results Not Redirecting

时间秒杀一切 提交于 2019-12-13 18:04:00
问题 I successfully installed whoosh and made it work with Haystack. Things are working fine but I'm facing one problem which is; after searching for a keyword and it print out the results, when I click on the result(title), It won't redirect me to the page of the keyword I clicked on, it's just static. I tried adding a get_absolute_url method. Yet it's not working. What I'm I missing? Models class Meek(models.Model): user=models.ForeignKey(User) title=models.CharField(max_length=250, unique=True)