nest

Elasticsearch Nest Boost query

自闭症网瘾萝莉.ら 提交于 2020-01-05 22:13:23
问题 Im trying to do a boosting query that reduces the score of documents where the field with name "type" and with the value "Press". However NEST does not generate any values in the positive field in the generated json object: "query": { "boosting": { "positive": {}, "negative": { "term": { "type": { "value": "Press" } } }, "negative_boost": 0.2 } } Code Below: var result = _elasticClient.Search<SearchablePage>(new SearchDescriptor<SearchablePage>() .Query(q => q .Boosting(b => b .NegativeBoost

elasticsearch date_range query witn nest api

主宰稳场 提交于 2020-01-05 04:03:22
问题 I run a query in marvel plugin and it works fine(return 4 document) as you see below And I want to make this query in C# with NEST, I expected same result with the plugin for this expression but it returns 0.. function call: EsCodes myes = new EsCodes(); myes.CreateConnection("localhost", "dota2"); var result = myes.getDatasBetweenDates("01/01/2010 00:00:00", "01/01/2015 00:00:00"); connection: private static ElasticClient es = new ElasticClient(); public void CreateConnection(string hostname

term frequency of documents with Nest Elasticsearch

孤街浪徒 提交于 2020-01-04 15:57:30
问题 I am new in elasticsearch and want to get the top N term frequency of the "content" field of a specific document using Nest elasticsearch. I've searched a lot to find a proper answer that works for me, but I just got that I should use Terms vector and not Term Facet since it counts the terms in the whole set of documents. I know that I should do some settings for Term Vector like below; [ElasticProperty(Type = Nest.FieldType.attachment, TermVector =Nest.TermVectorOption.with_positions_offsets

Kibana doesn't show any results in “Discover” tab

戏子无情 提交于 2020-01-04 05:24:07
问题 I have setup elasticsearch(version 1.7.3) and Kibana(version 4.1.2) for indexing our application's Elmah XML files errors. I am using .Net to parse the xml files and Nest ElasticSearch client to insert the indexes into ElasticSearch. The issue is that Kibana doesn't display any data in the "Discover" tab. When I run curl -XGET localhost:9200/.kibana/index-pattern/eol? command, I get the following response: {"_index":".kibana","_type":"index-pattern","_id":"eol","_version":2,"found":tru e,"

elasticsearch NEST client, filed with attribute “not_analyzed” still be analyzed when search keywords contains hyphen

眉间皱痕 提交于 2020-01-02 07:28:07
问题 I have a class named "IndexModel": public class IndexModel { [ElasticProperty(Index= FieldIndexOption.NotAnalyzed, Store = true)] public string ModelNumber{ get; set; } } following is how i setup the elastic client: var uri = new Uri("http://localhost:9200"); var config = new ConnectionSettings(uri); var client = new ElasticClient(config); client.Map<IndexModel>(m => m.MapFromAttributes()); I can see the mapped result from response: Request { "indexmodel": { "properties": { "modelNumber": {

Creating a custom analyzer in ElasticSearch Nest client

帅比萌擦擦* 提交于 2020-01-02 06:48:47
问题 Im very very new to elasticsearch using the nest client, I am creating an index with a custom analyzer, however when testing using analyze it does not seem to use the custom analyzer. Mainly no edgengram tokens appear. Is there anything I am missing that would make my custom analyser the default for the index? When I check my mappings using elastichq they show my custom analyzer. ConnectionSettings settings = new ConnectionSettings(new Uri("http://localhost:9200"), defaultIndex: "forum-app");

NEST Elasticsearch Reindex examples

自作多情 提交于 2020-01-02 03:28:10
问题 my objective is to reindex an index with 10 million shards for the purposes of changing field mappings to facilitate significant terms analysis. My problem is that I am having trouble using the NEST library to perform a re-index, and the documentation is (very) limited. If possible I need an example of the following in use: http://nest.azurewebsites.net/nest/search/scroll.html http://nest.azurewebsites.net/nest/core/bulk.html 回答1: NEST provides a nice Reindex method you can use, although the

Elasticsearch and .NET

蓝咒 提交于 2020-01-01 05:34:06
问题 We're considering to switch from Solr/Solr.net to Elasticsearch. We started with NEST. We have only 4 documents in search index. private static void Main(string[] args) { var node = new Uri("http://localhost:9200"); var settings = new ConnectionSettings( node, "my-application"); var client = new ElasticClient(settings); var stopwatch = Stopwatch.StartNew(); var sr = client.Get<Movie>(1); Console.WriteLine(stopwatch.ElapsedMilliseconds); } The code above takes approx. 250ms, while the same

Querying array of strings by array of strings in elasticsearch.net

痴心易碎 提交于 2019-12-31 05:14:29
问题 I'm using elasticsearch.net library in C# and I'm trying to query for objects matching specified filter. I would like the query to return objects where at least one of input names from filter exists in object's Names collection. The problem is that I always get 0 hits as result with this query, even tho I am certain that data matching specified filter does exist in the database and I would love to find out what's wrong with my query... The model: public class A { public int AId { get; set; }

indexing and full text searching in elasticsearch without dialitics using c# client Nest

家住魔仙堡 提交于 2019-12-30 12:02:12
问题 I'm preparing an in-site search engine with elasticsearch and I'm new to elasticsearch. Sites which will use this engine are Turkish / English . In Turkey, we have Turkish letters like 'ğ', 'ü', 'ş', 'ı', 'ö', 'ç' . But when we search generally we use the letters 'g', 'u', 's', 'i', 'o', 'c' . This is not a rule but we generally do it, think like a habit, something we used to. Now, I have a document type called "product" and this type has several string properties and some are nested. For