Hi all,
I have some custom fields whose values change according to time. I have written my custom searcher but do not know how I can achieve to by-pass indexed value.
All I need is to implement a searcher which will calculate custom field value everytime a JQL hit, rather than looking at the indexed value.
Any help will be much appreciated
Tuncay Senturk
Community moderators have prevented the ability to post new answers.
>All I need is to implement a searcher which will calculate custom field value everytime a JQL hit, rather than looking at the indexed value
No, that is total nonsense. You have to have the indexed value available in the index BEFORE you can find it with JQL.
What you're describing is "search for something that might not be there and then change it when I can't find it, even though I can't find it".
Hi Nic,
Thanks for your quick answer.
Assume that you have a custom field calculating something according to time, for instance time passed from a state to current time (just for example).
So, custom field calculates time passed as seconds since the specified status.
And suppose that user wants to list issues that have been in the same status more than n seconds.
To search against this custom field, I need to reindex before searhing. I think, there should be a way to calculate and return results regardless of getting data from lucene.
Does that make sense?
Tuncay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, that's what I'm trying to point out - you need to re-index before searching, which is not what you asked about, and is functionally broken anyway because it's going to cause every user an outage while you re-reindex every issue every time someone opens the search box.
This is a dreadful idea which you should dump immediately, it's really going absolutely nowhere good for you.
Like a date/time field which simply extracts the "last time I changed status" from the history and then tell your users to use the standard less than/greater than time based searches.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I absolutely know the reindexing cost, so that I am trying to do it without reindexing.
Anyway, I got the point and thank you for your advice
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So you understand that you're asking for the logically impossible? You can't search without having an up to date index and your idea was to index after the search... :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I got the point that I can not search without indexing. However my idea was not indexing after search.
My idea was searching according to some indexable fields and filtering those issues according to non-indexable calculated fields within Issue Navigator.
Anyway, thanks for your response. I have seen from the searcher API, and just wanted to make sure that there is no way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mmm, still an awful idea, you should only index on change of data, otherwise you're creating unneccesary load and running with inconsistent index data. That's why the API doesn't have anything - it's really not a good idea.
Having the fixed date/time stamp solves the original problem with a minimum set of coding and using the data in a way that's consistent with the rest of the UI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.