Search engine (elastic search + meteor): Is javascript array manipulation inefficient for arrays containing up to thousands of results? -


i working on project in meteor uses elasticsearch search engine. need search feature on site allow 'stacking' searches. so, instance, 1 can search file user in 'group' uploaded 'stacking' user's name, followed group name , ending file name or content in file.

now, on mongodb database group, user, , files stored in separate collections , related each other through ids. however, elasticsearch uses distributed datastore 'flat'. makes necessary denormalize data/do application-side joins/etc. (https://www.elastic.co/guide/en/elasticsearch/guide/current/relations.html).

my question is: method best...

  1. denormalize data, use nests, etc.

    --> so, when rivering data elasticsearch datastore, make copies of data , replace every parent element new 1 has data added it. ex. if comments on let's post in group. server have add general list of comments + find post object, append comment it, , re-add post object database + update group object contains post object should contain comment + same user object (since want able stack searches on groups, users, etc.). basically when ever added or deleted, i'd have update every object in database relates it.

  2. run multiple elastic search queries (https://www.elastic.co/guide/en/elasticsearch/guide/current/application-joins.html) retrieve data want.

  3. just perform search queries on each de-centralized collection, , use javascript on server-side compare arrays , produce search results.

** note: scaling relatively mid-level load/usage. around hundreds-thousands of instances of data search through. although, if can work larger scale (millions), great!

please correct me if understanding of wrong, , thank reading through this!


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -