Journals / Pamukkale Üniversitesi Mühendislik Bilimleri Dergisi / 2022 / Cilt: 28 - Sayı: 5

A method to improve full-text search performance of MongoDB

MongoDB'nin tam metin arama performansını iyileştirme yöntemi

Pages
720–729
Publication Date
2022-10-31
DOI
—
🏛️Bibliographic metadata and full text access for this article are provided via DergiPark.
DergiPark Record ↗
✨

AI Summary & Key Takeaways

AI Insight
⚡ TL;DR(Too Long; Didn't Read)

Tests on regex searches that do not use the text index also shows that the MWCA model provides 7 to 13 times speed increase and 29% to 34% less memory usage.

📌 3 Key Takeaways

🎯
Objective & Hypothesis:B-Tree based text indexes used in MongoDB are slow compared to different structures such as inverted indexes.
📊
Key Findings & Data:In this study, it has been shown that the full-text search speed can be increased significantly by indexing a structure in which each different word in the text is included only once.
💡
Conclusion & Impact:Tests on regex searches that do not use the text index also shows that the MWCA model provides 7 to 13 times speed increase and 29% to 34% less memory usage.
🔬Design:Modeling & Simulation
📍Scope:Comprehensive Sample
⚙️Variables:NoSQL · MongoDB · Metin dizini

Abstract

B-Tree based text indexes used in MongoDB are slow compared to different structures such as inverted indexes. In this study, it has been shown that the full-text search speed can be increased significantly by indexing a structure in which each different word in the text is included only once. The Multi-Stream Word-Based Compression Algorithm (MWCA), developed in our previous work, stores word dictionaries and data in different streams. While adding the documents to a MongoDB collection, they were encoded with MWCA and separated into six different streams. Each stream was stored in a different field, and three of them containing unique words were used when creating a text index. In this way, the index could be created in a shorter time and took up less space. It was also seen that Snappy and Zlib block compression methods used by MongoDB reached higher compression ratios on data encoded with MWCA. Search tests on text indexes created on collections using different compression options shows that our method provides 19 to 146 times speed increase and 34% to 40% less memory usage. Tests on regex searches that do not use the text index also shows that the MWCA model provides 7 to 13 times speed increase and 29% to 34% less memory usage.

Özet

MongoDB'de kullanılan B-Tree tabanlı metin dizinleri, ters çevrilmiş dizinler gibi farklı yapılara kıyasla yavaştır. Bu çalışmada, metindeki her farklı kelimenin yalnızca bir kez yer aldığı bir yapı indekslenerek tam metin arama hızının önemli ölçüde artırılabileceği gösterilmiştir. Daha önceki çalışmalarımızda geliştirilen Çok Akışlı Kelime Tabanlı Sıkıştırma Algoritması (MWCA), kelime sözlüklerini ve verileri farklı akışlarda saklar. Belgeler bir MongoDB koleksiyonuna eklenirken MWCA ile kodlanmış ve altı farklı akışa ayrılmıştır. Her akış farklı bir alan ismi ile saklanmış ve bunlardan benzersiz kelimeler içeren üçü metin dizini oluşturulurken kullanılmıştır. Bu sayede indeks daha kısa sürede oluşturulabilmiş ve daha az yer kaplamıştır. MongoDB‘de kullanılan Snappy ve Zlib blok sıkıştırma yöntemlerinin MWCA ile kodlanan veriler üzerinde daha yüksek sıkıştırma oranlarına ulaştığı da görülmüştür. Farklı yöntemler ile sıkıştırılan koleksiyonlar üzerinde oluşturulan metin dizinlerinde yapılan arama testleri, yöntemimizin 19 ila 146 kat hız artışı ve %34 ila %40 daha az bellek kullanımı sağladığını göstermiştir. Metin dizinini kullanmayan regex aramaları ile ilgili testler de MWCA modelinin 7 ila 13 kat hız artışı ve %29 ila %34 daha az bellek kullanımı sağladığını göstermiştir.

🔖

Cite This Article

MESUT, A., ÖZTÜRK, E. (2022). A method to improve full-text search performance of MongoDB. Pamukkale Üniversitesi Mühendislik Bilimleri Dergisi, Cilt: 28 - Sayı: 5, 720–729. https://ajindex.com/articles/696844

📄 Full Text PDF Viewer

📄

PDF görüntüleyici hazırlanıyor...

References (15)

  1. Qiao Y. An FPGA-Based Snappy Decompressor-Filter. MSc Thesis, Delft University of Technology, Delft, Netherlands, 2018
  2. Deutsch P, Gailly JL. “Zlib compressed data format specification version 3.3”. RFC 1950, USA, 1996
  3. Collet Y, Kucherawy M. “Zstandard compression and the application/zstd Media Type”. RFC 8478, USA, 2018
  4. Öztürk E, Mesut A, Diri B. “Multi-Stream word-based compression algorithm for compressed text search”. Arabian Journal of Science and Engineering, 43(12), 8209–8221, 2018
  5. Habib A, Islam MJ, Rahman MS. “A dictionary-based text compression technique using quaternary code”. Iran Journal of Computer Science, 3(3), 127–136, 2020
  6. Rahman MA, Hamada M. “Burrows–Wheeler transform based lossless text compression using keys and huffman coding”. Symmetry, 12(10), 1654-1667, 2020
  7. Mahmood MA, Hasan KMA. “Efficient compression scheme for large natural text using zipf distribution”. International Conference on Advances in Science, Engineering and Robotics Technology, Dhaka, Bangladesh, 3 May 2019
  8. Bharathi K, Kumar H, Fairouz A, Al Kawam A, Khatri SP. “A plain-text incremental compression (pic) technique with fast lookup ability”. IEEE 36th International Conference on Computer Design, Orlando, FL, USA, 7-10 October 2018
  9. Buluş HN, Carus A, Mesut A. “A new word-based compression model allowing compressed pattern matching”. Turkish Journal of Electrical Engineering & Computer Sciences, 25(5), 3607–3622, 2017
  10. Morishima S, Matsutani H. “Performance evaluations of document-oriented databases using GPU and cache structure”. IEEE Trustcom/BigDataSE/ISPA, Helsinki, Finland, 20-22 August 2015
  11. Kelec A, Dujlovic I, Obradovic N. “One approach for fulltext search of files in MongoDB based systems”. IEEE 18th International Symposium INFOTEH-JAHORINA, East Sarajevo, Bosnia & Herzegovina, 20-22 March 2019
  12. Truica CO, Boicea A, Radulescu F. “Building an inverted index at the dbms layer for fast full text search”. Journal of Control Engineering and Applied Informatics, 19(1), 94-101, 2017
  13. Zobel J, Moffat A. “Inverted files for text search engines”. ACM computing surveys (CSUR), 38(2), 1-56, 2006
  14. Greca S, Kosta A, Maxhelaku S. “optimizing data retrieval by using mongodb with elasticsearch”. International Conference on Recent Trends and Applications in Computer Science and Information Technology, Tirana, Albania, 23-24 November 2018
  15. Han L, Zhu L. “Design and implementation of elasticsearch for media