Unfortunately I cannot find any helpful information about how to set the search fields so that I can search only by app_title, in my case (as you can see in the code).
So, is it even possible to specify by which fields I would like to search, currently its searching by each filed and highlighting it. Attaching a screenshot.
If I query for "Chugach", I can see in the API request that the following is set:
search_fields: {
title: {},
},
Despite having "Chugach" in the description of the "Wrangell–St. Elias" record, it is still not matched, so it would appear in this case that "search_fields" IS working.
However, this is an older version of App Search. What version are you on?
EDIT:
I will also point this out...
If you search for "Ranges", in that example it will only match on "Wrangell" from the title field (because "range" is contained in "Wrangell".
However, it will ALSO highlight "Ranges" in the description, even though there was not match on the description.
So to be clear -- Even if a term is only matched on a single field, ANY field that contains that term will be highlighted. Just because you see a term highlighted does not necessarily indicate that a match occurred on that field.
You can see this for yourself if you do a subsequent search on "Chugach", which you can see in the description would be a match, but you will get no results because we're only searching on the title.
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.