{"action":"created","issue":{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/4249","labels_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/4249/labels{/name}","comments_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/4249/comments","events_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/4249/events","html_url":"https://github.com/CocoaPods/CocoaPods/pull/4249","id":107981160,"number":4249,"title":"Changes search index format to fasten `pod search --full` command.","user":{"login":"manuyavuz","id":1665371,"avatar_url":"https://avatars.githubusercontent.com/u/1665371?v=3","gravatar_id":"","url":"https://api.github.com/users/manuyavuz","html_url":"https://github.com/manuyavuz","followers_url":"https://api.github.com/users/manuyavuz/followers","following_url":"https://api.github.com/users/manuyavuz/following{/other_user}","gists_url":"https://api.github.com/users/manuyavuz/gists{/gist_id}","starred_url":"https://api.github.com/users/manuyavuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manuyavuz/subscriptions","organizations_url":"https://api.github.com/users/manuyavuz/orgs","repos_url":"https://api.github.com/users/manuyavuz/repos","events_url":"https://api.github.com/users/manuyavuz/events{/privacy}","received_events_url":"https://api.github.com/users/manuyavuz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2015-09-23T18:40:51Z","updated_at":"2015-10-27T13:10:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/pulls/4249","html_url":"https://github.com/CocoaPods/CocoaPods/pull/4249","diff_url":"https://github.com/CocoaPods/CocoaPods/pull/4249.diff","patch_url":"https://github.com/CocoaPods/CocoaPods/pull/4249.patch"},"body":"Detailed discussion can be found here: CocoaPods/cocoapods-search#8 \r\n- Previous implementation was having the drawback of traversing and performing `gsub` on all index strings for each pod specification.\r\n- New implementation stores words as keys and list of pods containing corresponding word inside their specification as the values for corresponding hash keys. Therefore, while searching for a query, we only need to check if query is matched with any key in index hash, if so, we will add corresponding list of spec names to a Set object. Resulted Set object gives us the search result. Using this policy, sources manager can perform a faster search operation."},"comment":{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/comments/151489654","html_url":"https://github.com/CocoaPods/CocoaPods/pull/4249#issuecomment-151489654","issue_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/4249","id":151489654,"user":{"login":"manuyavuz","id":1665371,"avatar_url":"https://avatars.githubusercontent.com/u/1665371?v=3","gravatar_id":"","url":"https://api.github.com/users/manuyavuz","html_url":"https://github.com/manuyavuz","followers_url":"https://api.github.com/users/manuyavuz/followers","following_url":"https://api.github.com/users/manuyavuz/following{/other_user}","gists_url":"https://api.github.com/users/manuyavuz/gists{/gist_id}","starred_url":"https://api.github.com/users/manuyavuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manuyavuz/subscriptions","organizations_url":"https://api.github.com/users/manuyavuz/orgs","repos_url":"https://api.github.com/users/manuyavuz/repos","events_url":"https://api.github.com/users/manuyavuz/events{/privacy}","received_events_url":"https://api.github.com/users/manuyavuz/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T13:10:04Z","updated_at":"2015-10-27T13:10:04Z","body":"Guys, I have a problem. \r\n\r\nAs you can see, travis fails on ` updates a repository` spec of `update_spec.rb` file.\r\n\r\nBecause the new update method starts a daemon process in background, it keeps search_index.json file open. Specs try to clear `tmp` folder in `preflight.rb` file before any specs, but because the file is in use by daemon process, remove fails with `Errno::ENOTEMPTY` error.\r\n\r\nI've solved this in unit test via stubbing `update_search_index_if_needed_in_background` method which starts the daemon process. However, I'm not sure if this is the correct way to handle it in a functional spec. \r\n\r\nWhat should I do to resolve this?"}}