![](/img/trans.png)
[英]Django Haystack update index only for 1 model
我目前正在嘗試 Django haystack 將數據從 PostgreSQL 更新到 solr 集合。 所以,我在search_indexes.py中定義了 2 個模型。 因此,當我運行命令python manage.py update_index時,它會將search_indexes.py中定義 ...
[英]Django Haystack update index only for 1 model
我目前正在嘗試 Django haystack 將數據從 PostgreSQL 更新到 solr 集合。 所以,我在search_indexes.py中定義了 2 個模型。 因此,當我運行命令python manage.py update_index時,它會將search_indexes.py中定義 ...
[英]Can OR-clauses be combined with distance filters in Haystack for Django?
我一直在使用 OR 子句中的常規 django 查詢過濾器來使用距離過濾器: 我想使用 SQ 進行類似的過濾作為 haystack 查詢的一部分: 但相反,我得到了錯誤: not all arguments converted during string formatting - 這只發生在 ...
[英]Django Haystack select which fields to search
假設我有一個人 model 看起來像這樣: 還有一個像這樣的 Haystack 搜索索引: 假設模板包含所有三個字段(名字、姓氏和標題)。 如果用戶應該能夠選擇要搜索的字段,我是否需要為所有可能的排列建立單獨的索引? 或者我可以將搜索范圍縮小到三個字段中的一個或兩個? 如果有怎么辦? 我知道我可以使 ...
[英]ValueError: The view blog.views.post_search didn't return an HttpResponse object. It returned None instead
我正在使用 Solr 和 Haystack 為我的 django 博客實現“搜索功能”。 在“http://127.0.0.1:8000/blog/search/”中,它說 TypeError at /blog/search/post_detail() missing 3 required pos ...
[英]nginx + django + haystack = Server Error (500)
我在 Django 中使用 Haystack 和 Whoosh 后端拼湊了一個小型博客應用程序進行搜索。 它在開發服務器(在筆記本電腦上)中運行良好,但是當站點在服務器(rpi)上的 nginx 中運行時搜索失敗。 我可以訪問搜索頁面,但服務器錯誤(500)中的任何搜索結果,nginx 或 djan ...
[英]Serializer field values based on request
在 Haystack 中,我有以下視圖集:class ArtistSearchViewSet(HaystackViewSet): index_models = (Artist,) serializer_class = ArtistSearchResultSerializer ...
[英]DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools-scm')
您好,當嘗試將 django 應用程序部署到彈性 beanstalk 時出現此錯誤, 我試圖在我的 requirements.txt 文件中甚至在 my.ebextension 目錄中添加庫 setuptools-scm,但仍然沒有任何建議? 編輯,這是錯誤的完整日志: Application de ...
[英]ERROR: Could not find a version that satisfies the requirement django-haystack==2.8.1
我已經安裝了python3.6.4和pipenv,並且我的項目git到了centos7,我想安裝項目依賴項並使用這樣的代碼 但我得到這樣的錯誤: Installing dependencies from Pipfile.lock (bd1720)... ?? ????????????? ...
[英]add fields to SearchIndex dynamically (django-haystack)
目前我看到了兩種可能性,在定義 SearchIndex class 之后使用locals()和setattr() : 1. 2. 我正在使用 Django-haystack 和ElasticSearch 。 我知道使用locals()不是最佳做法。 那么解決我的問題的正確方法是什么? 非常感謝 ...
[英]ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. when installing django-haystack
pipenv install命令以前工作得很好,但今天它給出了這個錯誤消息。 有誰知道這個問題? 我還嘗試安裝其他軟件包來測試它是否是 package 或源的問題,例如pipenv install numpy ,但它仍然給我相同的錯誤消息。 ...
[英]Django-Haystack not finding any field
我正在嘗試用 django-haystac 和 whoosh 編寫一個小搜索引擎。 我改編了他們的教程,我從 JSON 文件創建了我的索引,並使用 QueryParser 成功查詢它,現在我正在嘗試使用他們的視圖。 當我嘗試在以下位置訪問搜索 url 時: http://127.0.0.1:8000 ...
[英]Why does django-haystack run the object preparation multiple times?
我在我有這個SearchIndex : class UserIndex(SearchIndex, Indexable): text = CharField(document=True, use_template=True) likes = IntegerField() de ...
[英]Django-haystack & solr : Increase the number of results
我有這個功能: 默認情況下它只返回 20 個結果,有沒有辦法增加這個數字? 謝謝。 ...
[英]Query haystack search with multiple URL params
我的搜索在很大程度上按照我需要的方式工作,但我希望能夠根據用戶選擇的類別進行排序。 我有子類searchForm包含: 以下按預期工作: /testing/search/?q=test -> 所有與“test”相關的結果 /testing/search/?category=Developme ...
[英]Django-Haystack & Elasticsearch brake with queries containing special characters
因此,我一直在嘗試修復一個真正讓我煩惱的錯誤:Django-Haystack 和 Elasticsearch 查詢正在使用重音符號,但每次查詢包含特殊字符(如破折號-和撇號' )時都會停止。 例如,讓我們使用Baie-d'Urfé作為查詢。 這是我的代碼: forms.py 在 View.py 中 ...
[英]How do I set the time under which user can delete or update it?
我有 model 訂單 我如何創建它? 如果用戶是客戶,那么他們會在下單 5 分鍾內刪除或更新,如果用戶是商店,那么他們可以隨時更新或刪除 ...
[英]how I can send sms to user when new record insert
我有 model訂單 當客戶插入訂單時,我如何向商店發送短信,然后商店收到短信,告知您有客戶姓名的新訂單。 數量中的產品名稱客戶 model 店鋪 model 和我的訂單views.py ...
[英]how i can create a field for the post
我有 model訂單 我為訂單創建views.py 我在這里為 shop.products 創建了 HTML 頁面 我得到了商店的 id 和產品href="{% url 'CreateOrder' i.shop.id i.id %}"但是當我點擊按鈕然后訂單被創建但數量和注釋是 null 如何在同一 ...
[英]Getting an error: got an unexpected keyword argument 'version'
我正在做 Django 干草堆 教程,當我運行搜索查詢時,我收到錯誤__call__() got an unexpected keyword argument 'version' 。 此錯誤來自 Django。 我對 Django 相當陌生,我不確定要添加什么來幫助調試它。 另外,在引擎中,我正在 ...
[英]Foreign-key automatically fill in the form
有店鋪、顧客、商品、訂貨的4種型號。 我正在展示模型的關系店鋪 顧客 產品 命令 當客戶登錄時,商店將在屏幕上打印,並在商店上顯示一個按鈕,以表格卡的形式顯示商店的產品我如何創建一個訂單表格,以便按訂單的客戶是實例,按訂單的商店是選擇顯示產品的商店,並且產品的每張卡片都有一個字段來填寫剩余的詳細信息 ...