elasticsearch-inquisitor icon indicating copy to clipboard operation
elasticsearch-inquisitor copied to clipboard

reoponing issue #19 : Type drop-down not populating using ElasticSearch 0.90.2

Open parmeshwor11 opened this issue 10 years ago • 19 comments

Type drop-down is not populating list of elasticsearch types in an index. In my case for some small index it shows the available Types but for larger index containing many Types the dropdown list is blank. As in image. inquisitor_bug_typedropdownlist

parmeshwor11 avatar Jan 31 '14 08:01 parmeshwor11

Could you gist up the output of curl -XGET localhost:9200/_mapping ?

Also, what version of Elasticsearch are you running? If you have firebug (or similar developer console installed), do you see any javascript errors?

polyfractal avatar Jan 31 '14 13:01 polyfractal

for me -ES 1.0.1 once I select an index the Type dropdown populates, but it ALWAYS says "mappings" it never has the actual types that should be available so I never get any results, even for matchall :(

jeacott avatar Mar 16 '14 09:03 jeacott

Same thing happens in 0.90.3:


  "ok" : true,
  "status" : 200,
  "name" : "precise64",
  "version" : {
    "number" : "0.90.3",
    "build_hash" : "5c38d6076448b899d758f29443329571e2522410",
    "build_timestamp" : "2013-08-06T13:18:31Z",
    "build_snapshot" : false,
    "lucene_version" : "4.4"
  },
  "tagline" : "You Know, for Search"
}

scoolen avatar Apr 29 '14 14:04 scoolen

@scoolen Could you gist/paste a copy of curl -XGET localhost:9200/_mapping somewhere so I can take a look?

polyfractal avatar Apr 29 '14 14:04 polyfractal

No, sorry. It is a private platform so I cannot disclose mapping data. What information are you looking for? Maybe I can paste parts of it.

scoolen avatar Apr 29 '14 14:04 scoolen

Ah, ok. I wasn't looking for anything in particular, just wanted to see if there were oddities in the syntax/field names that might be causing problems. Or missing types which might mess up the JS code.

Do you have firebug installed (or using chrome)? Any errors on the console?

polyfractal avatar Apr 29 '14 14:04 polyfractal

Initially 5 request are fired:

GET http://...:9200/_plugin/inquisitor/views/queries.html 200 OK
GET http://...:9200/_mapping 200 OK
GET http://...:9200/_mapping 200 OK
GET http://...:9200/_aliases 200 OK
GET http://...:9200/_aliases 200 OK

The mapping JSON looks fine. Top-level keys are the index names. The alias call also returns the correct aliases for every index (the aliases are keys of an empty object).

However, when I hit refresh I get an error:

Error: $scope.indicies is undefined
DropdownCtrl/$scope.loadMappings/<@http://...:9200/_plugin/inquisitor/js/controllers/DropdownCtrl.js:17
Pc/e/i.promise.then/h@http://...:9200/_plugin/inquisitor/js/vendor/angular.min.js:77
Pc/g/<.then/<@http://...:9200/_plugin/inquisitor/js/vendor/angular.min.js:77
Sc/this.$get</e.prototype.$eval@http://...:9200/_plugin/inquisitor/js/vendor/angular.min.js:87
Sc/this.$get</e.prototype.$digest@http://...:9200/_plugin/inquisitor/js/vendor/angular.min.js:85
Sc/this.$get</e.prototype.$apply@http://...:9200/_plugin/inquisitor/js/vendor/angular.min.js:87
e@http://...:9200/_plugin/inquisitor/js/vendor/angular.min.js:94
o@http://...:9200/_plugin/inquisitor/js/vendor/angular.min.js:97
Xc/</s.onreadystatechange@http://...:9200/_plugin/inquisitor/js/vendor/angular.min.js:98 

scoolen avatar Apr 29 '14 14:04 scoolen

Hmm, that's bizarre that it works at first then stops...

When I get a chance, I'll install 0.90.3 and see if I can recreate the issue with some combination of indices and templates. Thanks for the error message, that should help isolating the problem.

polyfractal avatar Apr 29 '14 15:04 polyfractal

Sorry, I meant Reload (the button), not refresh

scoolen avatar Apr 29 '14 15:04 scoolen

We're seeing the same problem on 0.90.11

When selecting an Index and hitting the "Reload" button we get the following error in the Javascript Console:

