简体   繁体   中英

MongoDB, elasticsearch URL indexing

I am new to Mongodb and ElasticSearch. My requirement would be to allow users to kind of bookmark either a full page or a part of the page.

I handled the front end but would like to know how to design the backend.. Ie how to store the webpage details in the mongodb and index using elastic search. Would it be a good idea to store the whole web content in mongodb or just a url. In case its just a url, how does Elastic search find the keywords inside the url when we do a restful call.

Appreciate your time..

IMHO there is too little information to fully answer this. Are you sure you need both MongoDB and ElasticSearch? I wouldn't underestimate the overhead for development and operations.

In the upcoming release, MongoDB 2.4 will have (somewhat limited) fulltext-search capabilities.

ElasticSearch can do "regular" GET queries like a database. For searching inside a specific field (like the URL) see the SEARCH documentation and make good use of * (wildcard) and ~ (fuzzy search).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM