elasticsearch not analyzed still tokenize string -


मेरे पास एक इंडेक्स है जिसमें 4 प्रविष्टियां हैं।

  "hits": ("कुल": 4, "max_score": 1.0, "हिट": [{"_index": "da_6", "_type": "ट्वीट", "_id": "1", "_score": 1.0, " _source ": {" message ":" hello world "}}, {" _index ":" da_6 "," _type ":" ट्वीट "," _id ":" 2 "," _score ": 1.0," _source ": {"Message": "hello worldetc"}}, {"_index": "da_6", "_type": "ट्वीट", "_id": "4", "_score": 1.0, "_source": {"message ":", "," _score ": 1.0," _source ": {" message ":" "," hello world "}}, {" _index ":" da_6 "," _type ":" ट्वीट "," _id ":" 3 "," _score ": {" message " "नमस्ते आदि विश्व"}}]   

मैंने अनुक्रमणिका बनाने के बाद मैंने "स्ट्रिंग" / "नहीं_अनलाज्ड" पर मैपिंग सेट की है और मुझे यकीन है कि इसे लागू किया गया है।

मैपिंग:

  "da_6": {"mappings": {"ट्वीट": {"गुण": {"message": {"type": "string", " सूचकांक ":" not_analyzed "}}}}}   

जब कोई उपयोगकर्ता" हैलो डब्ल्यू "टाइप करता है, तो मैं इसे पहले एक दिखाना चाहता हूं पहला, फिर दूसरा और तीसरा चूंकि चौथे में "हैलो डब्ल्यू" को पूरी स्ट्रिंग के रूप में शामिल नहीं किया जाता है, इसलिए यह परिणाम में दिखाना नहीं है।

मैंने कोशिश की है query_string , "हैलो" की खोज करें W * ", लेकिन यह सभी 4 परिणाम दिखाता है (जैसा कि अभी भी सामग्री को टोकने के लिए लगता है।

क्या कोई खोज पद्धति है, जैसा कि IndexOf (js) जैसा व्यवहार होता है जिसके परिणामस्वरूप केवल दिए गए क्वेरी स्ट्रिंग ("हैलो डब्ल्यू" इस मामले में)?

शायद आप match_phrase_prefix क्वेरी का उपयोग कर सकते हैं, मैं तीन मदों को वापस कर सकता हूं जिनकी आप चाहती थीं.मैं एक और मैपिंग का उपयोग कर रहा था.मैं मानक विश्लेषक का उपयोग करता हूं (ऐसा कोई सूचकांक नहीं है: not_analyzed):

  GET / da_6 / _search {"query": {" match_phrase_prefix ": {" message ":" हैलो डब्ल्यू "}}}    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -