Hi, I am using ES for log viewer.. logs are displayed in timestamp ascending order with some boolQuery filters.. initially 10,000 records are displayed in first page there could be around 10 pages of query results.. and requirement is user may want to go to different timestamp and that log could be in any of the next pages.. How can i find the log position(index) of specified timestamp in current boolQuery filters hits ? so i can calculate page number and request data of that page to display..
Thanks.
Unless you have that information in each document it can't work I'm afraid.
Thanks for the response @dadoonet , user will try to filter data and then go to specific timestamp and this filter can be anything, so i could get any number of records for different filters.. not sure having original position while indexing would help after documents are filtered because original position doesn't add up to new index after filter.. what is workaround you could suggest for this?
I have hard time to understand what you are speaking about. Could you illustrate with an example?
Ok, i will try to simplify it.. we are using ES for log viewer, the log files will have months of log records.. and when user open any file, log viewer will index all the records of file, there is no specific size to number of records in each file, there could any number of records from hundreds to few hundred thousands, we are using pagination with size of 10,000 records per page, so initial 10,000 records are displayed.. and user can filter these records bases on different parameter for example a specific word in log statement.. still he could end up having hundred thousand records after filter.. and now requirement is to go to records with specific timestamp.. or move 10 days ahead from current selected record.. so this specified timestamp or record after specified days from current selected one could be in any of the next page.. i am looking for way to get this records index position in current filter.. so i could calculate the page it belongs and fetch that specific page data.. sorry it is long story.. hope it is clear now..
Thanks.
Not sure. Do you mean that you just want to filter by date?
Why would you need to compute anything?
No, filter criteria is on different fields.. for example a key word in log statement..
and after filtered user want look for record with specific timestamp or record after certain days.. this next record might belongs to one of pages.. If i get the record position(index) of this next record, i can compute page number
Example: user is in 1st page and want to get record after 10 days.. if the record after 10 days index position is 33000, this belongs to 3rd page and want to fetch 3rd page records to display.
I don't understand why you would need to compute a page number instead of just filtering the resultset to just display the right information for the user.
Example: user is in 1st page and want to get record after 10 days.. if the record after 10 days index position is 33000, this belongs to 3rd page and want to fetch 3rd page records to display.
Add a filter on now/d+10d
and you will get the results on top of the first page.
Like you said i could filter and display the result of records after 10 days.. but not sure if this could fit into what user is asking.. anyway i will keep this for the last chance.
Thank you so much for all the guidance.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.