Sample code for indexing data with Solr
- Install docker for Mac
- Run docker-compose build
- Run docker-compose up -d
- Run ./create-records.sh to create records and set alias headline to collection headline_1
- Visit http://localhost:8983/solr/#/headlines/query to query data
- Run
example-scenarios/migration-alias/query-records-with-alias.sh
and observe that the query on aliasheadlines
returns descending order of records based on the valuestatus
- Run
example-scenarios/migration-alias/create-migration.sh
and observe that a new collection calledheadline_2
with a newstatus
callednew
is created. Observe that the new data now contains a record withstatus
ofnew
- Run
example-scenarios/migration-alias/query-records-with-alias.sh
again and observe that the query now returns result from collectionheadline_2
successfully