Thanks, Stas - this works well so far. Daniel On Fri, Jul 13, 2018 at 8:37 PM, Stas Malyshev <[email protected]> wrote: > Hi! > >> in the query examples at >> https://www.mediawiki.org/wiki/Wikidata_Query_Service/User_Manual/MWAPI#Find_all_entities_with_labels_%22cheese%22_and_get_their_types >> , >> 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 > [email protected]
_______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
