enonic / xp

Enonic XP
https://enonic.com
GNU General Public License v3.0
202 stars 34 forks source link

Make it possible to filter on score range #6094

Closed ComLock closed 6 years ago

ComLock commented 6 years ago

Apply to these:

ComLock commented 6 years ago

Range is perhaps a little overkill, min is what I need.

Usecase:

On a normal search results page showing a bunch of hits is fine. However when doing the same query, but using it as autocomplete for a search input box you may only want to show the best results.

Workaround: Use repo- or multirepo- connection.query and filter on score in js. Problem with workaround is counts, aggregation, etc will be wrong.

runarmyklebust commented 6 years ago

Its possible (but not implemented) to limit the results based on the score, e.g a min_score parameter, but this will only affect the result-list - e.g the same as filtering in js afterwards (except for the payoff received by not fetching the content at all after query-time)

ComLock commented 6 years ago

Not certain it's the best thing to filter on either since the score depends a lot on the query.

runarmyklebust commented 6 years ago

Using the min_score will not influence the score, only filter the final result. Same applies when doing the filtering afterwards?

Only query and query-filter affects the score / aggregations.

ComLock commented 6 years ago

Yes as I said: "on the query"

runarmyklebust commented 6 years ago

As discussed; too complex and very difficult to use since the score will change based on both data and query