cost 202 ms
Django Haystack 僅針對 1 個模型更新索引

[英]Django Haystack update index only for 1 model

我目前正在嘗試 Django haystack 將數據從 PostgreSQL 更新到 solr 集合。 所以,我在search_indexes.py中定義了 2 個模型。 因此,當我運行命令python manage.py update_index時,它會將search_indexes.py中定義 ...

可以將 OR 子句與 Haystack for Django 中的距離過濾器結合使用嗎?

[英]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 要搜索的字段

[英]Django Haystack select which fields to search

假設我有一個人 model 看起來像這樣: 還有一個像這樣的 Haystack 搜索索引: 假設模板包含所有三個字段(名字、姓氏和標題)。 如果用戶應該能夠選擇要搜索的字段,我是否需要為所有可能的排列建立單獨的索引? 或者我可以將搜索范圍縮小到三個字段中的一個或兩個? 如果有怎么辦? 我知道我可以使 ...

ValueError:視圖 blog.views.post_search 未返回 HttpResponse object。它返回 None

[英]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 = 服務器錯誤 (500)

[英]nginx + django + haystack = Server Error (500)

我在 Django 中使用 Haystack 和 Whoosh 后端拼湊了一個小型博客應用程序進行搜索。 它在開發服務器(在筆記本電腦上)中運行良好,但是當站點在服務器(rpi)上的 nginx 中運行時搜索失敗。 我可以訪問搜索頁面,但服務器錯誤(500)中的任何搜索結果,nginx 或 djan ...

DistutilsError:找不到適合 Requirement.parse('setuptools-scm') 的分布

[英]DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools-scm')

您好,當嘗試將 django 應用程序部署到彈性 beanstalk 時出現此錯誤, 我試圖在我的 requirements.txt 文件中甚至在 my.ebextension 目錄中添加庫 setuptools-scm,但仍然沒有任何建議? 編輯,這是錯誤的完整日志: Application de ...

動態添加字段到 SearchIndex (django-haystack)

[英]add fields to SearchIndex dynamically (django-haystack)

目前我看到了兩種可能性,在定義 SearchIndex class 之后使用locals()和setattr() : 1. 2. 我正在使用 Django-haystack 和ElasticSearch 。 我知道使用locals()不是最佳做法。 那么解決我的問題的正確方法是什么? 非常感謝 ...

錯誤:命令出錯,退出狀態為 1:python setup.py egg_info 檢查日志以獲取完整命令 output。 安裝 django-haystack 時

[英]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 沒有找到任何字段

[英]Django-Haystack not finding any field

我正在嘗試用 django-haystac 和 whoosh 編寫一個小搜索引擎。 我改編了他們的教程,我從 JSON 文件創建了我的索引,並使用 QueryParser 成功查詢它,現在我正在嘗試使用他們的視圖。 當我嘗試在以下位置訪問搜索 url 時: http://127.0.0.1:8000 ...

使用多個 URL 參數查詢 haystack 搜索

[英]Query haystack search with multiple URL params

我的搜索在很大程度上按照我需要的方式工作,但我希望能夠根據用戶選擇的類別進行排序。 我有子類searchForm包含: 以下按預期工作: /testing/search/?q=test -> 所有與“test”相關的結果 /testing/search/?category=Developme ...

Django-Haystack & Elasticsearch 剎車,查詢包含特殊字符

[英]Django-Haystack & Elasticsearch brake with queries containing special characters

因此,我一直在嘗試修復一個真正讓我煩惱的錯誤:Django-Haystack 和 Elasticsearch 查詢正在使用重音符號,但每次查詢包含特殊字符(如破折號-和撇號' )時都會停止。 例如,讓我們使用Baie-d'Urfé作為查詢。 這是我的代碼: forms.py 在 View.py 中 ...

出現錯誤:得到了一個意外的關鍵字參數“版本”

[英]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種型號。 我正在展示模型的關系店鋪 顧客 產品 命令 當客戶登錄時,商店將在屏幕上打印,並在商店上顯示一個按鈕,以表格卡的形式顯示商店的產品我如何創建一個訂單表格,以便按訂單的客戶是實例,按訂單的商店是選擇顯示產品的商店,並且產品的每張卡片都有一個字段來填寫剩余的詳細信息 ...


 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM