0

I wrote a client-server group chat with MQTT and the database is MongoDB. I want to add semantic search, for example if anyone wants to know what messages are about the topic "flower" and there is a message "I love roses" it will find it.

What is the best way to do it? Is there a tool I can use that implements the semantic search? I would realy appreciate if anyone have a tutorial about the way I can connect it to my MongoDB.

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
Ben Kalifa
  • 17
  • 6
  • After streaming your mongoDB docs to Elasticsearch, you could leverage [synonym token filters](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-tokenfilter.html) in Elasticsearch (if your list of synonyms is not too big). – Val Nov 16 '16 at 12:50
  • how do i stream my mongoDB docs to Elasticsearch? there is a plugin called river but i am not sure if this is the best way, if you have a step by step tutorial for windows i would love it – Ben Kalifa Nov 16 '16 at 13:34
  • Using mongo-connector for instance, see this: http://stackoverflow.com/questions/35660940/unable-to-run-mongo-connector/35665960#35665960 – Val Nov 16 '16 at 13:39
  • so i used mongo conector and i connected my mongo and my elasticsearch. how can i check whether the connection worked? can i see my db in the elsaticsearch (localhost:9200) somehow? in addition I chose to have auto indexing by the mongo connector, how can i see the indexes? – Ben Kalifa Nov 17 '16 at 09:57
  • @BenKalifa did you read the documentation please? – amirouche Nov 19 '16 at 14:22
  • which documentation? @amirouche i try to go there: [http://localhost:9200/_cat/indices?v](http://localhost:9200/_cat/indices?v) to see all the indexes and to go there: [http://localhost:9200/foo/_search?pretty=true&q={%27matchAll%27:{%27%27}}](http://localhost:9200/foo/_search?pretty=true&q={%27matchAll%27:{%27%27}}) to look for all the data-base – Ben Kalifa Nov 20 '16 at 15:15
  • @amirouche when I tried both of the links i mentioned above it appeared as there is no connection (the db was empty and i know my db is not empty), i used the mongo-connector with this command (mongo-connector -m localhost:27017 -t localhost:9200 -d elastic_doc_manager) after intialazing mongod and elasticsearch. the output i got was : "Logging to mongo-connector.log." did it worked? if so why can't i see my db in the elasticsearch? please help me, i"m new to this and i realy need some help. – Ben Kalifa Nov 20 '16 at 23:23

0 Answers0