Skip to content

Latest commit

 

History

History
51 lines (44 loc) · 1.52 KB

File metadata and controls

51 lines (44 loc) · 1.52 KB

MongoDB Search Server

A Java-based HTTP server GET interface for MongoDB Search, supporting filtering, sorting, highlighting, pagination, and debugging.

This Search Server code was initially written to support the article "How to Build a Search Service in Java with MongoDB".

Building and running locally

The jettyRun target is used and searches the movies_index. The search server code lives under server/

To run the search server locally, follow these steps:

movies_index configuration

{
  "analyzer": "lucene.english",
  "searchAnalyzer": "lucene.english",
  "mappings": {
    "dynamic": true,
    "fields": {
      "cast": [
        {
          "type": "token"
        },
        {
          "type": "string"
        }
      ],
      "genres": [
        {
          "type": "token"
        },
        {
          "type": "string"
        }
      ]
    }
  }
}