Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
parmeshwor11 opened this issue Jan 31, 2014 · 19 comments

Comments

@parmeshwor11
Copy link

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

@polyfractal
Copy link
Owner

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?

@jeacott
Copy link

jeacott commented Mar 16, 2014

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 :(

@scoolen
Copy link

scoolen commented Apr 29, 2014

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"
}

@polyfractal
Copy link
Owner

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

@scoolen
Copy link

scoolen commented Apr 29, 2014

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.

@polyfractal
Copy link
Owner

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?

@scoolen
Copy link

scoolen commented Apr 29, 2014

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 

@polyfractal
Copy link
Owner

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.

@scoolen
Copy link

scoolen commented Apr 29, 2014

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

@cread
Copy link

cread commented May 13, 2014

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

@stewartmckee
Copy link

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

@mwalsher
Copy link

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

@polyfractal
Copy link
Owner

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!

@dqduc
Copy link

dqduc commented Aug 28, 2014

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

@polyfractal
Copy link
Owner

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
Copy link
Owner

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!

@dqduc
Copy link

dqduc commented Sep 9, 2014

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

@erunion
Copy link

erunion commented Oct 28, 2014

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

@polyfractal
Copy link
Owner

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants