[ 
https://issues.apache.org/jira/browse/CB-6285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13944754#comment-13944754
 ] 

Josh Bavari commented on CB-6285:
---------------------------------

Going ahead and owning this. Wrote a new view for searching / view all. Really 
on those searches, we only need to pull back the following fields for the 
search grid:

ID
Name
Description
Platforms
Engines (would be helpful)
Download count

Then for the plugin details, it would need a view that then contains all the 
versions as it currently stands.

Something like this:

function searcher(doc) {
  if (doc['dist-tags'] && doc['dist-tags'].latest) {
    var dist = doc.versions[doc['dist-tags'].latest];
    //We have latest version, now get the platforms available.
    var engines = dist && dist.engines ? dist.engines : '';
    var platforms = dist && dist.platforms ? dist.platforms : '';
    var downloads = 0; // todo: get proper download count
    var obj = { 
              name: doc.name
              , description: doc.description
              , version: doc.dist
              , downloads: downloads
              , platforms: platforms
              , engines: engines 
    };
    emit(doc._id, obj);
  }
}

> Performance optimization review
> -------------------------------
>
>                 Key: CB-6285
>                 URL: https://issues.apache.org/jira/browse/CB-6285
>             Project: Apache Cordova
>          Issue Type: Sub-task
>          Components: Registry, Registry Web
>         Environment: The site needs a look over for ways to improve 
> performance. Some of the views could be using more appropriate limits for 
> document retrieval. Some new views can be written, etc. Need to identify and 
> fix. 
>            Reporter: Steve Gill
>            Assignee: Josh Bavari
>




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to