Git Product home page Git Product logo

es-backbone's Introduction

es-backbone.js

ElasticSearch Backbone/Mustache library for quickly building Faceted Search front ends.

Overview

If your data is already indexed and you know a bit about the ElasticSearch API, then this library should allow you to build an interactive front end for doing faceted search. I've built three so far, and the last one took 35 minutes to build, debug, and deploy.

It also uses flot to provide pretty interactive graphs as inspired by Shay's post here: http://www.elasticsearch.org/2011/05/13/data-visualization-with-elasticsearch-and-protovis/

See examples/simple/simple.php for all the library dependencies. Those paths are probably not the best places to serve them from.

Where to Start

In the examples directory is a simple example (but it has no server to work with). To get it working grep through the files or "TODO" and "OPTIONAL" to figure out what you need to do.

If you have a public ES endpoint I'd love to have a working example to show off in this repository.

Rough description of the Backbone Objects

Models:

  • Search Results Model: esbbSearchResultsModel
  • Search Query Model: esbbSearchQueryModel

Views:

  • View for search query input: esbbSearchBarView
  • View for displaying search results: esbbSearchResultsView
  • View for a timeline of search results (date histogram facet): esbbSearchFacetTimelineView
  • View for a pie chart of search results (term and range facets): esbbSearchFacetPieView
  • View for values of a single facet (term facet)esbbSearchFacetSelectView
  • View for adding/removing filters: esbbSearchFilterSelectView
  • View for adding a date range filter: esbbSearchDateRangePickerView
  • View for creating a URL to the current page: esbbSearchURLView

Versions

pre-0.2: Many improvements to the lib, but haven't yet update the example code

  • added view for sorting results: esbbSortView
  • added esbbSearchFilterTermsSelectorView to have one text entry field per filter rather than a single box for all filters
  • added pushstate support to modify URL in address bar
  • Timeline View can be displayed with the bars shown horizontally so it can fit in the sidebar
  • some changes to search results formatting
  • fixed bugs in search spinner, fades out old results while new search in process
  • Number of results properly displayed
  • added debugging info on query syntax errors

0.1 Initial Release. Works for me. ;)

es-backbone's People

Contributors

gibrown avatar mithunsatheesh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

es-backbone's Issues

Awesome

Hey,

This is really awesome - are you still actively developing this or ?

I'm learning elasticSearch and use BackboneJS a lot so was wondering whether I should start with this.

Add support for d3 rather than Flot

Please consider using something with d3, not Flot. Flot was probably the best choice for this at some point, but as an open-source project it didn't feel healthy last time we evaluated it. We are still using it in our services (see signature), but are going to replace it.

from Sematext.

Blank results in simple example

Hello, nice application. I am trying the example, it seems everythings ok but the results are empty blocks. I mean, the application do bring the results (the count and the facets its all right) but there is some kind of problem with the results template, I suppose in this part

        {{#hits}}\
        <p class="esbb-result"> \
            <span class="esbb-result-title">{{fields.title}}<span>\
            {{highlight.content}}<br \>\
            <span class="esbb-result-name">{{fields.authors}}</span>\
            - <span class="esbb-result-date">{{fields.location}}</span>\
        </p>\
        {{/hits}}\

the fields title, authors and location (in my case) are rendered as empty strings.

Uncaught TypeError: Cannot read property 'query' of undefined

When I clone the project and visit the examples/simple/simple.php there is an immediate exception which stops all JS processing.

Uncaught TypeError: Cannot read property 'query' of undefined simple-view.js:42
Backbone.View.extend.initialize       simple-view.js:42
a.View                                backbone-min.js:1
r                                     backbone-min.js:1
(anonymous function)                  simple.php:82
f.Callbacks.o                         jquery.min.js:2
f.Callbacks.p.fireWith                jquery.min.js:2
e.extend.ready                        jquery.min.js:2
c.addEventListener.B                  jquery.min.js:2

Am I missing something?

Pagination for results

I want to implement the pagination feature between results. I know that in the JSON query it must have the from : 0, line but, how it can be modified on runtime?

Refresh on event: remove facet

When I click on the X icon to remove a facet, the interface does not refresh as when I click on a new facet.

Where is the "refresh" command so I can invoke when the facet is removed?

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.