Issue 1:
I have two indexes, the first one called areas is an index containing of multiple polygons, and second one is an index containing of multiple points indicating the document's lat/lon on earth, the index is called stores.

The problem is that I want to attach areas(polygons) that contain the store's point (lat/lon) inside of them, to the store's document as an embedded object. So I can easily find that a document on stores index has which areas.

In an RDBMS I was able to join this two table and find the needed records, In elasticsearch I can iterate over areas index documents one by one and perform a query to find the stores that fit in the area's polygon, and then perform an update on the store document, as the number of areas are huge, I have to perform over 50,000 queries on elasticsearch.

A good solution would be sending a bulk list of areas with the query and tell elasticsearch to aggregate returning results by them the answer would be something like this:

Polygon A : [store1, store2, store3],

Polygon B : [store1, store4, store5]

I didn't find anyway to implement this and I switched back to RDBMS solution which is not very optimized and fast too, but it is faster in design.

Is there anyway to implement this with elasticsearch?

I also planned for writing a plugin which does this functionality if it is not possible currently.

Issue 2:
Hi !

I have the same issue that the one exposed here : #12819 (before closing due to the lack of feedback asked by @clintongormley to the author @apanimesh061)

I discussed it here on stackoverflow because I thought I made a mistake in my parameters

When using a shingle token filter after removal of stopwords why don't we have a parameter to completely ignore stopwords ?

There would be two huge benefits for me :

Even with "filler_token":"" (or "filler_token":" " then a "trim" token filter) there are duplicated shingles generated, with the same text, "pos" and "start" but only differing by "end" that might tweak the queries scores for the duplicated words as seen here :

If a word is surrounded by stopwords, no shingles would be generated associating it with other words around, several (deleted) stopwords away...

I shall add that those duplicated tokens are not removed by a "unique" token filter... and that I don't understand why.

Here is my analysis (I only kept the "test" analyzer which I used to generate examples but I have a few others ):

"settings": {
"index": {
"analysis": {
"filter": {
"fr_stop": {
"ignore_case": "true",
"remove_trailing": "true",
"type": "stop",
"stopwords": "_french_"
},
"fr_worddelimiter": {
"type": "word_delimiter",
"language": "french"
},
"fr_snowball": {
"type": "snowball",
"language": "french"
},
"custom_nGram": {
"type": "ngram",
"min_gram": "3",
"max_gram": "10"
},
"custom_shingles": {
"max_shingle_size": "4",
"min_shingle_size": "2",
"token_separator": " ",
"output_unigrams": "true",
"filler_token":"",
"type": "shingle"
},
"custom_unique": {
"type": "unique",
"only_on_same_position": "true"
},
"fr_elision": {
"type": "elision",
"articles": [
"l",
"m",
"t",
"qu",
"n",
"s",
"j",
"d",
"c",
"jusqu",
"quoiqu",
"lorsqu",
"puisqu",
"parce qu",
"parcequ",
"entr",
"presqu",
"quelqu"
]
}
},
"charfilter": "html_strip",
"analyzer": {
"test": {
"filter": [
"asciifolding",
"lowercase",
"fr_stop",
"fr_elision",
"custom_shingles"
"trim",
"custom_unique",
],
"type": "custom",
"tokenizer": "standard"
}
},
"tokenizer": {
"custom_edgeNGram": {
"token_chars": [
"letter",
"digit"
],
"min_gram": "3",
"type": "edgeNGram",
"max_gram": "20"
},
"custom_nGram": {
"token_chars": [
"letter",
"digit"
],
"min_gram": "3",
"type": "nGram",
"max_gram": "20"
}
}
}
}
}