Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does elasticsearch have the equivalent of 'cores' like in solr?

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?

like image 700
thinice Avatar asked May 07 '12 14:05

thinice


People also ask

What is the difference between Solr and 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.

Is Solr faster than Elasticsearch?

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.

What is the main architectural difference between Elasticsearch and Solr?

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.

Does Solr elastic?

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.


1 Answers

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=*:*
like image 139
thnetos Avatar answered Oct 28 '22 21:10

thnetos