CocoaPods / search.cocoapods.org

This is the CocoaPods search engine repo, please direct CocoaPods issues to the main CocoaPods repository.
25 stars 11 forks source link

Results for name with subspec are empty #65

Closed segiddins closed 9 years ago

segiddins commented 9 years ago

See http://cocoapods.org/?q=RestKit%2FCoreData

@floere I'd love to start by at least splitting on the /, but maybe the subspec names should also be taken into account when searching?

floere commented 9 years ago

Go ahead. And Kyle has included the subspec names with a recent PR.

floere commented 9 years ago

Hmm, maybe I misunderstood. You mean that the expression A/B should have special significance?

segiddins commented 9 years ago

Yes, as A/B means

spec: 'A',
subspec: 'B',
floere commented 9 years ago

I'm not sure whether the subspecs should have special significance - I don't know the domain well enough. Ping others?

floere commented 9 years ago

@segiddins But I'd be definitely happy if you split on '/', for a start :)

segiddins commented 9 years ago

Where should I look to be making that sort of change?

-Samuel E. Giddins

On Nov 5, 2014, at 11:34 PM, Florian R. Hanke notifications@github.com wrote:

@segiddins But I'd be definitely happy if you split on '/', for a start :)

— Reply to this email directly or view it on GitHub.

floere commented 9 years ago

In two places (and maybe remove the duplication): https://github.com/CocoaPods/search.cocoapods.org/blob/trunk-database-rewrite/lib/search.rb#L120 https://github.com/CocoaPods/search.cocoapods.org/blob/trunk-database-rewrite/lib/search.rb#L149

To run the tests you need to load spec/trunk.dump into a trunk_cocoapods_org_test database (psql trunk_cocoapods_org_test < spec/trunk.dump), then run bundle exec rake.

segiddins commented 9 years ago

@floere after thinking it through, I believe the correct approach would be to make the recursive subspecs searchable

floere commented 9 years ago

As a separate category? So if you search for CoreData, then RestKit should be found via CoreData under category subspecs?

segiddins commented 9 years ago

Yes, but shouldn't it also match the name, but with a lower weight than matching the root spec's name?

floere commented 9 years ago

Not sure I understand fully.

Can we make an example?

(
        "name"=>"AFNetworking",
        "version"=>"2.3.1",
        "license"=>"MIT",
        "summary"=>"A delightful iOS and OS X networking framework.",
        "homepage"=>"https://github.com/AFNetworking/AFNetworking",
        "social_media_url"=>"https://twitter.com/AFNetworking",
        "authors"=>{"Mattt Thompson"=>"m@mattt.me"},
        "source"=>{
          "git"=>"https://github.com/AFNetworking/AFNetworking.git",
          "tag"=>"2.3.1",
          "submodules"=>true},
          "requires_arc"=>true,
          "platforms"=>{
            "ios"=>"6.0",
            "osx"=>"10.8"
          },
          "public_header_files"=>"AFNetworking/*.h",
          "source_files"=>"AFNetworking/AFNetworking.h",
          "subspecs"=>[
            {
              "name"=>"Serialization",
              "source_files"=>"AFNetworking/AFURL{Request,Response}Serialization.{h,m}",
              "ios"=>{
                "frameworks"=>[
                  "MobileCoreServices",
                  "CoreGraphics"
                ]
              },
              "osx"=>{
                "frameworks"=>"CoreServices"
              }
            },
            {
              "name"=>"Security",
              "source_files"=>"AFNetworking/AFSecurityPolicy.{h,m}",
              "frameworks"=>"Security"}, {"name"=>"Reachability",
              "source_files"=>"AFNetworking/AFNetworkReachabilityManager.{h,m}",
              "frameworks"=>"SystemConfiguration"
            },
            {
              "name"=>"NSURLConnection",
              "dependencies"=>{
                "AFNetworking/Serialization"=>[],
                "AFNetworking/Reachability"=>[],
                "AFNetworking/Security"=>[]
              },
              "source_files"=>[
                "AFNetworking/AFURLConnectionOperation.{h,m}",
                "AFNetworking/AFHTTPRequestOperation.{h,m}",
                "AFNetworking/AFHTTPRequestOperationManager.{h,m}"
              ]
            },
            {
              "name"=>"NSURLSession",
              "dependencies"=>{
                "AFNetworking/Serialization"=>[],
                "AFNetworking/Reachability"=>[],
                "AFNetworking/Security"=>[]
              },
              "source_files"=>[
                "AFNetworking/AFURLSessionManager.{h,m}",
                "AFNetworking/AFHTTPSessionManager.{h,m}"
              ]
            },
            {
              "name"=>"UIKit",
              "platforms"=>{
                "ios"=>"6.0"
              },
              "dependencies"=>{
                "AFNetworking/NSURLConnection"=>[],
                "AFNetworking/NSURLSession"=>[]
              },
              "ios"=>{
                "public_header_files"=>"UIKit+AFNetworking/*.h",
                "source_files"=>"UIKit+AFNetworking"
              },
              "osx"=>{
                "source_files"=>""
              }
            }
          ]
        )

