How to implement a search engine on a site that is in a Node.js environment

Asked

Viewed 1,038 times

0

I made a site in the environment Node.js, using Express, template engine Jade, The problem is that the search engine (search engine) I have ready is in PHP, I do not know if I can run it in Node environment; if I can as would?

If it is not possible, or if you know how I can make a direct search engine in the Node environment, I ask you for this help.

  • 1

    Where is the data?

  • Two indicators I’ve heard about: Weld: http://lbdremy.github.io/solr-node-client/, Elastic search: http://www.elasticsearch.org/guide/en/elasticsearch/client/javascript-api/current/index.html

  • Thanks Sergio, I’ll analyze these api. I found a Jquery plugin that searches in Static, live and image mode, I’m implementing to see if the result will satisfy. plugin’s website: http://www.tipue.com/search/

  • @Thiagojem, answer the question of bfavaretto, the question as it is not very clear and more complete can be very useful to others in the future.

  • @bfavaretto the data are the huge files in PHP. I was thinking search engine only in PHP, thank God I remembered to search other ways.

1 answer

2


Both Solr and Elasticsearch work on the basis of REST Apis, you install them in your environment and send requests to Apis to get results in JSON, XML, or any other format.

Both Solr and Elasticsearch have Node clients:

Solr client in Nodejs

Elasticsearch client in Nodejs

This prevents you from having to do the requests and handle the Replays manually.

  • Which of the two do you think is best for searching pages on the site (To search texts, which are inserted in the pages, and the Internet users find the content they want easily.). I have implemented freefind which is "outsourced", easy to add, just copy and paste markup in HTML, CSS and Javascript, auto-indexing, many search options and makes it possible to view the most searched words

  • ... 3,000 pages can be indexed for free, the only problem is that there are ads in the free version. However, I am studying and as soon as I know I will be implementing a search engine "own" on my site,I know it will not be as complete as freefind, but at least I will have greater control and will not have ads. Freefind link: http://www.freefind.com/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.