This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Specify server locations in a SOLR_LOCATOR variable; used later in variable substitutions: | |
SOLR_LOCATOR : { | |
# Name of solr collection | |
collection : SampleSearch | |
# ZooKeeper ensemble | |
zkHost : "host:port/solr" | |
} | |
morphlines : [ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# delete old index if exists | |
curl -XDELETE 'http://localhost:9200/productindex?pretty' | |
# Create new Index productindex | |
curl -XPUT 'http://localhost:9200/productindex?pretty' -d '{}' | |
# Insert data in productindex for offertype | |
curl -XPUT 'http://localhost:9200/productindex/offertype/1?pretty' -d '{"skuid": "1983001", "offer_id": "promo00001,promo00002,promo00003"}' | |
curl -XPUT 'http://localhost:9200/productindex/offertype/2?pretty' -d '{"skuid": "1983002", "offer_id": "promo00001,promo00002"}' | |
curl -XPUT 'http://localhost:9200/productindex/offertype/3?pretty&refresh=true' -d '{"skuid": "1983003", "offer_id": "promo00001,promo00003"}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# delete old index if exists | |
curl -XDELETE 'http://localhost:9200/offerindex?pretty' | |
curl -XDELETE 'http://localhost:9200/categoryindex?pretty' | |
# Create Index | |
curl -XPUT 'http://localhost:9200/offerindex?pretty' -d '{}' | |
curl -XPUT 'http://localhost:9200/categoryindex?pretty' -d '{}' | |
curl -XPUT 'http://localhost:9200/offerindex/offertype/1?pretty' -d '{"skuid": "1983001", "offer_id": "promo00001,promo00002,promo00003"}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# delete old index if exists | |
curl -XDELETE 'http://localhost:9200/syns?pretty' | |
# create index with synonym analyzer and mapping | |
curl -XPUT 'http://localhost:9200/syns?pretty' -d '{ | |
"settings" : { | |
"number_of_replicas": 0, | |
"number_of_shards": 1, | |
"index": { | |
"analysis": { |