Code Monkey home page Code Monkey logo

static-site-search-with-azure's Introduction

Deploy to Azure

Azure Search with Azure Functions

I built these Azure Functions to load a JSON representation of my blog into Azure Search and allow me to search for posts and pages with a bit of client side Javascript. My blog is a static site generated by Jekyll and is hosted on GitHub Pages, so there is no server side available.

Though this was created specifically for my Jekyll based blog I should be re-usable as long as the JSON passed in is an array of the Page objects (see Page.csx).

Application Settings

The following Application settings need to be configured in your Function App

  • SearchJsonUrl - The URL of the search.json in your Jekyll site
  • SearchServiceName - The name of your Azure Search instance
  • SearchApiKey - The Admin Key of your Azure Search instance
  • SearchIndexName - The name of the Azure Search Index you want to use

The Search Index will be deleted and recreated each time the BlogIndexer Function runs. This is because I have no way to pass deleted posts up to delete them from the Search Index.

Searching

I've included some of the Jekyll files that drive the search. Missing are the actual search textbox and the category list that does a faceted search. If you need samples for that you can check out the repo for my blog.

Scoring Profiles

I haven't setup a Scoring Profile to give greater weight to hits in the title than the body. At this point I don't think I have enough Posts/Pages to justify it.

Questions

You can find my contact info here https://hutchcodes.net/about/

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.