Arquitectura de servicios modulares para indexar y buscar URL por su contenido utilizando CouchDB+Lucene como un inenfador de búsqueda.
Nota: Este proyecto todavía está bajo un gran desarrollo, ¡espere un WIP!
Nota: (requerido Docker y Docker-Compose)
// Build docker containers (1st time)
docker-compose build
// Launch all required services
# [PRODUCTION]
docker-compose up
# [DEVELOPMENT]
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
// Open UI
open http://localhost:8080
Nota: Para una ejecución completa de Restablecimiento de datos de CouchDB (advertencia, todos los datos se borrarán):
docker-compose rm && rm DatabaseInit/dbinitstatus/.dbinitdone
Nota: (requerido Docker y Docker-Compose)
// Test GetImageFromURL
open http://localhost:3000/?url=www.botdream.com&width=1024&height=900
// Test GetContentFromURL
curl http://localhost:6000/?url=www.botdream.com
// Open CouchDB UI
open http://localhost:5984/_utils/database.html?searchengine/_all_docs
// Test CouchDB+Lucene search
curl -X GET --silent http://localhost:5984/_fti/local/searchengine/_design/search/by_content?q=brilliant&include_docs=true | jq .
//DBProxy service
[POST] curl -d 'url=http://www.botdream.com' http://localhost:8000/url
[DELETE] curl -X DELETE http://localhost:8000/remove/http-botdream-com-botdream-com-botdream-com%2F2017-04-21T23%3A11%3A04.910Z | jq .
[GET] curl http://localhost:8000/search/botdream | jq .
// shutdown services
docker-compose stop
OR
CTRL+C in the original terminal
// clean services data (reset containers)
docker-compose rm
// when changing source code you should rebuild docker images, use this generic command to build all and ignore cache (will take some time, forces to rebuild all images from scratch)
docker-compose build --no-cache
HACER:
Inicializador de base de datos CouchDB.
Para una prueba de servicio rápida, ejecute estos comandos:
cd DatabaseInit
./docker_build.sh
./docker_run.sh
React WebApp UI.
Para una prueba de servicio rápida, ejecute estos comandos:
cd UI
./docker_build.sh
./docker_run.sh
open http://localhost:8080
Un servicio web de captura de pantalla simple impulsado por Express y PhantomJS. Bifurcado de captura de pantalla-app.
Documentación original Avaliable aquí
Para una prueba de servicio rápida, ejecute estos comandos:
cd GetImageFromURL
./docker_build.sh
./docker_run.sh
open http://localhost:3000/?url=www.botdream.com&width=1024&height=900
// or with clipping params
open http://localhost:3000/?url=www.botdream.com&width=1024&height=900&clipRect=%7B%22top%22%3A0%2C%22left%22%3A0%2C%22width%22%3A1024%2C%22height%22%3A800%7D
curl http://localhost:3000/?url=www.botdream.com&width=1024&height=900 > botdream.png
curl --silent http://localhost:3000/?url=www.botdream.com&width=1024&height=900 | imgcat
Un servicio web de raspado de contenido simple impulsado por Express y Cheerio.js
Para una prueba de servicio rápida, ejecute estos comandos:
cd GetContentFromURL
./docker_build.sh
./docker_run.sh
curl http://localhost:6000/?url=www.botdream.com
Cree una base de datos y algunos documentos y luego puede comenzar a configurar y consultar índices como se explica en el readMe CouchDB-Lucene.
Para una prueba de servicio rápida, ejecute estos comandos:
cd CouchDBLucene
docker-compose up
./database_init.sh
open http://localhost:5984/_utils/
curl -X GET --silent http://localhost:5984/_fti/local/searchengine/_design/search/by_content?q=nirvana&include_docs=true | jq .
curl -X GET --silent http://localhost:5984/_fti/local/searchengine/_design/search/by_content?q=einstein&include_docs=true | jq .
curl -X GET --silent http://localhost:5984/_fti/local/searchengine/_design/search/by_content?q=brilliant&include_docs=true | jq .
// Clear CouchDB data
docker-compose rm
Más información sobre la búsqueda de texto completo Couchdb-Lucene aquí: CouchDblucene-FullText-Search
Una herramienta simple hecha en PARSE PARSE Google Chrome Bookmark exportó el archivo HTML en CouchDB-Lucene.
Para una prueba de servicio rápida, ejecute estos comandos:
cd SendFavoritesToCouchDB
# export Chrome Bookmark file to ./bookmarks_sample.html
# ./build.sh # in case you need to change the sourcecode and compile the tool
# Launch CouchDB-Lucene service and initialize database
# Launch GetContentFromURL service
./SendFavoritesToCouchDB ./bookmarks_sample.html
Una interfaz de usuario experimental que usa Vue.js, servidor HTTP Basic WebPack-Dev-Server, aún no se implementa el backend, ¡ni Docker Container disponible!
Para una prueba de servicio rápida, ejecute estos comandos:
cd UI
npm install
npm start
open http://localhost:8080
Un servicio simple de URL a índice. Envía carne, consigue Sauge.
Esto toma la URL dada, la pasa a través de GetContentFromurl, luego la empuja a la base de datos searchengine CouchDB donde CouchDB-Luceno está indexando documentos.
curl -d 'url = http: //www.botdream.com' http: // localhost: 8000/url
Entonces cuando se hace:
curl -X GET --silent http://localhost:5984/_fti/local/searchengine/_design/search/by_content?q=botdream&include_docs=true | jq .
Nota: El motor de servicio ahora está indexando por título:
curl -X GET --silent http://localhost:5984/_fti/local/searchengine/_design/search/by_title?q=botdream&include_docs=true | jq .
Además: DBProxy ahora está implementando el punto final de búsqueda (esto evita que la interfaz de usuario requiera datos directamente a CouchDB, también en el futuro será posible usar otro motor DB y abstraerlo con este servicio => Mirando ElasticSearch)
curl -X GET --silent http://localhost:8000/search/botdream | jq .