Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 .nuget
Octocat-spinner-32 SearchBoxSample
Octocat-spinner-32 packages
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 SearchBoxSample.sln
README.md

SearchBox.io Sample .NET Application.

This example illustrates basic search features of SearchBox.io (ElasticSearch as service).

Each CRUD operation on documents is reflected to search index in real time.

To test SearchBox.io's search features navigate to Manage Documents, create a new document and search it.

You can click "Reindex All" at Manage Documents view to index all documents in database. It will delete old index if exists, create a new index and it will index all documents at database with Bulk API in one request.

Sample application is using NEST .NET ElasticSearch client to integrate with SearchBox.io.

Local Setup

To run example in your local environment with a local ElasticSearch instance, add SEARCHBOX_URL to appSettings in web.config

<add key="SEARCHBOX_URL" value="http://localhost:9200"/>

Also change connection string to use SqlServerCe

<add name="SampleEntities" connectionString="data source=.\SQLEXPRESS;Data Source=|DataDirectory|aspnetdb.mdf" providerName="System.Data.SqlServerCe.4.0" />

AppHarbor Deployment

This sample can be deployed to Appharbor with no change. With 2 steps application will be fully functional.

  • Install SQL Addon and go to the SQL Server add-on to specify SampleEntities as the alias.

  • Install SearchBox ElasticSearch Addon.

Deploy sample application, create some records and experience real time search.

Something went wrong with that request. Please try again.