I'm trying to do a match query that is case sensitive such that it only returns words where the html field contains the string. Here is the query I have so far:
I want to only return documents that strictly have the "test_html_query" string as a substring, not documents that are kind of like this string or have some relevance. When I do this query, I get more results than expected. How do I make this more case sensitive?
Since there is no parser in the field field, one option is to create a new field where the parser is of type whitespace just to separate the terms.
The example below represents what I said.
The Mapping is the Schema for the index i.e. the data types and other specifications about your data, it may be worth taking a look at the docs as it is a key concept.
Text Analysis is also a key concept in this case above @RabBit_BR showed how to use a simple whitespace analyzer to tokenize your data and then your search will be case sensitive but you will not get other features like stemming etc.
It is worth noting that all fields have a mapping, which defines how they are indexed. If you do not specify any mapping through an index template or when the index is created the field will be mapped using dynamic mapping rules.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.