I am trying to collect a search page and by using the PlainElastic QueryBuilder functionality, creating JSON in C # I am here. I have a custom class that I have created that represents indexed data. This data includes burial collections under the collection which is giving me problems in retrieving any data.
This is my custom class slow only for relevant properties. SearchResult is the main parent class. Name and role are child classes.
Public category SearchResult {public name name {get; Set; }} Public class name {public string firstname {get; Set; } Public String LastName {get; Set; } Role of Public Role {Receiving; Set; }} Role of the public class {public string id {get; Set; } The name of the public string {get; Set; }}
What I'm trying to do is create QueryBuilder object to find data based on parameters of FirstName, LastName, and RoleName. My initial attempt at Syntax is giving me zero results:
query = new querybuilder & lt; SearchResult & gt; () .ql (q = & gt; q. Bool (b = & gt; b. (= M · M); queryString (qs = & gt; qs. Fields) = & gt; search direction. [0] .FirstName.) ("John").) (M = & gt; m .QueryString (Qs = & gt; qs. Fields (Search = Keyword => SearchRsult. Name [0] .Lananam) Query ("Smith"). Bus (M = & gt; m .QueryString (qs = & gt; qS.Filters => SearchResult.Names [0] .Role.Name). ("Manager" ))))). Autified ();
Then I execute the following to get my results:
string result = connection. Post (order search ("record", "record"), query); SearchResult & LT; SearchResult & gt; ObjResult = serializer.ToSearchResult & lt; SearchResult & gt; (result);
If I must remove the contents of the query for the roll name, then I get a lot of SearchResult records with John Smith, even those names where John Smith's name The collection contains the second or third item. However, as soon as I put it in the section of role name, I did not get any results. Am I going to go wrong about these collections?
I am quite new to using Plain Allevics in C # so that any advice or input is appreciated.
Thanks
Comments
Post a Comment