Hi!
in the query examples at
https://www.mediawiki.org/wiki/Wikidata_Query_Service/User_Manual/MWAPI#Fin…
,
the way to search for "cheese" is
<code>
bd:serviceParam mwapi:search "cheese" .
</code>
What if the search string I want to use is a composite, e.g. "goat cheese"?
So, that depends on what you're looking for. This specific endpoint
(EntitySearch) is wbsearchentities API
(
https://www.mediawiki.org/wiki/Wikibase/API#wbsearchentities), i.e.
prefix search. I don't think it has an option for "exact match", however
it would match only the prefix, i.e. it won't match "This cheese was
made from goat milk". However, if you want to use full-text search
instead, you may need to use phrase search to capture only exact phrase.
In that case you probably should write the parameter as:
bd:serviceParam mwapi:search "\"goat cheese\"" .
Probably something like this:
http://tinyurl.com/y9fdva5w
--
Stas Malyshev
smalyshev(a)wikimedia.org