GithubHelp home page GithubHelp logo

isabella232 / wordpress-search Goto Github PK

View Code? Open in Web Editor NEW

This project forked from algolia/wordpress-search

0.0 0.0 0.0 1.37 MB

Wordpress plugins search website

Home Page: https://wordpress.algolia.com/

License: Other

HTML 31.61% JavaScript 39.82% CSS 18.85% Ruby 9.40% Dockerfile 0.33%

wordpress-search's Introduction

Wordpress Plugins Search

This is the repository backing the wordpress.algolia.com website. It's an Angular.js app using the AlgoliaSearch API client to power the search feature.

The search results are refreshed as you type, querying the Algolia API at each keystroke.

Indexing

The Wordpress Plugins are crawled with a simple Ruby+Shell script and are formatted as follow in Algolia:

{
  "objectID": "540765600",
  "name": "Akismet",
  "slug": "akismet",
  "version": "3.1.3",
  "popular": true,
  "author": "Automattic",
  "author_profile": "//profiles.wordpress.org/matt",
  "contributors": {
    "matt": "//profiles.wordpress.org/matt",
    "ryan": "//profiles.wordpress.org/ryan",
    // [...]
  },
  "requires": "3.2",
  "tested": "4.2.4",
  "rating": 5,
  "num_ratings": "377",
  "ratings": { "1": "14", "2": "3", "3": "5", "4": "12", "5": "343" },
  "downloaded": 34362207,
  "last_updated": "2015-07-06 11:44pm GMT",
  "added": "2005-10-20",
  "homepage": "http://akismet.com/",
  "short_description": "Akismet checks your comments against the Akismet Web service to see if they look like spam or not.",
  "download_link": "https://downloads.wordpress.org/plugin/akismet.3.1.3.zip",
  "tags": [ "Akismet", "anti-spam", "antispam", "comment moderation", "comment spam", "comments", "contact form spam", "spam", "spam comments" ],
  "donate_link": ""
}

The Algolia index is configured with the following settings:

{
  "attributesToIndex": ['unordered(name)', 'unordered(tags)', 'author', 'unordered(short_description)'],
  "customRanking": ['desc(downloaded)'],
  "attributesForFaceting": ['author', 'tags', 'rating'],
  "ranking": ['desc(popular)', 'typo', 'words', 'proximity', 'attribute', 'exact', 'custom']
}

Search

We're using the Algoliasearch Helper to perform the search queries while maintaining the refinements state, configured as follow:

algoliasearchHelper($scope.client, 'wordpress_plugins', {
  facets: ['tags', 'author'],
  disjunctiveFacets: ['rating'],
  attributesToRetrieve: ['name', 'slug', 'rating', 'num_ratings', 'downloaded', 'last_updated', 'ratings', 'author_profile'],
  attributesToHighlight: ['name', 'short_description', 'author', 'tags'],
  maxValuesPerFacet: 10
});

Development

Environment

To start developing, you can use the following commands:

$ [npm install -g gulp]
$ npm install
$ gulp

Deployment

To deploy to the GitHub gh-pages branch, use the following commands:

$ gulp deploy
$ open https://wordpress.algolia.com

wordpress-search's People

Contributors

redox avatar seafoox avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.