nest

Search for phrases with special characters - Attachment Content(Elastic Search)

守給你的承諾、 提交于 2019-12-13 06:09:54
问题 Is there any way in which I can search for phrases with special characters in the content of the attached file? for eg: I want to search for asn@xyz.com in the contents of all the indexed files. I actually tried it on my code and it seems to be like '@' is not considered and instead it is searching for asn, xyz and com separately and generating results. How can I solve this? TIA 来源: https://stackoverflow.com/questions/37408074/search-for-phrases-with-special-characters-attachment

Set analyzers for _all field with NEST

时光总嘲笑我的痴心妄想 提交于 2019-12-13 05:07:27
问题 As described in the _all field Elasticsearch Documentation. The _all fields allows for store, term_vector and analyzer (with specific index_analyzer and search_analyzer) to be set. Is there a way to specify the index_analyzer and search_analyzer attributes on the _all field for a mapping with NEST? Specifically, I would like to be able to set the following for my index: { "model": { "_all": { "index_analyzer": "nGram_analyzer", "search_analyzer": "whitespace_analyzer" } ... } I did not see

NEST elasticsearch.NET search query not returning results (part 2)

让人想犯罪 __ 提交于 2019-12-13 04:48:55
问题 I'm using the object initializer syntax with NEST to form a search query. When I include the second pdfQuery with the logical OR operator, I get no results. If I exclude it, I get results. QueryContainer titleQuery = new MatchQuery { Field = Property.Path<ElasticBook>(p => p.Title), Query = query, Boost = 50, Slop = 2, MinimumShouldMatch = "55%" }; QueryContainer pdfQuery = new MatchQuery { Field = Property.Path<ElasticBook>(p => p.Pdf), Query = query, CutoffFrequency = 0.001 }; var result =

Include_In_Parent option for ElasticSearch and NEST library

喜夏-厌秋 提交于 2019-12-13 03:44:31
问题 I am using ElasticSearch and the NEST .Net library for implementing the Search functionality needed in our app. In my model, I have a type that contains Nested objects as per below. [ElasticType(Name = "x")] public class X { [ElasticProperty(IncludeInAll = false, Index = FieldIndexOption.NotAnalyzed)] public string Id { get; set; } [ElasticProperty(Type = FieldType.Nested)] public List<Y> Ys { get; set; } } Any queries executed against X are actually executed against the List of Ys. I would

How do I use the NEST client to configure Elasticsearch to use AutoMap types as the default template for dynamically mapped objects?

前提是你 提交于 2019-12-13 03:43:59
问题 I'm adding objects to an index dynamically, so they're all indexed using the _default_ mapping. This is problematic because it leads to things like a Guid being mapped as text fields rather than as a keyword . The AutoMap function provided by the NEST client "automagically infers the correct" field from any given datatype, but it does so only when called explicitly. Is there any way to force the _default_ mapping to use the same template as the AutoMap function? Or do I need to add some

Nest 5.5 Error using BulkAll method

痞子三分冷 提交于 2019-12-13 03:16:10
问题 The BulkAll method is indexing all the correct records and returns health = green; but the BulkAllObservable is returning via the onError track with the following message: Unsuccessful low level call on POST: /[ Index Name ]/[ Index Type ]/_bulk?pretty=true **# Audit trail of this API call: - [1] BadResponse: Node: http://localhost:9200/ Took: 00:00:00.0028955 ServerError: ServerError: 400Type: parse_exception Reason: "request body is required" OriginalException: System.Net.WebException: The

ElasticSearch 2.0 NEST migration

最后都变了- 提交于 2019-12-13 02:25:27
问题 I have used elastic 1.7 before. After migration to 2.0 I have faced with several issues (here are those I am most focus currently): mapping attributes , json serialization . I have used next attributes I can't find in 2.0 version - ElasticProperty with property Name, Boost, OptOut . I can't find replacement for settitgs.SetJsonSerializerSettingsModifier(x => x.DateParseHandling = DateParseHandling.DateTimeOffset) in new api. The only useful document I found is breaking changes. Sadly, but

How to match a single word from a search query in Elasticsearch

落花浮王杯 提交于 2019-12-13 00:28:51
问题 Lets say I have a field called complexId and it has a value with special characters: fruit/1a.445/2.10.mango . So when I search for something like Complex ID fruit/1a.445/2.10.mango , I should be able to get the result. What I want is, I want elastic search to match at least one among these 3 words: 1. Complex 2. ID 3. fruit/1a.445/2.10.mango eg:- Below are my two documents: { "name": "Joe", "complexId": "fruit/1a.445/2.10.mango" }, { "name": "Matt", "complexId": "car/35.6a5/chevy.20" } The

How can I use NEST QueryString and escape the special characters?

别等时光非礼了梦想. 提交于 2019-12-12 16:15:54
问题 I am using NEST to communicate with Elasticsearch in my applications. In this case, the user enters in their search term F5503904902 which returns the correct result. However, if they search for the query F5503904902-90190 or F5503904902-90190_55F the results do not come back. I assumed this was because of the special characters, so I attempted to escape them - but then no results come back either. Is my query correct, am I doing something wrong? Also I am appending a wildcard to the end of

Why would one use nested classes?

霸气de小男生 提交于 2019-12-12 12:06:35
问题 Been doing objective-c for 5 years, so please bear with me. I'm struggling to find documentation that clearly explains why you would want to nest a class definition, inside of another. If I had two classes like the following, it makes sense to me that they are declared above and below each other. You may even want to have a nested property that references the other. class DataImporter { } class DataGenerator { } But I don't understand why a nested arrangement like the following would be