Question

After reading through the documentation I'm still a little unclear of how app engine handles multiword queries on a document. Like, if there a query like new red bike, and a document only has the terms red and bike in it, will it still return the document as a partial match or must all words be present?

Thanks.

Was it helpful?

Solution

The API will treat each word as an individual term and return all documents that have the 3 terms in them somewhere, essentially converting your query into a "new" AND "red" AND "bike", as correctly outlined by omair_77.

To come full circle - if you want the API to treat the words new red bike as one term and do not want it to return any documents with just new and red and bike in it as loose terms, you need to enclose your query with quotation marks, i.e. "new red bike".

OTHER TIPS

search API treats space as "AND" so when you query a word with space like "new red bike" the query will be like "new AND red AND bike". so it will bring the results containing all the three words

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top