I'm eyeballing the use of ElasticSearch or solr for 'jailed' search results. By jailed I want to keep sets of data apart for security purposes, etc.
As far as I can tell, this is possible by use of solr's multi core configuration - is there a way to isolate indexes/data in an efficient 'instancing' manner using ElasticSearch?
Solr has more advantages when it comes to the static data, because of its caches and the ability to use an uninverted reader for faceting and sorting – for example, e-commerce. On the other hand, Elasticsearch is better suited – and much more frequently used – for timeseries data use cases, like log analysis use cases.
Performance-wise, they are roughly the same. Operationally, Elasticsearch is a bit simpler to work with, it has just a single process. Solr, in its Elasticsearch-like fully distributed deployment mode known as SolrCloud, depends on Apache ZooKeeper.
1 Ingest and Query services. The Elasticsearch query process is structured very similarly to the Solr service. The main difference lies in the microservice architecture of the system, and the exits to the Elasticsearch and the ZooKeeper administrative functions, rather than to Solr and the monolithic search server.
The main difference between Solr and Elasticsearch is that Solr is a completely open-source search engine. Whereas Elasticsearch though open source is still managed by Elastic's employees. Solr supports text search while Elasticsearch is mainly used for analytical querying, filtering, and grouping.
In ElasticSearch, you can separate data by indexing into separate indices, then limiting your query to a particular index.
For example, if you have two indices, 'foo' and 'bar' running:
% curl -XGET http://localhost:9200/_search?q=*:*
will search the entire cluster, while:
% curl -XGET http://localhost:9200/foo/_search?q=*:*
will search only the 'foo' index.
You can also separate data by types, if you create an index 'test' with the following:
% curl -XPOST http://localhost:9200/test -d '{
"mappings" : {
"type1" : {
"_source" : { "enabled" : false },
"properties" : {
"field1" : { "type" : "string", "index" : "not_analyzed" }
}
},
"type2" : {
"_source" : { "enabled" : false },
"properties" : {
"field1" : { "type" : "string", "index" : "not_analyzed" }
}
}
}
}'
You can search only the 'type1' documents by specifying the type with the query:
% curl -XGET http://localhost:9200/test/type1/_search?q=*:*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With