Lack of interest Generic 'range' search

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

Xon

Well-known member
Currently (XF1 & XF2) search only supports set-based matching, and not range operators (>=, <=, etc) for non-date type searching.

Both MySQL and ElasticSearch support types of range operators and such, and it would be nice for this to be surfaced for add-on authors or other search terms. This would allow removing the special case for date-range searches
 
Upvote 1
This suggestion has been closed. Votes are no longer accepted.
Aside from dates, what ranges are you referring to? Particularly, what ranges would work within the xf_search_index table other than date? Any metadata ranges wouldn't short of flipping to a query constraint instead.
 
I'm not 100% sure if this is related, but one thing that I have been wanting is range search for custom fields. So that we can search for all threads/items that have a value in custom field X between 3 and 7.
I have frequently encountered the need for this in addons.
 
Aside from dates, what ranges are you referring to? Particularly, what ranges would work within the xf_search_index table other than date? Any metadata ranges wouldn't short of flipping to a query constraint instead.
My particular use-case is pushing word-count into the search index, but with custom fields now common adding search support for ranges based on numerical custom field values would be very easy to-do with ElasticSearch.

The use of query constraints means the full-query can't be used into ElasticSearch and means over-fetching. At least not without rewriting the query constraint into an elastic search metadata constrain, except the query constraint doesn't have enough structured information to-do that.

It would actually be nice to split up the SqlConstraint\SqlQuery so the "condition" was split into an operation and identifier. This would make this much easier.
 
Last edited:
Right, I was mostly trying to clarify this part:
Both MySQL and ElasticSearch support types of range operators and such
As in this instance it's not something that would be supported in MySQL (without using a different approach).
 
As in this instance it's not something that would be supported in MySQL (without using a different approach).
MySQL would support it as an SqlConstraint, but this doesn't work for Elastic Search.

This is actually something of a step back going from XF1 -> XF2 where XF2 effectively writes an SQL query fragment at a high-level into the query object rather than easily analyzable components.
 
Top Bottom