Should this pod be found when entering Serialization or Security?

segiddins commented 9 years ago

Yes, imho

-Samuel E. Giddins

On Nov 6, 2014, at 1:23 PM, Florian R. Hanke notifications@github.com wrote:

Not sure I understand fully.

Can we make an example?

( "name"=>"AFNetworking", "version"=>"2.3.1", "license"=>"MIT", "summary"=>"A delightful iOS and OS X networking framework.", "homepage"=>"https://github.com/AFNetworking/AFNetworking", "social_media_url"=>"https://twitter.com/AFNetworking", "authors"=>{"Mattt Thompson"=>"m@mattt.me"}, "source"=>{ "git"=>"https://github.com/AFNetworking/AFNetworking.git", "tag"=>"2.3.1", "submodules"=>true}, "requires_arc"=>true, "platforms"=>{ "ios"=>"6.0", "osx"=>"10.8" }, "public_headerfiles"=>"AFNetworking/.h", "source_files"=>"AFNetworking/AFNetworking.h", "subspecs"=>[ { "name"=>"Serialization", "source_files"=>"AFNetworking/AFURL{Request,Response}Serialization.{h,m}", "ios"=>{ "frameworks"=>[ "MobileCoreServices", "CoreGraphics" ] }, "osx"=>{ "frameworks"=>"CoreServices" } }, { "name"=>"Security", "source_files"=>"AFNetworking/AFSecurityPolicy.{h,m}", "frameworks"=>"Security"}, {"name"=>"Reachability", "source_files"=>"AFNetworking/AFNetworkReachabilityManager.{h,m}", "frameworks"=>"SystemConfiguration" }, { "name"=>"NSURLConnection", "dependencies"=>{ "AFNetworking/Serialization"=>[], "AFNetworking/Reachability"=>[], "AFNetworking/Security"=>[] }, "source_files"=>[ "AFNetworking/AFURLConnectionOperation.{h,m}", "AFNetworking/AFHTTPRequestOperation.{h,m}", "AFNetworking/AFHTTPRequestOperationManager.{h,m}" ] }, { "name"=>"NSURLSession", "dependencies"=>{ "AFNetworking/Serialization"=>[], "AFNetworking/Reachability"=>[], "AFNetworking/Security"=>[] }, "source_files"=>[ "AFNetworking/AFURLSessionManager.{h,m}", "AFNetworking/AFHTTPSessionManager.{h,m}" ] }, { "name"=>"UIKit", "platforms"=>{ "ios"=>"6.0" }, "dependencies"=>{ "AFNetworking/NSURLConnection"=>[], "AFNetworking/NSURLSession"=>[] }, "ios"=>{ "public_headerfiles"=>"UIKit+AFNetworking/.h", "source_files"=>"UIKit+AFNetworking" }, "osx"=>{ "source_files"=>"" } } ] ) Should this pod be found when entering Serialization or Security?

— Reply to this email directly or view it on GitHub.

segiddins commented 9 years ago

I'm my opinion, yes.

floere commented 9 years ago

Under category "subspecs"? I'm just not sure I understand the use case fully – a user wants to find AFNetworking, but does not know the name. But they remember that a subspec of it was "Serialization", so they enter that. Does that make sense?

floere commented 9 years ago

Should we make this: subspec:CoreData, and it will find RestKit?

floere commented 9 years ago

Ping

floere commented 9 years ago

Can I close this? We're not making any progress.

segiddins commented 9 years ago

I will make progress, I promise. I just dropped the ball on this

-Samuel E. Giddins

On Dec 22, 2014, at 7:16 AM, Florian R. Hanke notifications@github.com wrote:

Can I close this? We're not making any progress.

— Reply to this email directly or view it on GitHub.

floere commented 9 years ago

No worries! I'd just like to reduce the issue count. It's not urgent :)

On Mon, Dec 22, 2014 at 11:20 AM, Samuel E. Giddins notifications@github.com wrote:

I will make progress, I promise. I just dropped the ball on this -Samuel E. Giddins On Dec 22, 2014, at 7:16 AM, Florian R. Hanke notifications@github.com wrote: Can I close this? We're not making any progress. —

Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub: https://github.com/CocoaPods/search.cocoapods.org/issues/65#issuecomment-67821827