Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to give certain document fields a weight in app engine full text search?

In my application, I'd like the search API to value a match in the name field, higher than a match in the other fields.

A user can also fill in an 'about' message, which has way more text, so it could be more likely that a match happens there. Is there any way to do this?

like image 315
bigblind Avatar asked Oct 22 '22 13:10

bigblind


1 Answers

SortExpression (https://developers.google.com/appengine/docs/python/search/sortexpressionclass) provides a way to set the sort based on a particular expression, but it only offers a document-wise score (i.e. not per field).

Another (probably bad idea) is to search only by name field, using a query string like "name: my_search_term_here"

So from my knowledge Search API of Google App Engine offers no way to bias one field during search (i.e. similar to the ^ operator in ApacheSolr Lucene).

like image 103
Andrei B Avatar answered Oct 27 '22 16:10

Andrei B