Hey guys!
Learning Elastic at the moment and have a question about stopwords and analyzers.
I'm using Java API and want to use English analyzer to filter out some articles and other redundant words from the search.
SearchRequest searchRequest = new SearchRequest(index.toLowerCase());
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
searchSourceBuilder.query(QueryBuilders.simpleQueryStringQuery(queryString)
.analyzer("english")
.field("text")
.fields(getBoostedFields()));
searchRequest.source(searchSourceBuilder);
SearchResponse searchResponse = client.search(searchRequest, RequestOptions.DEFAULT);
And I don't really understand the logic that happens. I expected analyzer to filter out just some words like "the, and, or..." but I found that even if I put, for example, "Apple" in the field like
"text":"Apple apple apple"
I don't have any results and the same with some other words but at the same time, it works with some.
Could someone explain this logic to me, please? Or give a source I can read about this behaviour and how to tune it?