Solr vs. ElasticSearch [closed]

Update Now that the question scope has been corrected, I might add something in this regard as well: There are many comparisons between Apache Solr and ElasticSearch available, so I’ll reference those I found most useful myself, i.e. covering the most important aspects: Bob Yoplait already linked kimchy’s answer to ElasticSearch, Sphinx, Lucene, Solr, Xapian. … Read more

no [query] registered for [filtered]

The filtered query has been deprecated and removed in ES 5.0. You should now use the bool/must/filter query instead. { “query”: { “bool”: { “must”: { “multi_match”: { “operator”: “and”, “fields”: [ “author”, “title”, “publisher”, “year” ], “query”: “George Orwell” } }, “filter”: { “terms”: { “year”: [ 1980, 1981 ] } } } } … Read more

Autocomplete with java , Redis, Elastic Search , Mongo

It’s a critical search use case, and MongoDB and Redis are perfect for key-based lookups and not use for Search purposes, while Elasticsearch is a distributed search engine, built specifically for such use-case. Before choosing the system, you should know how your feature works internally And below the consideration for selecting it. Non-functional requirements for … Read more

How to wisely combine shingles and edgeNgram to provide flexible full text search?

This is an interesting use case. Here’s my take: { “settings”: { “analysis”: { “analyzer”: { “my_ngram_analyzer”: { “tokenizer”: “my_ngram_tokenizer”, “filter”: [“lowercase”] }, “my_edge_ngram_analyzer”: { “tokenizer”: “my_edge_ngram_tokenizer”, “filter”: [“lowercase”] }, “my_reverse_edge_ngram_analyzer”: { “tokenizer”: “keyword”, “filter” : [“lowercase”,”reverse”,”substring”,”reverse”] }, “lowercase_keyword”: { “type”: “custom”, “filter”: [“lowercase”], “tokenizer”: “keyword” } }, “tokenizer”: { “my_ngram_tokenizer”: { “type”: “nGram”, “min_gram”: … Read more

Making a request to a RESTful API using python

Using requests: import requests url=”http://ES_search_demo.com/document/record/_search?pretty=true” data=””‘{ “query”: { “bool”: { “must”: [ { “text”: { “record.document”: “SOME_JOURNAL” } }, { “text”: { “record.articleTitle”: “farmers” } } ], “must_not”: [], “should”: [] } }, “from”: 0, “size”: 50, “sort”: [], “facets”: {} }”’ response = requests.post(url, data=data) Depending on what kind of response your API returns, … Read more

How to search for a part of a word with ElasticSearch

I’m using nGram, too. I use standard tokenizer and nGram just as a filter. Here is my setup: { “index”: { “index”: “my_idx”, “type”: “my_type”, “analysis”: { “index_analyzer”: { “my_index_analyzer”: { “type”: “custom”, “tokenizer”: “standard”, “filter”: [ “lowercase”, “mynGram” ] } }, “search_analyzer”: { “my_search_analyzer”: { “type”: “custom”, “tokenizer”: “standard”, “filter”: [ “standard”, “lowercase”, “mynGram” … Read more