The best way to do this is to create a View. The View can specify which fields and navigatores are returned in the results. For more information, please check my article.
how to configure fast query to return specific fields instead of all
-
08-10-2022 - |
Question
esp-devs, i have a collection in a fast repository on which i use the following query to get all the entities in that collection.
:/xsearch?offset=0&hits=100&query=Anthony&view=collection01
However, this query is giving all the fields for every hit-record.
<HIT NO="1" RANK="101" SITEID="0" MOREHITS="0" FCOCOUNT="0">
<FIELD NAME="name">anthony</FIELD>
<FIELD NAME="employeeId">12345</FIELD>
<FIELD NAME="department">aeronautical</FIELD>
</HIT>
I, however, am interested in only one field for every hit-record.
<HIT NO="1" RANK="101" SITEID="0" MOREHITS="0" FCOCOUNT="0">
<FIELD NAME="employeeId">12345</FIELD>
</HIT>
is there any way to specify the only field i desire so that the response would contain only that for the hit-results.
Thanks, JUKE.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow