{"action":"created","issue":{"url":"https://api.github.com/repos/trackpete/exiletools-indexer/issues/46","labels_url":"https://api.github.com/repos/trackpete/exiletools-indexer/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/trackpete/exiletools-indexer/issues/46/comments","events_url":"https://api.github.com/repos/trackpete/exiletools-indexer/issues/46/events","html_url":"https://github.com/trackpete/exiletools-indexer/issues/46","id":121105323,"number":46,"title":"Something weird is happening with properties in general","user":{"login":"trackpete","id":8779751,"avatar_url":"https://avatars.githubusercontent.com/u/8779751?v=3","gravatar_id":"","url":"https://api.github.com/users/trackpete","html_url":"https://github.com/trackpete","followers_url":"https://api.github.com/users/trackpete/followers","following_url":"https://api.github.com/users/trackpete/following{/other_user}","gists_url":"https://api.github.com/users/trackpete/gists{/gist_id}","starred_url":"https://api.github.com/users/trackpete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trackpete/subscriptions","organizations_url":"https://api.github.com/users/trackpete/orgs","repos_url":"https://api.github.com/users/trackpete/repos","events_url":"https://api.github.com/users/trackpete/events{/privacy}","received_events_url":"https://api.github.com/users/trackpete/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/trackpete/exiletools-indexer/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/trackpete/exiletools-indexer/labels/format-and-load-db-to-es","name":"format-and-load-db-to-es","color":"bfe5bf"}],"state":"open","locked":false,"assignee":{"login":"trackpete","id":8779751,"avatar_url":"https://avatars.githubusercontent.com/u/8779751?v=3","gravatar_id":"","url":"https://api.github.com/users/trackpete","html_url":"https://github.com/trackpete","followers_url":"https://api.github.com/users/trackpete/followers","following_url":"https://api.github.com/users/trackpete/following{/other_user}","gists_url":"https://api.github.com/users/trackpete/gists{/gist_id}","starred_url":"https://api.github.com/users/trackpete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trackpete/subscriptions","organizations_url":"https://api.github.com/users/trackpete/orgs","repos_url":"https://api.github.com/users/trackpete/repos","events_url":"https://api.github.com/users/trackpete/events{/privacy}","received_events_url":"https://api.github.com/users/trackpete/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/trackpete/exiletools-indexer/milestones/2","html_url":"https://github.com/trackpete/exiletools-indexer/milestones/Talisman%20Release","labels_url":"https://api.github.com/repos/trackpete/exiletools-indexer/milestones/2/labels","id":1452000,"number":2,"title":"Talisman Release","description":"Latest round of bug fixes and preparation should be done prior to the Talisman release on December 12. ","creator":{"login":"trackpete","id":8779751,"avatar_url":"https://avatars.githubusercontent.com/u/8779751?v=3","gravatar_id":"","url":"https://api.github.com/users/trackpete","html_url":"https://github.com/trackpete","followers_url":"https://api.github.com/users/trackpete/followers","following_url":"https://api.github.com/users/trackpete/following{/other_user}","gists_url":"https://api.github.com/users/trackpete/gists{/gist_id}","starred_url":"https://api.github.com/users/trackpete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trackpete/subscriptions","organizations_url":"https://api.github.com/users/trackpete/orgs","repos_url":"https://api.github.com/users/trackpete/repos","events_url":"https://api.github.com/users/trackpete/events{/privacy}","received_events_url":"https://api.github.com/users/trackpete/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":2,"state":"open","created_at":"2015-12-09T14:40:03Z","updated_at":"2015-12-09T15:03:45Z","due_on":"2015-12-12T05:00:00Z","closed_at":null},"comments":3,"created_at":"2015-12-08T21:41:14Z","updated_at":"2015-12-09T15:22:12Z","closed_at":null,"body":"For example:\r\n\r\n* `properties.Dagger` should exist as a boolean, but instead it is going into `properties.Weapon.Dagger`\r\n* why does `properties.Weapon.Armour` /etc. exist? Same with Jewelry and some other stuff. WTF?\r\n* `properties.Jewel.The Goddess` WTF?\r\n* and more\r\n\r\nNote, this is probably related to https://github.com/trackpete/exiletools-indexer/issues/44"},"comment":{"url":"https://api.github.com/repos/trackpete/exiletools-indexer/issues/comments/163288694","html_url":"https://github.com/trackpete/exiletools-indexer/issues/46#issuecomment-163288694","issue_url":"https://api.github.com/repos/trackpete/exiletools-indexer/issues/46","id":163288694,"user":{"login":"trackpete","id":8779751,"avatar_url":"https://avatars.githubusercontent.com/u/8779751?v=3","gravatar_id":"","url":"https://api.github.com/users/trackpete","html_url":"https://github.com/trackpete","followers_url":"https://api.github.com/users/trackpete/followers","following_url":"https://api.github.com/users/trackpete/following{/other_user}","gists_url":"https://api.github.com/users/trackpete/gists{/gist_id}","starred_url":"https://api.github.com/users/trackpete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trackpete/subscriptions","organizations_url":"https://api.github.com/users/trackpete/orgs","repos_url":"https://api.github.com/users/trackpete/repos","events_url":"https://api.github.com/users/trackpete/events{/privacy}","received_events_url":"https://api.github.com/users/trackpete/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T15:22:12Z","updated_at":"2015-12-09T15:22:12Z","body":"I agree `properties` is confusing with ES, but it shouldn't actually impact anything.\r\n\r\nLooking at the properties data in the JSON array, I must've made the decision to place all properties under a Weapon as \"properties.Weapon.x\" - so the first question is was that the right choice, and then why isn't that always working?\r\n\r\nNotes on troubleshooting the `properties.Weapon.Armour` issue:\r\n\r\n```\r\n{\r\n  \"query\": {\r\n    \"filtered\": {\r\n      \"filter\": {\r\n        \"range\": {\r\n          \"properties.Weapon.Armour\": {\r\n            \"gte\": 1          \r\n          }\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n95 hits that have this set. Here are some md5sum's:\r\n\r\n```\r\n1315d4210cb1aceb35639cf4445252f4  (Saintly Chainmail detected as a Dagger)\r\ne3fa2d2f5e5d47e4f04e779aa3cacad5 (Saintly Chainmail detected as a Dagger)\r\n... oh crap these are all Saintly Chainmails\r\n```\r\n\r\nAnd yet:\r\n\r\n`$gearBaseType{\"Saintly Chainmail\"} = \"Body\";`\r\n\r\nAdded some debug code to `sub.formatJSON.pl` and this came out:\r\n\r\n`Wed Dec  9 10:18:46 2015 Matched Instilled Saintly Chainmail of the Seal to Sai`\r\n\r\nShit. This is a problem with our lookup table. When I created it, there were no false matches like this and I've never looked back at it.\r\n\r\nBasically, we never get the item base type. The closest we can get is typeLine, which often contains a full name. Then we have an array of possible item base type names, and we iterate through that looking to see if the name matches.\r\n\r\nUnfortunately this means \"Sai\" is matching \"Saintly Chainmail.\"\r\n\r\nChanging the comparison to whole word matching should fix this.\r\n\r\n\r\n\r\n\r\n\r\n\r\n"}}