1、重點(diǎn)信息提煉
???????? Fielddata is disabled n text fields by default. Set fielddata=true on [shopOperatorTime] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead
2、關(guān)于fielddata=true 這個(gè)參數(shù)可以在百度上面查看到對(duì)應(yīng)的解釋
3、項(xiàng)目中的報(bào)錯(cuò)是使用shopOperatorTime 這個(gè)字段進(jìn)行排序,這個(gè)字段是date類型的,Java代碼解決方法:
????????報(bào)錯(cuò)代碼: ? ? ??文章來源:http://www.zghlxwxcb.cn/news/detail-536961.html
searchSourceBuilder.sort("shopOperatorTime", SortOrder.DESC);
????????修改后代碼:? ??文章來源地址http://www.zghlxwxcb.cn/news/detail-536961.html
searchSourceBuilder.sort("shopOperatorTime.keyword", SortOrder.DESC);
到了這里,關(guān)于ES查詢問題- Fielddata is disabled n text fields by default. Set fielddata=true on [XXXX]的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!