I am creating an index mapping and have questions on norms = false.
There are fields in the index which need to be searched with match phrase, wildcard search and match.
These fields do not contribute to the relevance scoring of the document.
Does setting the field to
{"type": "text", "norms": false}
fulfil the above use case?
If not, what is the difference between
{"type": "text, "norms": false} and {"type": "keyword"}
Hi Ong, norms just store some normalization factors like the length of a field. This influences scoring, but not too much. So your queries will all work, but the exact score per document will differ a bit from an index with enabled norms. So depending on your usecase this can be good enough.
There are many differences between the datatypes "text" and "keyword".
If you want to search with match and match_phrase queries you need the datatype "text".
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.