1. 程式人生 > >Elasticsearch:No handler for type [string] declared on field[XXX]的解決辦法

Elasticsearch:No handler for type [string] declared on field[XXX]的解決辦法

報錯原因

我使用的Elasticsearch是6.2.2版本,按照學校文件建立欄位時,使用了{"type":"string","index":"not_analyzed"}

原因分析

檢查拼寫無誤之後,我決定去查Elasticsearch新版本特性,因為之前也踩過head外掛的安裝方法的坑,就是因為版本問題。
果不其然,Elasticsearch從5.X就引入了textkeyword,其中keyword適用於不分詞欄位,搜尋時只能完全匹配,這時string還保留著。
到了6.X就徹底移除string了。
另外,"index"

的值只能是boolean變量了。

解決方法

{"type":"text","index":false}

參考文件

相關推薦

Elasticsearch:No handler for type [string] declared on field[XXX]的解決辦法

報錯原因 原因分析 解決方法 參考文件 報錯原因 我使用的Elasticsearch是6.2.2版本,按照學校文件建立欄位時,使用了{"type":"string","index":"

“Validation failed for one or more entities”異常的解決辦法

ida detail errors ali onerror 長度限制 span led 修改 日誌中出現Entity Framework修改數據庫時的錯誤: Validation failed for one or more entities. See ‘EntityVal

This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its 錯誤解決辦法

eat blog clas min clear gin bsp term rmi This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and

ModuleNotFoundError: No module named xxx 解決辦法

__main__ ack error: xxx not __init__ name pac mod ModuleNotFoundError: No module named xxx 或者 '__main__' is not a package 報錯:當前目錄

for迴圈呼叫刪除方法報錯解決辦法

1.每次刪除一個元素,索引往前移,即i-1.      List<String> list = new ArrayList<String>();      list.add("111");  &nbs

關於android studio 出現Error:Execution failed for task ':app:preDebugAndroidTestBuild'. 的解決辦法 前段時間開啟Android studio 在build過程中總會出現以下錯誤

前段時間開啟Android studio 在build過程中總會出現以下錯誤 Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency 'co

Centos kernel panic-not syncing:VFS:Unable to mount root fs on unknown block 解決辦法

昨晚更新了一下核心,今晚開機就無法進系統了...提示如下圖: 解決方案:開機啟動時按Esc,然後選擇下面的舊版本的核心啟動即可。  (成功進入系統後,你可以選擇改變開機預設選擇的核心)。   uname -r  檢視當前核心版本 rpm -qa|grep k

JAVA型別直接輸入超過10位報The literal XXX of type int is out of range 解決辦法

Long.parseLong("XXX")或long number=xxxL java long與int取值範圍的問題 1:long l = 1024*1024*1024*4; //02:int i1 = 1024*1024*1024*4; //03:int i2 = 22000000000

Unable to resolve dependency for和Could not resolve project 的解決辦法,針對AndroidStudio高版本

前提是這樣的:我找了一個AndroidStudio3.0之前版本的專案,把它其中的Module匯入到一個新專案中作為依賴 然後就出現此報錯資訊,老是說Could not resolve project:xxx 解決了一下午。有人說在Setting-Build,Gradle,xxx選項中

ORA-03113: end-of-file on communication channel 解決辦法

好象是之前清理了trace檔案,之後再重啟oracle,出現: SQL> ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance ORACLE instance started. Total S

ValueError: could not convert string to float錯誤的解決辦法

錯誤: ValueError: could not convert string to float 出錯的地方為: month_diff = int(float(date_consumed[-6:-4])) - int(float(date_received[-6:-4])),這一句包含

android studio 出現Error:Execution failed for task ':app:preDebugAndroidTestBuild'. 的解決辦法

錯誤程式碼: Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency 'com.android.support:support-annotations

Windows環境下Python 安裝庫 is not a supported wheel on this platform解決辦法【轉】

Windows環境下Python 安裝庫 is not a supported wheel on this platform解決辦法 在使用python進行pdf轉換圖片時,需要PythonMagick庫,但下載了許多whl都無法解決 解決方案 可能的原因

安裝.whl檔案出現 is not a supported wheel on this platform.解決辦法

有一次在學習機器學習演算法的時候,要安裝一個scikit-learn庫,需要依賴庫numpy和matplot庫,但是我安裝的時候出現了is not a supported wheel on this platform的錯誤,我先百度了一下嘗試一些方法: 1.  在pytho

vue報錯Module build failed: Error: No parser and no file path given, couldn't infer a parser.解決辦法

今天中午更新的專案,vue模組裡子模組報錯百度查詢  今天下午1點多吧  貌似git 新版本給解決了   只需一步 更新即可npm i [email protected]~1.12.0 這個是降版本 因為是更新成1.13.0崩的 不過官網更新了 1.13

Mysql Blob型別 轉換為java String 時產生亂碼的解決辦法

while(rs.next()){int id = rs.getInt(1);String name = rs.getString(2);int age = rs.getInt(3);Date birthday = rs.getDate(4);Blob noteBlob = rs.getBlob(5);St

安裝AndroidStudio時出現unable to access android sdk add-on list的解決辦法

上一篇好像因為寫了S和諧S和諧R被和諧了,呵呵,csdn垃圾玩意。 由於csdn的限制我就不再放圖,文字談方法。 0x01 本方法有一個前提條件,你需要有一個能用的梯子,我是用的是S和諧S和諧R,不知道是什麼的自行google。 0x02 將該S和諧S和諧R設定為全域性

Invalid JDK version in profile 'doclint-java8-disable': Unbounded range: [1.8, for project com.google.code.gson:gson 解決辦法

分享圖片 分享 unbound png img googl val 解決 ali 利用maven打包的時候遇到這個問題 在git上發現一個解決方案 問題解決Invalid JDK version in profile 'doclint-java8-disabl

You don't have permission to access on this server解決辦法

安裝好wampserver想在瀏覽器開啟執行php的結果,發現: You don't have permission to access on this server 解決辦法是: 在wampserver-Apache的httpd.conf檔案下修改一處資訊: 把大概處

elasticsearch對analyzed欄位無法使用term方法的解決辦法

眾所周知,對於es來說,如果其中某個欄位使用了analyzed分詞功能,那麼使用term時,很大概率將無法匹配,使用match又會得到太多的結果,這個時候,我們可以使用 match_phrase來達