You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to Kue, but thus far I really like the interface and I find it to be well thought out.
However, I've been encountering problems similar to those discussed in #94, #98 and others.
Here's my proposal to fix it (and happy to submit a pull request):
While reds was created for full-text search, this feature is not germane to a job queue. Nonetheless, it is useful.
The Job constructor should have a third parameter e.g. Job(type, data, lookups). Lookups will be a string of fields that full-text searching is performed on, separated by spaces. For example 'key3 key21 key33'.
In the update function, the json passed to getSearch will only include the keys specified by the user. For backwards compatibility, if lookup is left undefined, the traditional indexing will occur. If an empty string is submitted, no indexing will be done.
The Queue object will then have Queue#lookup that allows a user to search for particular jobIds.
Using an extreme case as an example results in fairly sizable savings:
I'm new to Kue, but thus far I really like the interface and I find it to be well thought out.
However, I've been encountering problems similar to those discussed in #94, #98 and others.
Here's my proposal to fix it (and happy to submit a pull request):
Job(type, data, lookups)
. Lookups will be a string of fields that full-text searching is performed on, separated by spaces. For example 'key3 key21 key33'.getSearch
will only include the keys specified by the user. For backwards compatibility, iflookup
is left undefined, the traditional indexing will occur. If an empty string is submitted, no indexing will be done.Using an extreme case as an example results in fairly sizable savings:
Before proposed changes:
After proposed changes:
Note that the majority of the keys are attributable to objects that have been created but not removed.
Finally, this would also consolidate job removal as the number of search entries to remove would be reduced substantially.
Let me know thoughts and I'll submit a pull request.
Brandon
The text was updated successfully, but these errors were encountered: