Can ElasticSearch do fuzzy aggregation - elasticsearch

For example I have two docs such as: doc1={"ename":"pop2 up3 donw1"}, doc2={"ename":"up3 pop2"}. Because they looks similar, I wanna they can be aggregated to one item by field ename. So I called it Fuzzy Aggregation.Does ES have the above feature please.

Related

How to filter the aggregation results in Kibana (elastic search)?

I want to filter the elastic search aggregation results in Kibana (v6.2). For example, I want to show only sum of hours those that are more than 100 (like HAVING command in SQL). I know that we can filter the results in filter section over other fields, but I don't know how to apply the filter on aggregation functions. I tried to use post_filter in filter section in Kibana, but it didn't work.
Any ideas?
You can augment aggregation query within advanced field
It will be added to request as shown on picture
Another question is what to put into this field. You can check script values for sum aggregation

How can I get response(which is searched by score) in Elasticsearch?

I need your help. I want to a search which can be search by common conditions and its score range also used as conditions。Can I do it successfully? if you know ,I hope you can share.
I have a example in the picture:
In the picture,we know the score range is [0,1] ,if I want to get response which scores is [0.2,0.6],How do it! help! SOS! Execute my English!
Elasticsearch provides a min_score field that can be included in a request body search to filter out documents with a _score less than a specified value.
There is no way to filter out documents with a _score greater than a certain value, but: why do you want to do this? Scores in Lucene by definition mean that documents were found matching your search query, and that some results are more relevant than others. I recommend that you read "What is Relevance?" in the Elasticsearch documentation, and "Apache Lucene - Scoring" for a basic understanding of how the scoring formula works.
Also, the Lucene score range isn't always [0,1]: it can be greater than 1.

How to return term scores in elasticsearch?

How do I get the term vector for an indexed document in elasticsearch?
That is, once I have uploaded several documents to my elasticsearch index, I would like to get the scored term vectors back so that I can see which which terms are over indexed for a given document and thus for a document show the most influential terms.
Is this possible?
You can achieve that using the Term Vectors API: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html
Say you already indexed several documents. Then it's possible to get the term vectors using the following API call:
curl -XGET 'http://localhost:9200/twitter/tweet/<id>/_termvectors?pretty=true'
Just replace <id> with the id of the document you want create the query for.

haystack elasticsearch facet but disregard filters on this query

Using haystack solr I can do this:
# facet by category but disregard any category filters on this query
squeryset = squeryset.facet('{!ex=category}category')
which will give me facets for the category but ignore any category filters
Now how do I do the same query using elasticsearch?
It's for when someone queries for something with a specific category, I can show the counts for the other categories they did not select.
I was looking for the same thing. See http://demo.fullscale.co/multiselect/ for a working demo to do this in ES. It is however not supported by Haystack. I'm working on that to make it work.
Paul

filtering out docs that have a word from a stop list

I have a search query for some such as "match":{"product name":"glasses car"} so that I am looking for glasses or cars (or both).
But I want to exclude the docs that have google glass or google car in them. so how would I filter them out?
I could use a bool query and use must_not for google, but then I will lose the scoring and get a constant score.
You should use a filtered query with a filter to exclude words like google and keep your main search as the query.
The filter does not affect scoring, only the query part of the filtered query does.
You can find a small example on the Filtered Query page in the ElasticSearch documentation.

Resources