Elasticsearch vs solr regarding data / query structure

I saw many questions (and good answers) comparing scalability, speed, and deployment scenarios for elasticsearch and Solr, but I cannot find good information about any differences or strengths of how queries can work with indexed data.

In particular, I'm interested in the differences between elasticsearch and Solr in the following areas:

  • Cutting options : how do their cut processing differ or are they basically the same?

  • Schema processing : elasticsearch seems to have an advantage in flexibility, since the schemes can be defined on the fly through the rest of the API, while Solr requires them to be predefined in schemas.xml (however, I have not seen concrete confirmation of this difference) . Are there significant differences in how the schemes are used behind this?

  • Indexing filters : are there any differences between how data can be optimized for specific searches? for example, I saw mention of such things as field duplication and query tokenization filters for Solr, which add to the customization of the search algorithm, but did not see much information about the same type regarding elasticsearch, but maybe it just processes it all automatically?

  • query expressiveness : are DSL queries basically as expressive as the others, or are there fundamental differences?

  • "raising" and / or tuning results : what tools exist for hard coding or massaging algorithmic search results?

Again, note that I'm not at all interested in speed / scalability / performance issues, just the expressiveness of structuring search data and the query language. Perhaps this whole question could be generalized as: a search that I can perform, or a data structure that I can create in elasticsearch that I cannot reproduce in Solr, or vice versa?

+6
source share
1 answer
  • the cut is almost the same, except that ES also resolves it with dynamic scripts, and Solr allows you to split facet pages. Also in Solr there is a convenient faceting scheme to make a stylish style of store styles (note: this is also relatively easy with ES, but not out of the box). The ES screen may be more powerful since there is no need to associate faces with a filter.

  • for schema ES can be updated via API! or define it in the file and specify for the type . for Solr, you create a configuration file for the index . BTW: with dynamic fields, you have a less strict scheme for Solr.

  • ES skips only the auto-negotiation function (but this is due to the fact that you are not interesting to you;)) and the group function. Otherwise, both use similar lucene material. ES allows you to use many advanced combinations, such as lucene. The parent child is similar to the group in character and is not implemented in Solr IMO.

  • The standard request for ES is formulated through JSON, so you can create almost everything you can create through lucene. In Solr, you can make a lot of advanced materials, but often you need fundamental knowledge about Solr materials, such as local parameters, etc. Take a look at the nice discussion .

  • I do not understand this :)

Is there a search that I can perform, or a data structure that I can create in elasticsearch that I cannot reproduce in Solr, or vice versa?

ES has a percolator function, which is probably harder to implement with Solr. In ES, you also have a version control function to implement optimistic locking, you have index aliases and a scan request to move deep around your index - not sure if Solr has similar functions. For instance. aliasing helps make the implementation of the rolling index. relatively short.

+7
source

Source: https://habr.com/ru/post/903468/


All Articles