ElasticLinq doesn't seem to use the correct URL -


i'm having problem simple elasticlinq search return result. problem seems it's sending url elasticsearch isn't correct search url. here i've tried:

var connection = new elasticconnection(new uri("http://localhost:9200"), index: "mytypes"); var context = new elasticcontext(connection); var results = (from in context.query<mytype>() select a).take(10).toarray(); 

when execute last line, here url see in fiddler:

http://localhost:9200/mytypes/mytypes/_search 

the problem appears mytypes used twice in url rather 1 time.

i've tried not supplying default index elasticconnection constructor, in case search url following:

http://localhost:9200/_all/mytypes/_search 

in both cases no results back. if submit query using

http://localhost:9200/mytypes/_search 

i results back.

any ideas how elasticlinq use correct search url?

the second mytypes in url strong t type query()

there default convention clr type equivalent elasticsearch document type. if don't wish can instead override elasticmapping's getdocumenttype return empty or null string.

you'll want consider how types map. there few other options such qualifying field names , inserting field exists check on each one. (this here)

public johnselasticmapping : elasticmapping { public string getdocumenttype(type type) { return null; } } ... var context = new elasticcontext(connection, new johnselasticmapping());


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -