In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Mongo-connector Integration MongoDB to Solr for Incremental Indexing
Configuring MongoDB Replication Sets
Reference: Deploying a Replication Set for Testing and Development
Install Solr 5.3
Reference: Installing Solr5.3 under CentOS
Install Python 2.7
Install Python 2.7 on CentOS
install pip
Reference: Installing pip under CentOS
Install mongo-connector
Method 1: Install using pip
pip install mongo-connector
Installed in Python's default package directory:
/usr/local/lib/python2.7/site-packages
Method 2: Install as a Service
1. Go to https://github.com/mongodb-labs/mongo-connector/archive/master.zip and download mongo-connector-master.zip.
2. Unzip into directory.
unzip mongo-connector-master.zipcd mongo-connector-master
3. Edit configuration files.
vi config.json
4. Installed as a service.
python setup.py install_service
Create the mongo-connector service in/etc/init.d and copy the config.json file to/etc/mongo-connector.json.
Uninstall mongo-connector service
python setup.py uninstall_service
It removes/etc/init.d/mongo-connector and/etc/mongo-connector.json
View Service Status
service mongo-connector status
Configure Solr
The Solr configuration file solr.xml is located at/data/solr/data/.
Creating core
su - solr -c "/usr/local/solr/solr/bin/solr create -c card -n data_driven_schema_configs"
The folder/data/solr/data/card is generated. Under the directory/data/solr/data/card/conf is the configuration directory of card. Synonyms and stop words can be configured.
Configure solrconfig.xml
1. Make sure LukeRequestHandler is enabled
The following line of applications appears in the solrconfig.xml file.
2. Configure hard commits (frequency of refresh to hard disk) and soft commits (frequency of commit to memory)
Configure and in the solrconfig.xml file
30000010000true100060000
Configure schema.xml
1. Mongo Connector stores metadata to help handle rollback in each document. To support this data, you need to add the following information to your schema.xml:
2. Configure configuration in schema.xml.
Start mongo-connector
Method 1: Start from the command line
nohup sudo mongo-connector -m localhost:27019 -t http://localhost:8983/solr/card -o oplog_progress.txt -n example.card -u _id -d solr_doc_manager > mongo-connector.out 2>&1
Method 2: Start with service
service mongo-connector start
Solr Delete all indexes
http://192.168.11.52:8983/solr/card/update/? stream.body=%3Cdelete%3E%3Cquery%3E*:*%3C/query%3E%3C/delete%3E&stream.contentType=text/xml;charset=utf-8&commit=true
Reference:
http://blog.mongodb.org/post/29127828146/introducing-mongo-connector
https://github.com/mongodb-labs/mongo-connector/wiki/Installation
https://github.com/mongodb-labs/mongo-connector/wiki/Usage-with-Solr
https://loutilities.wordpress.com/2012/11/26/complementing-mongodb-with-real-time-solr-search/
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.