- ApiEntitySearchHelper should ask for more results than needed from the remote API
- ApiEntitySearchHelper should filter results and only return properties with known data types
- WikibaseRepo->getDataTypeDefinitions->getTypeIds can be used in PHP to get the list of enabled data value type ids (needed for filtering)
One thing to consider is:
- The UI makes the decision to show or not show the "more" button based on how many results are returned from the API / if search-continue key is returned. We should make sure we don't make this do bad things.
- If the user asks for 8, and we ask wikidata for 12, and we get 12, filter 5 and return 7, no more button will be shown if only 7 are returned (evil)
- Perhaps logging these cases, or throwing an exception might be fine for now? As the case discussed should be fairly unlikely for now.
Tech pointers:
- WikibaseRepo->getDataTypeDefinitions->getTypeIds for getting PHP data types that are enabled in PHP
- JS code that we think is doing the search in the UI side, view/resources/jquery/wikibase/jquery.wikibase.entityselector.js (although we didn't find where the limit is in the call)
- search-continue will be important