sense

elasticsearch query issue with ngram

£可爱£侵袭症+ 提交于 2020-01-25 17:18:45
问题 i have this data in my index https://gist.github.com/bitgandtter/6794d9b48ae914a3ac7c If you notice in the mapping im using the ngram from 3 tokens to 20. when i execute this query: GET /my_index/user/_search?search_type=dfs_query_then_fetch { "query": { "filtered": { "query":{ "multi_match":{ "query": "F", "fields": ["username","firstname","middlename","lastname"], "analyzer": "custom_search_analyzer" } } } } } I should get the 8 documents i have indexed but i get only 6 leaving out two with

Updating analyzer within ElasticSearch settings

左心房为你撑大大i 提交于 2019-12-30 09:47:13
问题 I'm using Sense (Chrome plugin) and I've managed to setup an analyzer and it is working correctly. If I issue a GET (/media/_settings) on the settings the following is returned. { "media": { "settings": { "index": { "creation_date": "1424971612982", "analysis": { "analyzer": { "folding": { "filter": [ "lowercase", "asciifolding" ], "tokenizer": "standard" } } }, "number_of_shards": "5", "uuid": "ks98Z6YCQzKj-ng0hU7U4w", "version": { "created": "1040499" }, "number_of_replicas": "1" } } } } I

ElasticSearch NEST Query

北城以北 提交于 2019-12-28 13:56:52
问题 I'm trying to mimic a query that I wrote in Sense (chrome plugin) using NEST in C#. I can't figure out what the difference between the two queries is. The Sense query returns records while the nest query does not. The queries are as follows: var searchResults = client.Search<File>(s => s.Query(q => q.Term(p => p.fileContents, "int"))); and { "query": { "term": { "fileContents": { "value": "int" } } } What is the difference between these two queries? Why would one return records and the other

Kibana: Cant import Shakespeare.json on Sense Web Plugin

久未见 提交于 2019-12-28 07:05:06
问题 I am trying to import shakespeare.json as per elastic search tutorial. [Environment] Elastic Search 2.1 Sense -Extension for Chrome [Background] When I paste curl -XPUT localhost:9200/_bulk --data-binary @shakespeare.json on the sense tab(the extensions opens a new tab with 2 windows) It's converted to PUT /_bulk and the output is { "error": { "root_cause": [ { "type": "parse_exception", "reason": "Failed to derive xcontent" } ], "type": "parse_exception", "reason": "Failed to derive xcontent

xcode 4 dot notation code sense problem

醉酒当歌 提交于 2019-12-24 03:19:23
问题 if i use dot notation in xcode 4 code completion doesn't work for me (pressing ESC): NSString *s = @"demo"; NSLog(@"%lu", [s length]); //[s <ESC> code completion works fine NSLog(@"%lu", s.length); //s.<ESC> code completion doesn't work ?? 回答1: Make sure that the property has a valid @property accessor defined. // in .h @property (assign) int length; // in .m @synthesize length; Keep in mind you can have your own accessors and setters, but I think code-sense needs @property to show up the dot

Insertion Bulk data not work - elastic search

瘦欲@ 提交于 2019-12-14 02:46:58
问题 so basically im trying new things. this time with elastic search. i already install elastic and kibana, and sense plugin of course. i try all basic command like create index, mapping, adding document etc. everything goes well until i try bulk insertion. POST /ecommerce/product/_bulk {"index":{"_id":"1002"}} {"name":"SWA magazine", "price":"90.000", "description":"swa magazine description", "status":"active", "quantity":3, "categories":[{"name":"magazine"}], "tags":["business", "magazine",

ElasticSearch Order By String Length

自闭症网瘾萝莉.ら 提交于 2019-12-12 10:33:23
问题 I am using ElasticSearch via NEST c#. I have large list of information about people { firstName: 'Frank', lastName: 'Jones', City: 'New York' } I'd like to be able to filter and sort this list of items by lastName as well as order by the length so people who only have 5 characters in their name will be at the beginning of the result set then people with 10 characters. So with some pseudo code I'd like to do something like list.wildcard("j*").sort(m => lastName.length) I'm new to ElasticSearch

Elastic search aggregation with range query

心已入冬 提交于 2019-12-12 03:29:57
问题 I am working to build a ES query that satisfies the condition >= avg . Here is an example: GET /_search { "size" : 0, "query" : { "filtered": { "filter": { "range": { "price": { "gte": { "aggs" : { "single_avg_price": { "avg" :{ "field" : "price" } } } } } } } } } } I get the following error "type": "query_parsing_exception", "reason": "[range] query does not support [aggs]", I wonder how do we use aggregated value with range query in Elastic query 回答1: You cannot embed aggregations inside a

Get last document from ElasticSearch

这一生的挚爱 提交于 2019-12-09 03:38:22
问题 so I have an elastic search index and I am sending docs to it attached with a timestamp. I am wondering if there is a way to extract the last document based on the time stamp. I.e. say to elastic give me the doc with the last time. Thanks. 回答1: Yes, you can simply request one single document ( size: 1 ) and sorted by decreasing timestamp POST index/_search { "size": 1, "sort": { "timestamp": "desc"}, "query": { "match_all": {} } } 来源: https://stackoverflow.com/questions/38062504/get-last

Can't install sense plugin for Kibana

房东的猫 提交于 2019-12-03 06:19:00
问题 I am trying to install sense plugin for elasticsearch/kibana. I have successfully installed Kibana but when following the instruction on https://www.elastic.co/guide/en/sense/current/installing.html I type : ./kibana plugin --install elastic/sense , on the bin directory inside kibana folder, and I get : ERROR unknown command plugin Usage: bin/kibana [command=serve] [options] Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Commands: