nest

Which Analyzer to get results of appended words when data has space or dash in between?

会有一股神秘感。 提交于 2019-12-23 02:06:17
问题 my mapping looks like as below. As you can see that Name field is analyzed { "state":"open", "settings":{ "index":{ "creation_date":"1453816191454", "number_of_shards":"5", "number_of_replicas":"1", "version":{ "created":"1070199" }, } }, "mappings":{ "Product":{ "properties":{ "index":"not_analyzed", "store":true, "type":"string" }, "Name":{ "store":true, "type":"string" }, "Number":{ "index":"not_analyzed", "store":true, "type":"string" }, "id":{ "index":"no", "store":true, "type":"integer"

Elasticsearch NEST client creating multi-field fields with completion

吃可爱长大的小学妹 提交于 2019-12-22 17:37:30
问题 I am trying to create some completion suggesters on some of my fields. My document class looks like this: [ElasticType(Name = "rawfiles", IdProperty = "guid")] public class RAW { [ElasticProperty(OmitNorms = true, Index = FieldIndexOption.NotAnalyzed, Type = FieldType.String, Store = true)] public string guid { get; set; } [ElasticProperty(OmitNorms = true, Index = FieldIndexOption.Analyzed, Type = FieldType.String, Store = true, IndexAnalyzer = "def_analyzer", SearchAnalyzer = "def_analyzer

Elasticsearch NEST client creating multi-field fields with completion

血红的双手。 提交于 2019-12-22 17:37:02
问题 I am trying to create some completion suggesters on some of my fields. My document class looks like this: [ElasticType(Name = "rawfiles", IdProperty = "guid")] public class RAW { [ElasticProperty(OmitNorms = true, Index = FieldIndexOption.NotAnalyzed, Type = FieldType.String, Store = true)] public string guid { get; set; } [ElasticProperty(OmitNorms = true, Index = FieldIndexOption.Analyzed, Type = FieldType.String, Store = true, IndexAnalyzer = "def_analyzer", SearchAnalyzer = "def_analyzer

Elasticsearch, how to make NEST map response to class

社会主义新天地 提交于 2019-12-22 15:04:51
问题 First of all, I am using NEST 5.5.0. I have the following use of a remote elasticsearch-index: var node = new Uri("http://distribution.virk.dk/cvr-permanent"); var settings = new ConnectionSettings(node).DefaultIndex("virksomhed"); settings.BasicAuthentication("username", "password"); var client = new ElasticClient(settings); var searchResponse = client.Search<Company>(s => s .AllTypes().Query(q => q .Match(m => m .Field(f => f.cvrNumber) .Query("35954716") ) ) ); The mappings in the index

ElasticSearch and Nest filtering does not work

旧时模样 提交于 2019-12-22 10:30:30
问题 I run a query that returns 10 results. There is a property in my document called Type. The value of this property for some records is an empty string and for some other records is either "AudioAlbum" or "AudioRington". I want to do two things: 1- Exclude the documents that their Type property does not have a value from the search result. 2- Get AudioAlbums only (as a different search). My search code for getting AudioAlbums is this: var docs = client.Search<content>( b => b.Type("content")

Connection Pooling with NEST ElasticSearch Library

偶尔善良 提交于 2019-12-22 08:51:15
问题 I'm currently using the NEST ElasticSearch C# Library for interacting with ElasticSearch. My project is an MVC 4 WebAPI project that basically builds a RESTful webservice for accessing directory assistance information. We've only just started working with NEST, and have been stumbling over the lack of documentation. What's there is useful, but it's got some very large holes. Currently, everything we need works, however, we're running into an issue with connections sometimes taking up to a

Connection Pooling with NEST ElasticSearch Library

﹥>﹥吖頭↗ 提交于 2019-12-22 08:50:07
问题 I'm currently using the NEST ElasticSearch C# Library for interacting with ElasticSearch. My project is an MVC 4 WebAPI project that basically builds a RESTful webservice for accessing directory assistance information. We've only just started working with NEST, and have been stumbling over the lack of documentation. What's there is useful, but it's got some very large holes. Currently, everything we need works, however, we're running into an issue with connections sometimes taking up to a

ElasticSearch and Nest: Why amd I missing the id field on a query?

只谈情不闲聊 提交于 2019-12-22 08:10:54
问题 I created a simple object that represents a Meeting that has elements such as time, location, name, topic, etc and indexed it in ElasticSearch via Nest. It has an Id field that I leave blank so that ES can generate them. Later on I retrieved all the documents that are missing GEO coordinates so that I may update them. All my returned elements still have null for the id field and when I update them back to ES it creates new documents for them. What am I missing here that makes all my id's null

Nest SuggestCompletion usage, throws 'is not a completion suggest field' exception

邮差的信 提交于 2019-12-21 21:27:47
问题 I'm a complete beginner to elasticsearch and I have been trying to use elasticsearch's completion suggester using Nest for auto-complete on a property. Here is my mapping (as mentioned here: ): var createResult = client.CreateIndex(indexName, index => index .AddMapping<Contact>(tmd => tmd .Properties(props => props .Completion(s => s.Name(p => p.CompanyName.Suffix("completion")) .IndexAnalyzer("standard") .SearchAnalyzer("standard") .MaxInputLength(20) .Payloads() .PreservePositionIncrements(

ElasticSearch NEST Search

江枫思渺然 提交于 2019-12-21 16:49:06
问题 I'm encountering an unexpected error when I try to perform a search on an ElasticSearch instance. I'm following the documentation here (http://nest.azurewebsites.net/nest/quick-start.html) verbatim, but I"m getting the error "Error 1 Cannot convert lambda expression to type 'Nest.SearchDescriptor' because it is not a delegate type." The first s of "s => s" is being highlighted. Maybe it's just a C# syntax issue. Any ideas? var searchResults = client.Search<Person>(s=>s .From(0) .Size(10)