> On Apr 14, 2016, at 12:18 PM, John Bickerstaff <j...@johnbickerstaff.com> > wrote: > > If a user types in "foobarbaz figo" I want all documents with "figo" in the > contentType field boosted above every other document in the results.
This is a very common requirement that seems like a good idea, but has very bad corner cases. I always take this back to the customer and convert it to something that works for all queries. Think about this query: vitamin a figo Now, every document with the word “a” is ranked in front of documents with “vitamin a”. That is probably what not what the customer wanted. Instead, have a requirement that when two documents are equal matches for the query, the “figo” document is first. Or, create an SRP with two sections, five figo matches with a “More …” link, then five general matches. But you might want to avoid dupes between the two. If your customer absolutely insists on having every single figo doc above non-figo docs, well, they deserve what they get. wunder Walter Underwood wun...@wunderwood.org http://observer.wunderwood.org/ (my blog)