TypeError: Cannot set property 'length' of undefined
    at http://localhost:9200/_plugin/inquisitor/js/controllers/DropdownCtrl.js:17:38
    at h (http://localhost:9200/_plugin/inquisitor/js/vendor/angular.min.js:77:41)
    at http://localhost:9200/_plugin/inquisitor/js/vendor/angular.min.js:77:274
    at Object.e.$eval (http://localhost:9200/_plugin/inquisitor/js/vendor/angular.min.js:87:355)
    at Object.e.$digest (http://localhost:9200/_plugin/inquisitor/js/vendor/angular.min.js:85:704)
    at Object.e.$apply (http://localhost:9200/_plugin/inquisitor/js/vendor/angular.min.js:87:514)
    at e (http://localhost:9200/_plugin/inquisitor/js/vendor/angular.min.js:94:46)
    at o (http://localhost:9200/_plugin/inquisitor/js/vendor/angular.min.js:97:131)
    at XMLHttpRequest.s.onreadystatechange (http://localhost:9200/_plugin/inquisitor/js/vendor/angular.min.js:98:267) angular.min.js:61

cread avatar May 13 '14 16:05 cread

I get the same as above 'Cannot set property 'length' of undefined' on 0.90.5.

Type dropdown doesn't populate.

screen shot 2014-06-04 at 10 06 30

stewartmckee avatar Jun 04 '14 09:06 stewartmckee

Any update on this issue? I'm experiencing the same problem with 0.90.5

mwalsher avatar Jul 11 '14 19:07 mwalsher

Hi Everyone...I'm afraid I don't have time to look into this right now. Swamped with work.

If someone were willing to break out a debugger and look into this, I'd happily merge a PR!

polyfractal avatar Jul 16 '14 13:07 polyfractal

I created pull #34 & #35 to fix Error: $scope.indicies is undefined, Cannot set property 'length'. There's a mistyping 'indicies' (should be 'indices' ) and some changes in response structure, causing javascript errors. It now worked with my ES 0.90.11 instance

dqduc avatar Aug 28 '14 04:08 dqduc

Thanks for the PRs! I'll try these out this weekend. Do you know offhand if they work for 1.0+ ?

If not, I'll need to split branches so that we can have both pre- and post-1.0 support.

(although everyone should really upgrade to 1.0+...0.90.x is ancient at this point)

polyfractal avatar Aug 28 '14 22:08 polyfractal

Thanks for the PRs @dqduc! I've merged both #34 and #35 into the new 0.90.x branch: https://github.com/polyfractal/elasticsearch-inquisitor/commits/0.90.x

All breaking-change related code will have to go into 0.90.x to prevent it from breaking 1.0+. I don't plan on supporting/maintaining 0.90.x, but I'll happily merge PRs from the community.

Master will remain 1.0+

Thanks again! Really appreciate the help with older versions!

polyfractal avatar Sep 09 '14 01:09 polyfractal

Yes split branches is good choice. Some systems like what I maintaining is still using 0.90.x as it need time to upgrade (both the service & application). So 0.90.x branch is still useful. Thanks

dqduc avatar Sep 09 '14 02:09 dqduc

How do we install the 0.90.x branch?

$ bin/plugin -install polyfractal/elasticsearch-inquisitor/0.90.x
-> Installing polyfractal/elasticsearch-inquisitor/0.90.x...
Trying http://download.elasticsearch.org/polyfractal/elasticsearch-inquisitor/elasticsearch-inquisitor-0.90.x.zip...
Trying http://search.maven.org/remotecontent?filepath=polyfractal/elasticsearch-inquisitor/0.90.x/elasticsearch-inquisitor-0.90.x.zip...
Trying https://oss.sonatype.org/service/local/repositories/releases/content/polyfractal/elasticsearch-inquisitor/0.90.x/elasticsearch-inquisitor-0.90.x.zip...
Trying https://github.com/polyfractal/elasticsearch-inquisitor/zipball/v0.90.x... (assuming site plugin)
Failed to install polyfractal/elasticsearch-inquisitor/0.90.x, reason: failed to download out of all possible locations..., use -verbose to get detailed information

erunion avatar Oct 28 '14 23:10 erunion

Oh, hm. I wonder if the ability to install individual versions came after 0.90.x? On my 1.3.4 install:

$ ./plugin -install polyfractal/elasticsearch-inquisitor/0.90.x
-> Installing polyfractal/elasticsearch-inquisitor/0.90.x...
Trying http://download.elasticsearch.org/polyfractal/elasticsearch-inquisitor/elasticsearch-inquisitor-0.90.x.zip...
Trying http://search.maven.org/remotecontent?filepath=polyfractal/elasticsearch-inquisitor/0.90.x/elasticsearch-inquisitor-0.90.x.zip...
Trying https://oss.sonatype.org/service/local/repositories/releases/content/polyfractal/elasticsearch-inquisitor/0.90.x/elasticsearch-inquisitor-0.90.x.zip...
Trying https://github.com/polyfractal/elasticsearch-inquisitor/archive/0.90.x.zip...
Downloading ............................................................................................................................................................................................DONE
Installed polyfractal/elasticsearch-inquisitor/0.90.x into /Users/tongz/Downloads/elasticsearch-1.3.4/plugins/inquisitor

If the plugin script won't work for you, you can always do it manually:

$ cd plugins/

$ git clone https://github.com/polyfractal/elasticsearch-inquisitor.git inquisitor
Cloning into 'inquisitor'...
remote: Counting objects: 422, done.
remote: Total 422 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (422/422), 416.90 KiB | 91.00 KiB/s, done.
Resolving deltas: 100% (210/210), done.
Checking connectivity... done

$ cd inquisitor/

$ ls
LICENSE         README.textile      analyzers.png       errors.png      indices.png     result.png
NOTICE          _site           custom.png      highlighting.png    json.png        tokenizers.png

$ git checkout 0.90.x
Branch 0.90.x set up to track remote branch 0.90.x from origin.
Switched to a new branch '0.90.x'

polyfractal avatar Oct 29 '14 15:10 polyfractal